/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ |
H A D | ServerSessionContext.java | 22 * Caches server sessions. Indexes by session ID. Users typically look up 35 // TODO remove SSL_CTX session cache limit so we can manage it 41 // Set a trivial session id context. OpenSSL uses this to make 52 protected void sessionRemoved(SSLSession session) {} argument 56 SSLSession session = super.getSession(sessionId); 57 if (session != null) { 58 return session; 65 session = toSession(data, null, -1); 66 if (session != null && session 77 putSession(SSLSession session) argument [all...] |
H A D | ClientSessionContext.java | 25 * looking to reuse any session for a given host and port. 50 protected void sessionRemoved(SSLSession session) { argument 51 String host = session.getPeerHost(); 52 int port = session.getPeerPort(); 63 * Finds a cached session for the given host name and port. 67 * @return cached session or null if none found 73 SSLSession session; 76 session = sessionsByHostAndPort.get(hostAndPortKey); 78 if (session != null && session 101 putSession(SSLSession session) argument [all...] |
H A D | SSLClientSessionCache.java | 29 * session data is dependent upon the caller's implementation and is opaque to 35 * Gets data from a pre-existing session for a given server host and port. 39 * @return the session data or null if none is cached 45 * Stores session data for the given session. 47 * @param session to cache data for 49 * @throws NullPointerException if session, result of 50 * {@code session.getPeerHost()} or data is null 52 public void putSessionData(SSLSession session, byte[] sessionData); argument
|
H A D | SSLServerSessionCache.java | 25 * a session started by a different server based on a session ID provided 30 * session data is dependent upon the caller's implementation and is opaque to 36 * Gets the session data for given session ID. 39 * @return the session data or null if none is cached 45 * Stores session data for the given session. 47 * @param session to cache data for 49 * @throws NullPointerException if session o 51 putSessionData(SSLSession session, byte[] sessionData) argument [all...] |
H A D | AbstractSessionContext.java | 37 * Supports SSL session caches. 59 * Constructs a new session context. 89 SSLSession session = i.next(); 90 if (session.isValid()) { 91 next = session; 127 SSLSession session = i.next(); 129 sessionRemoved(session); 145 SSLSession session = i.next(); 148 if (!session.isValid()) { 150 sessionRemoved(session); 160 sessionRemoved(SSLSession session) argument 182 toBytes(SSLSession session) argument 271 putSession(SSLSession session) argument [all...] |
H A D | ClientHandshakeImpl.java | 46 * It is responsible for session negotiating. 73 if (session == null) { // initial handshake 74 session = findSessionToResume(); 75 } else { // start session renegotiation 80 if (!session.isValid()) { 81 session = null; 84 if (session != null) { 88 session = new SSLSessionImpl(parameters.getSecureRandom()); 90 session.setPeer(engineOwner.getPeerHost(), engineOwner.getPeerPort()); 92 session [all...] |
H A D | SSLEngineImpl.java | 68 // active session object 69 private SSLSessionImpl session; field in class:SSLEngineImpl 140 if (session != null) { 141 session.invalidate(); 370 if (session != null) { 371 return session; 426 if ((session == null || engine_was_closed) && ( 471 session = recordProtocol.getSession(); 479 if (session != null) { 480 session [all...] |
H A D | SSLRecordProtocol.java | 32 * pending session. The order of setting up of the pending session 33 * as an active session differs for client and server modes. 39 * After the pending session has been set up as a current session, 74 // the SSL session used for connection 75 private SSLSessionImpl session; field in class:SSLRecordProtocol 93 // flag indicating if session object has been changed after 94 // handshake phase (to distinguish session pending state) 121 * Returns the session obtaine 248 setSession(SSLSessionImpl session) argument 275 getChangeCipherSpecMesage(SSLSessionImpl session) argument [all...] |
H A D | ServerHandshakeImpl.java | 45 * It responsible for negotiating a session. 71 * Start session negotiation 75 if (session == null) { // initial handshake 152 session.peerCertificates = clientCert.certs; 199 if (session.cipherSuite.keyExchange == CipherSuite.KEY_EXCHANGE_RSA 200 || session.cipherSuite.keyExchange == CipherSuite.KEY_EXCHANGE_RSA_EXPORT) { 267 session.context = parameters.getServerSessionContext(); 268 parameters.getServerSessionContext().putSession(session); 272 session.lastAccessedTime = System.currentTimeMillis(); 349 // client wishes to reuse session [all...] |
H A D | HandshakeProtocol.java | 94 * Pending session 96 protected SSLSessionImpl session; field in class:HandshakeProtocol 119 * Indicates previous session resuming 182 * Start session negotiation 183 * @param session 188 * Stops the current session renegotiation process. 189 * Such functionality is needed when it is session renegotiation 192 * @param session 225 * Returns pending session 226 * @return session [all...] |
H A D | ConnectionStateSSLv3.java | 54 * security parameters are provided by session object. 55 * @param session: the sessin object which incapsulates 61 protected ConnectionStateSSLv3(SSLSessionImpl session) { argument 63 CipherSuite cipherSuite = session.cipherSuite; 78 + session.getCipherSuite()); 87 byte[] clientRandom = session.clientRandom; 88 byte[] serverRandom = session.serverRandom; 97 PRF.computePRF_SSLv3(key_block, session.master_secret, seed); 104 boolean is_client = !session.isServer; 152 logger.print(session [all...] |
H A D | ConnectionStateTLS.java | 76 * security parameters are provided by session object. 77 * @param session: the sessin object which incapsulates 83 protected ConnectionStateTLS(SSLSessionImpl session) { argument 85 CipherSuite cipherSuite = session.cipherSuite; 109 byte[] clientRandom = session.clientRandom; 110 byte[] serverRandom = session.serverRandom; 119 PRF.computePRF(key_block, session.master_secret, 127 boolean is_client = !session.isServer; 170 logger.print(session.master_secret);
|
H A D | OpenSSLSocketImpl.java | 58 * <li>session tickets 190 * Gets the suitable session reference from the session cache container. 198 OpenSSLSessionImpl session = (OpenSSLSessionImpl) sessionContext.getSession(hostName, port); 199 if (session == null) { 203 String protocol = session.getProtocol(); 215 String cipherSuite = session.getCipherSuite(); 227 return session; 239 * cipher suites, or initiate a new session. The certificate chain is 319 // look for client session t [all...] |
H A D | FileClientSessionCache.java | 46 * This cache creates one file per SSL session using "host.port" for 47 * the file name. Files are created or replaced when session data is put 51 * <p>When the number of session files exceeds MAX_SIZE, we delete the 59 /** Directory to store session files in. */ 178 System.logW("Error reading session data for " + host + " from " + file + ".", t); 181 public synchronized void putSessionData(SSLSession session, argument 183 String host = session.getPeerHost(); 188 String name = fileName(host, session.getPeerPort()); 297 System.logW("Error writing session data for " + host + " to " + file + ".", t);
|
H A D | SSLSocketImpl.java | 60 // active session object 61 private SSLSessionImpl session; field in class:SSLSocketImpl 392 // return an invalid session with 397 return session; 789 session = recordProtocol.getSession(); 793 new HandshakeCompletedEvent(this, session);
|
/libcore/luni/src/main/java/javax/net/ssl/ |
H A D | HandshakeCompletedEvent.java | 31 private transient SSLSession session; field in class:HandshakeCompletedEvent 35 * socket and SSL session. 40 * the SSL session. 44 session = s; 48 * Returns the SSL session associated with this event. 50 * @return the SSL session associated with this event. 53 return session; 62 return session.getCipherSuite(); 74 return session.getLocalCertificates(); 87 return session [all...] |
H A D | HostnameVerifier.java | 30 * session. 34 * @param session 35 * the SSL session of the connection. 39 boolean verify(String hostname, SSLSession session); argument
|
H A D | SSLSessionBindingEvent.java | 32 * Creates a new {@code SSLSessionBindingEvent} for the specified session 35 * @param session 36 * the session for which the event occurs. 40 public SSLSessionBindingEvent(SSLSession session, String name) { argument 41 super(session); 55 * Returns the session to which the binding is added or from which it is 58 * @return the session to which the binding is added or from which it is
|
H A D | DefaultHostnameVerifier.java | 41 public final boolean verify(String host, SSLSession session) { argument 43 Certificate[] certificates = session.getPeerCertificates();
|
/libcore/luni/src/test/java/tests/api/javax/net/ssl/ |
H A D | HostnameVerifierTest.java | 35 * session) 38 mySSLSession session = new mySSLSession("localhost", 1080, null); 40 assertFalse(hv.verify("localhost", session)); 50 mySSLSession session = new mySSLSession(new X509Certificate[] {x509}); 53 assertTrue(verifier.verify("foo.com", session)); 54 assertFalse(verifier.verify("a.foo.com", session)); 55 assertFalse(verifier.verify("bar.com", session)); 59 session = new mySSLSession(new X509Certificate[] {x509}); 60 assertTrue(verifier.verify("\u82b1\u5b50.co.jp", session)); 61 assertFalse(verifier.verify("a.\u82b1\u5b50.co.jp", session)); [all...] |
H A D | HandshakeCompletedEventTest.java | 74 mySSLSession session = new mySSLSession(); 76 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); 89 mySSLSession session = new mySSLSession("localhost", 1080, null); 91 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); 100 mySSLSession session = new mySSLSession("localhost", 1080, null); 102 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); 111 mySSLSession session = new mySSLSession("localhost", 1080, null); 113 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); 123 mySSLSession session = new mySSLSession((X509Certificate[]) null); 125 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); [all...] |
H A D | HttpsURLConnectionTest.java | 335 public boolean verify(String hostname, SSLSession session) { argument 336 if (hostname == session.getPeerHost()) {
|
/libcore/luni/src/test/java/org/apache/harmony/xnet/provider/jsse/ |
H A D | NativeCryptoTest.java | 556 public void afterHandshake(int session, int ssl, int context, argument 560 if (session != NULL) { 561 NativeCrypto.SSL_SESSION_free(session); 696 int session = NULL; 698 session = NativeCrypto.SSL_do_handshake(s, fd, callback, timeout, client, 703 + " session=0x" + Integer.toString(session, 16)); 707 hooks.afterHandshake(session, s, c, socket, fd, callback); 860 public void afterHandshake(int session, int s, int c, 866 super.afterHandshake(session, [all...] |
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
H A D | TestSSLEnginePair.java | 67 SSLSession session = c.clientContext.createSSLEngine().getSession(); 69 int packetBufferSize = session.getPacketBufferSize(); 73 int applicationBufferSize = session.getApplicationBufferSize();
|
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/ |
H A D | HttpsURLConnectionTest.java | 637 SSLSession session = serverPeer.getSession(); 639 assertEquals(session.getCipherSuite(), clientConnection.getCipherSuite()); 640 assertEquals(session.getLocalPrincipal(), clientConnection.getPeerPrincipal()); 641 assertEquals(session.getPeerPrincipal(), clientConnection.getLocalPrincipal()); 644 Certificate[] localCertificates = session.getLocalCertificates(); 649 serverCertificates = session.getPeerCertificates(); 798 public boolean verify(String hostname, SSLSession session) { argument 801 + session.getPeerHost()); 824 * The content of the response to be sent during HTTPS session. 832 * The tail of the response to be sent during HTTPS session [all...] |