Home
last modified time | relevance | path

Searched refs:sslSocket (Results 1 – 22 of 22) sorted by relevance

/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DDelegatingSSLSocketFactory.java39 SSLSocket sslSocket = (SSLSocket) delegate.createSocket(); in createSocket() local
40 return configureSocket(sslSocket); in createSocket()
44 SSLSocket sslSocket = (SSLSocket) delegate.createSocket(host, port); in createSocket() local
45 return configureSocket(sslSocket); in createSocket()
50 SSLSocket sslSocket = (SSLSocket) delegate.createSocket(host, port, localAddress, localPort); in createSocket() local
51 return configureSocket(sslSocket); in createSocket()
55 SSLSocket sslSocket = (SSLSocket) delegate.createSocket(host, port); in createSocket() local
56 return configureSocket(sslSocket); in createSocket()
61 SSLSocket sslSocket = (SSLSocket) delegate.createSocket(host, port, localAddress, localPort); in createSocket() local
62 return configureSocket(sslSocket); in createSocket()
[all …]
DConnectionSpecTest.java209 SSLSocket sslSocket = (SSLSocket) SSLSocketFactory.getDefault().createSocket(); in allEnabledCipherSuites() local
210 sslSocket.setEnabledCipherSuites(new String[] { in allEnabledCipherSuites()
215 tlsSpec.apply(sslSocket, false); in allEnabledCipherSuites()
219 Arrays.asList(sslSocket.getEnabledCipherSuites())); in allEnabledCipherSuites()
228 SSLSocket sslSocket = (SSLSocket) SSLSocketFactory.getDefault().createSocket(); in allEnabledTlsVersions() local
229 sslSocket.setEnabledProtocols(new String[] { in allEnabledTlsVersions()
234 tlsSpec.apply(sslSocket, false); in allEnabledTlsVersions()
236 Arrays.asList(sslSocket.getEnabledProtocols())); in allEnabledTlsVersions()
DFallbackTestClientSocketFactory.java43 @Override protected SSLSocket configureSocket(SSLSocket sslSocket) throws IOException { in configureSocket() argument
44 return new TlsFallbackScsvDisabledSSLSocket(sslSocket); in configureSocket()
DCallTest.java2242 protected SSLSocket configureSocket(SSLSocket sslSocket) throws IOException { in configureSocket() argument
2243 socketsCreated.add(sslSocket); in configureSocket()
2244 return sslSocket; in configureSocket()
/external/conscrypt/testing/src/main/java/libcore/javax/net/ssl/
DSSLConfigurationAsserts.java91 try (SSLSocket sslSocket = (SSLSocket) sslSocketFactory.createSocket()) { in assertSSLSocketFactoryConfigSameAsSSLContext() argument
92 assertTrue(sslSocket.getUseClientMode()); in assertSSLSocketFactoryConfigSameAsSSLContext()
93 assertTrue(sslSocket.getEnableSessionCreation()); in assertSSLSocketFactoryConfigSameAsSSLContext()
94 assertSSLSocketConfigSameAsSSLContext(sslSocket, sslContext); in assertSSLSocketFactoryConfigSameAsSSLContext()
100 public static void assertSSLSocketDefaultConfiguration(SSLSocket sslSocket) throws Exception { in assertSSLSocketDefaultConfiguration() argument
101 assertTrue(sslSocket.getUseClientMode()); in assertSSLSocketDefaultConfiguration()
102 assertTrue(sslSocket.getEnableSessionCreation()); in assertSSLSocketDefaultConfiguration()
103 assertSSLSocketConfigSameAsSSLContext(sslSocket, SSLContext.getDefault()); in assertSSLSocketDefaultConfiguration()
109 SSLSocket sslSocket, SSLContext sslContext) { in assertSSLSocketConfigSameAsSSLContext() argument
111 sslSocket.getSSLParameters(), sslContext.getDefaultSSLParameters()); in assertSSLSocketConfigSameAsSSLContext()
[all …]
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/
DConnectionSpec.java128 void apply(SSLSocket sslSocket, boolean isFallback) { in apply() argument
129 ConnectionSpec specToApply = supportedSpec(sslSocket, isFallback); in apply()
132 sslSocket.setEnabledProtocols(specToApply.tlsVersions); in apply()
135 sslSocket.setEnabledCipherSuites(specToApply.cipherSuites); in apply()
143 private ConnectionSpec supportedSpec(SSLSocket sslSocket, boolean isFallback) { in supportedSpec() argument
145 ? Util.intersect(String.class, cipherSuites, sslSocket.getEnabledCipherSuites()) in supportedSpec()
146 : sslSocket.getEnabledCipherSuites(); in supportedSpec()
148 ? Util.intersect(String.class, tlsVersions, sslSocket.getEnabledProtocols()) in supportedSpec()
149 : sslSocket.getEnabledProtocols(); in supportedSpec()
153 if (isFallback && contains(sslSocket.getSupportedCipherSuites(), "TLS_FALLBACK_SCSV")) { in supportedSpec()
DOkHttpClient.java106 public void apply(ConnectionSpec tlsConfiguration, SSLSocket sslSocket, boolean isFallback) {
107 tlsConfiguration.apply(sslSocket, isFallback);
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/
DConnectionSpecSelector.java55 public ConnectionSpec configureSecureSocket(SSLSocket sslSocket) throws IOException { in configureSecureSocket() argument
59 if (connectionSpec.isCompatible(sslSocket)) { in configureSecureSocket()
73 + ", supported protocols=" + Arrays.toString(sslSocket.getEnabledProtocols())); in configureSecureSocket()
76 isFallbackPossible = isFallbackPossible(sslSocket); in configureSecureSocket()
78 Internal.instance.apply(tlsConfiguration, sslSocket, isFallback); in configureSecureSocket()
DPlatform.java102 public void configureTlsExtensions(SSLSocket sslSocket, String hostname, in configureTlsExtensions() argument
110 public void afterHandshake(SSLSocket sslSocket) { in afterHandshake() argument
272 SSLSocket sslSocket, String hostname, List<Protocol> protocols) { in configureTlsExtensions() argument
275 setUseSessionTickets.invokeOptionalWithoutCheckedException(sslSocket, true); in configureTlsExtensions()
276 setHostname.invokeOptionalWithoutCheckedException(sslSocket, hostname); in configureTlsExtensions()
280 if (setAlpnProtocols != null && setAlpnProtocols.isSupported(sslSocket)) { in configureTlsExtensions()
282 setAlpnProtocols.invokeWithoutCheckedException(sslSocket, parameters); in configureTlsExtensions()
368 SSLSocket sslSocket, String hostname, List<Protocol> protocols) { in configureTlsExtensions() argument
378 putMethod.invoke(null, sslSocket, provider); in configureTlsExtensions()
384 @Override public void afterHandshake(SSLSocket sslSocket) { in afterHandshake() argument
[all …]
DInternal.java65 public abstract void apply(ConnectionSpec tlsConfiguration, SSLSocket sslSocket, in apply() argument
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/io/
DRealConnection.java178 SSLSocket sslSocket = null; in connectTls() local
181 sslSocket = (SSLSocket) sslSocketFactory.createSocket( in connectTls()
185 ConnectionSpec connectionSpec = connectionSpecSelector.configureSecureSocket(sslSocket); in connectTls()
188 sslSocket, address.getUriHost(), address.getProtocols()); in connectTls()
192 sslSocket.startHandshake(); in connectTls()
193 Handshake unverifiedHandshake = Handshake.get(sslSocket.getSession()); in connectTls()
196 if (!address.getHostnameVerifier().verify(address.getUriHost(), sslSocket.getSession())) { in connectTls()
214 ? Platform.get().getSelectedProtocol(sslSocket) in connectTls()
216 socket = sslSocket; in connectTls()
228 if (sslSocket != null) { in connectTls()
[all …]
/external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/internal/framed/
DFramedServer.java62 SSLSocket sslSocket = doSsl(socket); in run() local
63 String protocolString = Platform.get().getSelectedProtocol(sslSocket); in run()
69 .socket(sslSocket) in run()
85 SSLSocket sslSocket = (SSLSocket) sslSocketFactory.createSocket( in doSsl() local
87 sslSocket.setUseClientMode(false); in doSsl()
88 Platform.get().configureTlsExtensions(sslSocket, null, framedProtocols); in doSsl()
89 sslSocket.startHandshake(); in doSsl()
90 return sslSocket; in doSsl()
/external/conscrypt/testing/src/main/java/org/conscrypt/
DChannelType.java120 SSLSocket sslSocket = (SSLSocket) socket; in clientMode() local
121 sslSocket.setUseClientMode(true); in clientMode()
122 return sslSocket; in clientMode()
126 SSLSocket sslSocket = (SSLSocket) socket; in serverMode() local
127 sslSocket.setUseClientMode(false); in serverMode()
128 return sslSocket; in serverMode()
/external/okhttp/android/main/java/com/squareup/okhttp/internal/
DPlatform.java103 SSLSocket sslSocket, String hostname, List<Protocol> protocols) { in configureTlsExtensions() argument
106 SET_USE_SESSION_TICKETS.invokeOptionalWithoutCheckedException(sslSocket, true); in configureTlsExtensions()
107 SET_HOSTNAME.invokeOptionalWithoutCheckedException(sslSocket, hostname); in configureTlsExtensions()
111 boolean alpnSupported = SET_ALPN_PROTOCOLS.isSupported(sslSocket); in configureTlsExtensions()
118 SET_ALPN_PROTOCOLS.invokeWithoutCheckedException(sslSocket, parameters); in configureTlsExtensions()
126 public void afterHandshake(SSLSocket sslSocket) { in afterHandshake() argument
/external/conscrypt/openjdk/src/test/java/org/conscrypt/
DOpenSSLServerSocketImplTest.java65 SSLServerSocket sslSocket = in newServerSocket() local
67 sslSocket.setEnabledProtocols(getProtocols()); in newServerSocket()
68 sslSocket.setEnabledCipherSuites(new String[] {cipher}); in newServerSocket()
69 return sslSocket; in newServerSocket()
/external/apache-http/android/src/android/net/http/
DCertificateChainValidator.java110 HttpsConnection connection, SSLSocket sslSocket, String domain) in doHandshakeAndValidateServerCertificates() argument
113 SSLSession sslSession = sslSocket.getSession(); in doHandshakeAndValidateServerCertificates()
115 closeSocketThrowException(sslSocket, "failed to perform SSL handshake"); in doHandshakeAndValidateServerCertificates()
120 sslSocket.getSession().getPeerCertificates(); in doHandshakeAndValidateServerCertificates()
124 sslSocket, "failed to retrieve peer certificates"); in doHandshakeAndValidateServerCertificates()
/external/conscrypt/platform/src/main/java/org/conscrypt/
DTrustManagerImpl.java278 private static SSLSession getHandshakeSessionOrThrow(SSLSocket sslSocket) in getHandshakeSessionOrThrow() argument
280 SSLSession session = sslSocket.getHandshakeSession(); in getHandshakeSessionOrThrow()
293 SSLSocket sslSocket = (SSLSocket) socket; in checkClientTrusted() local
294 session = getHandshakeSessionOrThrow(sslSocket); in checkClientTrusted()
295 parameters = sslSocket.getSSLParameters(); in checkClientTrusted()
335 SSLSocket sslSocket = (SSLSocket) socket; in getTrustedChainForServer() local
336 session = getHandshakeSessionOrThrow(sslSocket); in getTrustedChainForServer()
337 parameters = sslSocket.getSSLParameters(); in getTrustedChainForServer()
/external/mockwebserver/src/main/java/com/google/mockwebserver/
DRecordedRequest.java59 SSLSocket sslSocket = (SSLSocket) socket; in RecordedRequest() local
60 SSLSession session = sslSocket.getSession(); in RecordedRequest()
DMockWebServer.java315 SSLSocket sslSocket = (SSLSocket) socket; in serveConnection()
316 sslSocket.setUseClientMode(false); in serveConnection()
319 sslSocket.startHandshake(); in serveConnection()
/external/conscrypt/openjdk-integ-tests/src/test/java/libcore/javax/net/ssl/
DSSLContextTest.java198 SSLSocket sslSocket = (SSLSocket) sslContext.getSocketFactory().createSocket(); in assertEnabledCipherSuites() local
200 assertContentsInOrder(expectedCipherSuites, sslSocket.getEnabledCipherSuites()); in assertEnabledCipherSuites()
202 expectedCipherSuites, sslSocket.getSSLParameters().getCipherSuites()); in assertEnabledCipherSuites()
205 sslSocket.close(); in assertEnabledCipherSuites()
216 sslSocket.close(); in assertEnabledCipherSuites()
DSSLSocketTest.java1986 SSLSocket sslSocket = (SSLSocket) sslSocketFactory.createSocket(client, in captureTlsHandshakeFirstTransmittedChunkBytes() local
1988 sslSocket.startHandshake(); in captureTlsHandshakeFirstTransmittedChunkBytes()
/external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/mockwebserver/
DMockWebServer.java449 SSLSocket sslSocket = (SSLSocket) socket;
450 sslSocket.setUseClientMode(false);
454 Platform.get().configureTlsExtensions(sslSocket, null, protocols);
457 sslSocket.startHandshake();
460 String protocolString = Platform.get().getSelectedProtocol(sslSocket);