Home
last modified time | relevance | path

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

12

/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.java216 SSLSocket sslSocket = (SSLSocket) SSLSocketFactory.getDefault().createSocket(); in allEnabledCipherSuites() local
217 sslSocket.setEnabledCipherSuites(new String[] { in allEnabledCipherSuites()
223 tlsSpec.apply(sslSocket, false); in allEnabledCipherSuites()
228 Arrays.asList(sslSocket.getEnabledCipherSuites())); in allEnabledCipherSuites()
237 SSLSocket sslSocket = (SSLSocket) SSLSocketFactory.getDefault().createSocket(); in allEnabledTlsVersions() local
238 sslSocket.setEnabledProtocols(new String[] { in allEnabledTlsVersions()
243 tlsSpec.apply(sslSocket, false); in allEnabledTlsVersions()
245 Arrays.asList(sslSocket.getEnabledProtocols())); in allEnabledTlsVersions()
/external/grpc-grpc-java/okhttp/src/main/java/io/grpc/okhttp/
DOkHttpProtocolNegotiator.java86 SSLSocket sslSocket, String hostname, @Nullable List<Protocol> protocols) throws IOException { in negotiate() argument
88 configureTlsExtensions(sslSocket, hostname, protocols); in negotiate()
92 sslSocket.startHandshake(); in negotiate()
94 String negotiatedProtocol = getSelectedProtocol(sslSocket); in negotiate()
100 platform.afterHandshake(sslSocket); in negotiate()
106 SSLSocket sslSocket, String hostname, List<Protocol> protocols) { in configureTlsExtensions() argument
107 platform.configureTlsExtensions(sslSocket, hostname, protocols); in configureTlsExtensions()
141 public String negotiate(SSLSocket sslSocket, String hostname, List<Protocol> protocols) in negotiate() argument
145 String negotiatedProtocol = getSelectedProtocol(sslSocket); in negotiate()
147 negotiatedProtocol = super.negotiate(sslSocket, hostname, protocols); in negotiate()
[all …]
DOkHttpTlsUpgrader.java60 SSLSocket sslSocket = (SSLSocket) sslSocketFactory.createSocket( in upgrade() local
62 spec.apply(sslSocket, false); in upgrade()
64 sslSocket, host, spec.supportsTlsExtensions() ? TLS_PROTOCOLS : null); in upgrade()
73 if (!hostnameVerifier.verify(canonicalizeHost(host), sslSocket.getSession())) { in upgrade()
76 return sslSocket; in upgrade()
/external/conscrypt/repackaged/testing/src/main/java/com/android/org/conscrypt/javax/net/ssl/
DSSLConfigurationAsserts.java93 SSLSocket sslSocket = (SSLSocket) sslSocketFactory.createSocket(); in assertSSLSocketFactoryConfigSameAsSSLContext() local
95 assertTrue(sslSocket.getUseClientMode()); in assertSSLSocketFactoryConfigSameAsSSLContext()
96 assertTrue(sslSocket.getEnableSessionCreation()); in assertSSLSocketFactoryConfigSameAsSSLContext()
97 assertSSLSocketConfigSameAsSSLContext(sslSocket, sslContext); in assertSSLSocketFactoryConfigSameAsSSLContext()
99 sslSocket.close(); in assertSSLSocketFactoryConfigSameAsSSLContext()
105 public static void assertSSLSocketDefaultConfiguration(SSLSocket sslSocket) throws Exception { in assertSSLSocketDefaultConfiguration() argument
106 assertTrue(sslSocket.getUseClientMode()); in assertSSLSocketDefaultConfiguration()
107 assertTrue(sslSocket.getEnableSessionCreation()); in assertSSLSocketDefaultConfiguration()
108 assertSSLSocketConfigSameAsSSLContext(sslSocket, SSLContext.getDefault()); in assertSSLSocketDefaultConfiguration()
114 SSLSocket sslSocket, SSLContext sslContext) { in assertSSLSocketConfigSameAsSSLContext() argument
[all …]
/external/conscrypt/testing/src/main/java/org/conscrypt/javax/net/ssl/
DSSLConfigurationAsserts.java91 SSLSocket sslSocket = (SSLSocket) sslSocketFactory.createSocket(); in assertSSLSocketFactoryConfigSameAsSSLContext() local
93 assertTrue(sslSocket.getUseClientMode()); in assertSSLSocketFactoryConfigSameAsSSLContext()
94 assertTrue(sslSocket.getEnableSessionCreation()); in assertSSLSocketFactoryConfigSameAsSSLContext()
95 assertSSLSocketConfigSameAsSSLContext(sslSocket, sslContext); in assertSSLSocketFactoryConfigSameAsSSLContext()
97 sslSocket.close(); in assertSSLSocketFactoryConfigSameAsSSLContext()
103 public static void assertSSLSocketDefaultConfiguration(SSLSocket sslSocket) throws Exception { in assertSSLSocketDefaultConfiguration() argument
104 assertTrue(sslSocket.getUseClientMode()); in assertSSLSocketDefaultConfiguration()
105 assertTrue(sslSocket.getEnableSessionCreation()); in assertSSLSocketDefaultConfiguration()
106 assertSSLSocketConfigSameAsSSLContext(sslSocket, SSLContext.getDefault()); in assertSSLSocketDefaultConfiguration()
112 SSLSocket sslSocket, SSLContext sslContext) { in assertSSLSocketConfigSameAsSSLContext() argument
[all …]
/external/okhttp/android/src/main/java/com/squareup/okhttp/internal/
DPlatform.java115 SSLSocket sslSocket, String hostname, List<Protocol> protocols) { in configureTlsExtensions() argument
117 SSLParameters sslParams = sslSocket.getSSLParameters(); in configureTlsExtensions()
120 if (SSLSockets.isSupportedSocket(sslSocket)) { in configureTlsExtensions()
121 SSLSockets.setUseSessionTickets(sslSocket, true); in configureTlsExtensions()
123 SET_USE_SESSION_TICKETS.invokeOptionalWithoutCheckedException(sslSocket, true); in configureTlsExtensions()
133 if (!isPlatformSocket(sslSocket)) { in configureTlsExtensions()
134 SET_HOSTNAME.invokeOptionalWithoutCheckedException(sslSocket, hostname); in configureTlsExtensions()
141 if (!isPlatformSocket(sslSocket) && SET_ALPN_PROTOCOLS.isSupported(sslSocket)) { in configureTlsExtensions()
143 SET_ALPN_PROTOCOLS.invokeWithoutCheckedException(sslSocket, parameters); in configureTlsExtensions()
145 sslSocket.setSSLParameters(sslParams); in configureTlsExtensions()
[all …]
/external/okhttp/repackaged/android/src/main/java/com/android/okhttp/internal/
DPlatform.java119 SSLSocket sslSocket, String hostname, List<Protocol> protocols) { in configureTlsExtensions() argument
121 SSLParameters sslParams = sslSocket.getSSLParameters(); in configureTlsExtensions()
124 if (SSLSockets.isSupportedSocket(sslSocket)) { in configureTlsExtensions()
125 SSLSockets.setUseSessionTickets(sslSocket, true); in configureTlsExtensions()
127 SET_USE_SESSION_TICKETS.invokeOptionalWithoutCheckedException(sslSocket, true); in configureTlsExtensions()
137 if (!isPlatformSocket(sslSocket)) { in configureTlsExtensions()
138 SET_HOSTNAME.invokeOptionalWithoutCheckedException(sslSocket, hostname); in configureTlsExtensions()
145 if (!isPlatformSocket(sslSocket) && SET_ALPN_PROTOCOLS.isSupported(sslSocket)) { in configureTlsExtensions()
147 SET_ALPN_PROTOCOLS.invokeWithoutCheckedException(sslSocket, parameters); in configureTlsExtensions()
149 sslSocket.setSSLParameters(sslParams); in configureTlsExtensions()
[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()
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/
DConnectionSpec.java130 void apply(SSLSocket sslSocket, boolean isFallback) { in apply() argument
131 ConnectionSpec specToApply = supportedSpec(sslSocket, isFallback); in apply()
134 sslSocket.setEnabledProtocols(specToApply.tlsVersions); in apply()
137 sslSocket.setEnabledCipherSuites(specToApply.cipherSuites); in apply()
145 private ConnectionSpec supportedSpec(SSLSocket sslSocket, boolean isFallback) { in supportedSpec() argument
147 ? Util.intersect(String.class, cipherSuites, sslSocket.getEnabledCipherSuites()) in supportedSpec()
148 : sslSocket.getEnabledCipherSuites(); in supportedSpec()
150 ? Util.intersect(String.class, tlsVersions, sslSocket.getEnabledProtocols()) in supportedSpec()
151 : sslSocket.getEnabledProtocols(); in supportedSpec()
155 if (isFallback && contains(sslSocket.getSupportedCipherSuites(), "TLS_FALLBACK_SCSV")) { in supportedSpec()
/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 …]
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/internal/
DConnectionSpecSelector.java57 public ConnectionSpec configureSecureSocket(SSLSocket sslSocket) throws IOException { in configureSecureSocket() argument
61 if (connectionSpec.isCompatible(sslSocket)) { in configureSecureSocket()
75 + ", supported protocols=" + Arrays.toString(sslSocket.getEnabledProtocols())); in configureSecureSocket()
78 isFallbackPossible = isFallbackPossible(sslSocket); in configureSecureSocket()
80 Internal.instance.apply(tlsConfiguration, sslSocket, isFallback); in configureSecureSocket()
/external/grpc-grpc-java/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/
DConnectionSpec.java125 public void apply(SSLSocket sslSocket, boolean isFallback) { in apply() argument
126 ConnectionSpec specToApply = supportedSpec(sslSocket, isFallback); in apply()
128 sslSocket.setEnabledProtocols(specToApply.tlsVersions); in apply()
133 sslSocket.setEnabledCipherSuites(cipherSuitesToEnable); in apply()
141 private ConnectionSpec supportedSpec(SSLSocket sslSocket, boolean isFallback) { in supportedSpec() argument
144 String[] cipherSuitesToSelectFrom = sslSocket.getEnabledCipherSuites(); in supportedSpec()
154 Arrays.asList(sslSocket.getSupportedCipherSuites()).contains(fallbackScsv); in supportedSpec()
160 : sslSocket.getEnabledCipherSuites(); in supportedSpec()
169 String[] protocolsToSelectFrom = sslSocket.getEnabledProtocols(); in supportedSpec()
DPlatform.java137 public void configureTlsExtensions(SSLSocket sslSocket, String hostname, in configureTlsExtensions() argument
145 public void afterHandshake(SSLSocket sslSocket) { in afterHandshake() argument
385 SSLSocket sslSocket, String hostname, List<Protocol> protocols) { in configureTlsExtensions() argument
388 setUseSessionTickets.invokeOptionalWithoutCheckedException(sslSocket, true); in configureTlsExtensions()
389 setHostname.invokeOptionalWithoutCheckedException(sslSocket, hostname); in configureTlsExtensions()
393 if (setAlpnProtocols.isSupported(sslSocket)) { in configureTlsExtensions()
395 setAlpnProtocols.invokeWithoutCheckedException(sslSocket, parameters); in configureTlsExtensions()
450 SSLSocket sslSocket, String hostname, List<Protocol> protocols) { in configureTlsExtensions() argument
451 SSLParameters parameters = sslSocket.getSSLParameters(); in configureTlsExtensions()
465 sslSocket.setSSLParameters(parameters); in configureTlsExtensions()
[all …]
/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/repackaged/okhttp/src/main/java/com/android/okhttp/internal/io/
DRealConnection.java182 SSLSocket sslSocket = null; in connectTls() local
185 sslSocket = (SSLSocket) sslSocketFactory.createSocket( in connectTls()
189 ConnectionSpec connectionSpec = connectionSpecSelector.configureSecureSocket(sslSocket); in connectTls()
192 sslSocket, address.getUriHost(), address.getProtocols()); in connectTls()
196 sslSocket.startHandshake(); in connectTls()
197 Handshake unverifiedHandshake = Handshake.get(sslSocket.getSession()); in connectTls()
200 if (!address.getHostnameVerifier().verify(address.getUriHost(), sslSocket.getSession())) { in connectTls()
218 ? Platform.get().getSelectedProtocol(sslSocket) in connectTls()
220 socket = sslSocket; in connectTls()
232 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/conscrypt/repackaged/testing/src/main/java/com/android/org/conscrypt/
DChannelType.java122 SSLSocket sslSocket = (SSLSocket) socket; in clientMode() local
123 sslSocket.setUseClientMode(true); in clientMode()
124 return sslSocket; in clientMode()
128 SSLSocket sslSocket = (SSLSocket) socket; in serverMode() local
129 sslSocket.setUseClientMode(false); in serverMode()
130 return sslSocket; in serverMode()
/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()
DConscryptSocketTest.java118 SSLSocket sslSocket = (SSLSocket) factory.createSocket( in newClientSocket() local
120 sslSocket.setUseClientMode(true); in newClientSocket()
121 return sslSocket; in newClientSocket()
127 SSLSocket sslSocket = in newServerSocket() local
129 sslSocket.setUseClientMode(false); in newServerSocket()
130 return sslSocket; in newServerSocket()
200 AbstractConscryptSocket sslSocket = (AbstractConscryptSocket) socket; in init() local
201 sslSocket.setUseClientMode(useClientMode); in init()
202 return sslSocket; in init()
/external/conscrypt/repackaged/openjdk/src/test/java/com/android/org/conscrypt/
DOpenSSLServerSocketImplTest.java70 SSLServerSocket sslSocket = in newServerSocket() local
72 sslSocket.setEnabledProtocols(getProtocols()); in newServerSocket()
73 sslSocket.setEnabledCipherSuites(new String[] {cipher}); in newServerSocket()
74 return sslSocket; in newServerSocket()
DConscryptSocketTest.java123 SSLSocket sslSocket = (SSLSocket) factory.createSocket( in newClientSocket() local
125 sslSocket.setUseClientMode(true); in newClientSocket()
126 return sslSocket; in newClientSocket()
132 SSLSocket sslSocket = in newServerSocket() local
134 sslSocket.setUseClientMode(false); in newServerSocket()
135 return sslSocket; in newServerSocket()
206 AbstractConscryptSocket sslSocket = (AbstractConscryptSocket) socket; in init() local
207 sslSocket.setUseClientMode(useClientMode); in init()
208 return sslSocket; in init()
/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()

12