Home
last modified time | relevance | path

Searched refs:sslContext (Results 1 – 25 of 28) sorted by relevance

12

/external/conscrypt/testing/src/main/java/libcore/javax/net/ssl/
DSSLConfigurationAsserts.java48 public static void assertSSLContextDefaultConfiguration(SSLContext sslContext) in assertSSLContextDefaultConfiguration() argument
50 SSLParameters defaultParameters = sslContext.getDefaultSSLParameters(); in assertSSLContextDefaultConfiguration()
52 sslContext.getProtocol(), defaultParameters.getProtocols()); in assertSSLContextDefaultConfiguration()
56 SSLParameters supportedParameters = sslContext.getSupportedSSLParameters(); in assertSSLContextDefaultConfiguration()
65 assertSSLSocketFactoryConfigSameAsSSLContext(sslContext.getSocketFactory(), sslContext); in assertSSLContextDefaultConfiguration() local
67 sslContext.getServerSocketFactory(), sslContext); in assertSSLContextDefaultConfiguration() local
68 SSLEngine sslEngine = sslContext.createSSLEngine(); in assertSSLContextDefaultConfiguration()
70 assertSSLEngineConfigSameAsSSLContext(sslEngine, sslContext); in assertSSLContextDefaultConfiguration()
86 SSLSocketFactory sslSocketFactory, SSLContext sslContext) throws IOException { in assertSSLSocketFactoryConfigSameAsSSLContext() argument
87 assertCipherSuitesEqual(sslContext.getDefaultSSLParameters().getCipherSuites(), in assertSSLSocketFactoryConfigSameAsSSLContext()
[all …]
/external/conscrypt/openjdk-integ-tests/src/test/java/libcore/javax/net/ssl/
DSSLContextTest.java70 SSLContext sslContext = SSLContext.getDefault(); in test_SSLContext_getDefault() local
71 assertNotNull(sslContext); in test_SSLContext_getDefault()
73 sslContext.init(null, null, null); in test_SSLContext_getDefault()
107 SSLContext sslContext = SSLContext.getInstance(protocol); in test_SSLContext_defaultConfiguration() local
109 sslContext.init(null, null, null); in test_SSLContext_defaultConfiguration()
111 SSLConfigurationAsserts.assertSSLContextDefaultConfiguration(sslContext); in test_SSLContext_defaultConfiguration()
119 SSLContext sslContext = SSLContext.getInstance("TLS"); in test_SSLContext_pskOnlyConfiguration_defaultProviderOnly() local
120 sslContext.init(new KeyManager[] {PSKKeyManagerProxy.getConscryptPSKKeyManager( in test_SSLContext_pskOnlyConfiguration_defaultProviderOnly()
126 assertEnabledCipherSuites(expectedCipherSuites, sslContext); in test_SSLContext_pskOnlyConfiguration_defaultProviderOnly()
132 SSLContext sslContext = SSLContext.getInstance("TLS"); in test_SSLContext_x509AndPskConfiguration_defaultProviderOnly() local
[all …]
/external/okhttp/samples/static-server/src/main/java/com/squareup/okhttp/sample/
DSampleServer.java23 private final SSLContext sslContext; field in SampleServer
27 public SampleServer(SSLContext sslContext, String root, int port) { in SampleServer() argument
28 this.sslContext = sslContext; in SampleServer()
35 server.useHttps(sslContext.getSocketFactory(), false); in run()
114 SSLContext sslContext = sslContext(keystoreFile, password); in main() local
115 SampleServer server = new SampleServer(sslContext, root, port); in main()
119 private static SSLContext sslContext(String keystoreFile, String password) in sslContext() method in SampleServer
136 SSLContext sslContext = SSLContext.getInstance("TLS"); in sslContext() local
137 sslContext.init( in sslContext()
142 return sslContext; in sslContext()
/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/
DCustomTrust.java41 SSLContext sslContext = sslContextForTrustedCertificates(trustedCertificatesInputStream()); in CustomTrust() local
42 client.setSslSocketFactory(sslContext.getSocketFactory()); in CustomTrust()
183 SSLContext sslContext = SSLContext.getInstance("TLS"); in sslContextForTrustedCertificates() local
184 sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), in sslContextForTrustedCertificates()
186 return sslContext; in sslContextForTrustedCertificates()
/external/okhttp/android/test/java/com/squareup/okhttp/internal/
DPlatformTest.java88 SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); in rootTrustIndex_notNull_viaSocketFactory() local
89 sslContext.init(null, new TrustManager[] { TRUST_NO_ONE_TRUST_MANAGER }, new SecureRandom()); in rootTrustIndex_notNull_viaSocketFactory()
90 SSLSocketFactory socketFactory = sslContext.getSocketFactory(); in rootTrustIndex_notNull_viaSocketFactory()
102 SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); in trustManager() local
103 sslContext.init(null, new TrustManager[] { TRUST_NO_ONE_TRUST_MANAGER }, new SecureRandom()); in trustManager()
104 SSLSocketFactory socketFactory = sslContext.getSocketFactory(); in trustManager()
/external/nist-sip/java/gov/nist/core/net/
DSslNetworkLayer.java70 SSLContext sslContext; in SslNetworkLayer() local
71 sslContext = SSLContext.getInstance("TLS"); in SslNetworkLayer()
83 sslContext.init(kmFactory.getKeyManagers(), tmFactory.getTrustManagers(), secureRandom); in SslNetworkLayer()
84 sslServerSocketFactory = sslContext.getServerSocketFactory(); in SslNetworkLayer()
85 sslSocketFactory = sslContext.getSocketFactory(); in SslNetworkLayer()
/external/okhttp/okhttp-ws-tests/src/test/java/com/squareup/okhttp/ws/
DWebSocketCallTest.java44 private final SSLContext sslContext = SslContextBuilder.localhost(); field in WebSocketCallTest
176 server.useHttps(sslContext.getSocketFactory(), false); in wssScheme()
177 client.setSslSocketFactory(sslContext.getSocketFactory()); in wssScheme()
184 server.useHttps(sslContext.getSocketFactory(), false); in httpsScheme()
185 client.setSslSocketFactory(sslContext.getSocketFactory()); in httpsScheme()
/external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/internal/
DSslContextBuilder.java114 SSLContext sslContext = SSLContext.getInstance("TLS"); in build() local
115 sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), in build()
117 return sslContext; in build()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DURLConnectionTest.java108 private SSLContext sslContext = SslContextBuilder.localhost(); field in URLConnectionTest
513 server.useHttps(sslContext.getSocketFactory(), false); in connectViaHttps()
516 client.client().setSslSocketFactory(sslContext.getSocketFactory()); in connectViaHttps()
527 server.useHttps(sslContext.getSocketFactory(), false); in inspectHandshakeThroughoutRequestLifecycle()
530 client.client().setSslSocketFactory(sslContext.getSocketFactory()); in inspectHandshakeThroughoutRequestLifecycle()
556 server.useHttps(sslContext.getSocketFactory(), false); in connectViaHttpsReusingConnections()
561 SSLSocketFactory clientSocketFactory = sslContext.getSocketFactory(); in connectViaHttpsReusingConnections()
578 server.useHttps(sslContext.getSocketFactory(), false); in connectViaHttpsReusingConnectionsDifferentFactories()
583 client.client().setSslSocketFactory(sslContext.getSocketFactory()); in connectViaHttpsReusingConnectionsDifferentFactories()
598 server.useHttps(sslContext.getSocketFactory(), false); in connectViaHttpsWithSSLFallback()
[all …]
DCallTest.java93 private SSLContext sslContext = SslContextBuilder.localhost(); field in CallTest
913 server.useHttps(sslContext.getSocketFactory(), false); in recoverFromTlsHandshakeFailure()
928 Arrays.asList(sslContext.getSocketFactory().getSupportedCipherSuites()); in recoverFromTlsHandshakeFailure_tlsFallbackScsvEnabled()
934 server.useHttps(sslContext.getSocketFactory(), false); in recoverFromTlsHandshakeFailure_tlsFallbackScsvEnabled()
938 new RecordingSSLSocketFactory(sslContext.getSocketFactory()); in recoverFromTlsHandshakeFailure_tlsFallbackScsvEnabled()
958 server.useHttps(sslContext.getSocketFactory(), false); in recoverFromTlsHandshakeFailure_Async()
976 server.useHttps(sslContext.getSocketFactory(), false); in noRecoveryFromTlsHandshakeFailureWhenTlsFallbackIsDisabled()
2034 server.useHttps(sslContext.getSocketFactory(), true); in proxyConnectOmitsApplicationHeaders()
2041 client.setSslSocketFactory(sslContext.getSocketFactory()); in proxyConnectOmitsApplicationHeaders()
2069 server.useHttps(sslContext.getSocketFactory(), true); in proxyAuthenticateOnConnect()
[all …]
DConnectionReuseTest.java37 private SSLContext sslContext = SslContextBuilder.localhost(); field in ConnectionReuseTest
228 client.setSslSocketFactory(sslContext.getSocketFactory()); in enableHttp2()
231 server.useHttps(sslContext.getSocketFactory(), false); in enableHttp2()
/external/apache-http/android/src/android/net/http/
DHttpsConnection.java79 … OpenSSLContextImpl sslContext = (OpenSSLContextImpl) Conscrypt.newPreferredSSLContextSpi(); in initializeEngine() local
98 sslContext.engineInit(null, trustManagers, null); in initializeEngine()
99 sslContext.engineGetClientSessionContext().setPersistentCache(cache); in initializeEngine()
102 mSslSocketFactory = sslContext.engineGetSocketFactory(); in initializeEngine()
/external/okhttp/benchmarks/src/main/java/com/squareup/okhttp/benchmarks/
DOkHttp.java41 SSLContext sslContext = SslContextBuilder.localhost(); in prepare() local
42 SSLSocketFactory socketFactory = sslContext.getSocketFactory(); in prepare()
DUrlConnection.java37 SSLContext sslContext = SslContextBuilder.localhost(); in prepare() local
38 SSLSocketFactory socketFactory = sslContext.getSocketFactory(); in prepare()
DApacheHttpClient.java45 SSLContext sslContext = SslContextBuilder.localhost(); in prepare() local
47 new Scheme("https", 443, new SSLSocketFactory(sslContext))); in prepare()
DOkHttpAsync.java56 SSLContext sslContext = SslContextBuilder.localhost(); in prepare() local
57 SSLSocketFactory socketFactory = sslContext.getSocketFactory(); in prepare()
DBenchmark.java164 SSLContext sslContext = SslContextBuilder.localhost(); in startServer() local
165 server.useHttps(sslContext.getSocketFactory(), false); in startServer()
DNettyHttpClient.java72 SSLContext sslContext = SslContextBuilder.localhost(); in prepare()
73 SSLEngine engine = sslContext.createSSLEngine(); in prepare()
/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/internal/huc/
DCacheAdapterTest.java61 private SSLContext sslContext = SslContextBuilder.localhost(); field in CacheAdapterTest
117 client.setSslSocketFactory(sslContext.getSocketFactory()); in get_httpsGet()
232 client.setSslSocketFactory(sslContext.getSocketFactory()); in put_httpsGet()
259 server.useHttps(sslContext.getSocketFactory(), false /* tunnelProxy */); in configureHttpsServer()
DResponseCacheTest.java98 private SSLContext sslContext = SslContextBuilder.localhost(); field in ResponseCacheTest
259 server.useHttps(sslContext.getSocketFactory(), false); in secureResponseCaching()
266 c1.setSSLSocketFactory(sslContext.getSocketFactory()); in secureResponseCaching()
278 c2.setSSLSocketFactory(sslContext.getSocketFactory()); in secureResponseCaching()
337 server.useHttps(sslContext.getSocketFactory(), false); in secureResponseCachingAndRedirects()
350 client.setSslSocketFactory(sslContext.getSocketFactory()); in secureResponseCachingAndRedirects()
374 server2.useHttps(sslContext.getSocketFactory(), false); in secureResponseCachingAndProtocolRedirects()
388 client.setSslSocketFactory(sslContext.getSocketFactory()); in secureResponseCachingAndProtocolRedirects()
1449 server.useHttps(sslContext.getSocketFactory(), false); in varyAndHttps()
1457 client.setSslSocketFactory(sslContext.getSocketFactory()); in varyAndHttps()
[all …]
/external/conscrypt/openjdk/src/test/java/org/conscrypt/
DDuckTypedPSKKeyManagerTest.java41 SSLContext sslContext = SSLContext.getDefault(); in setUp() local
42 SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory(); in setUp()
44 mSSLEngine = sslContext.createSSLEngine(); in setUp()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/
DConnectionSpecSelectorTest.java42 private SSLContext sslContext = SslContextBuilder.localhost(); field in ConnectionSpecSelectorTest
123 SSLSocket socket = (SSLSocket) sslContext.getSocketFactory().createSocket(); in createSocketWithEnabledProtocols()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/
DOkHttpClient.java631 SSLContext sslContext = SSLContext.getInstance("TLS"); in getDefaultSSLSocketFactory() local
632 sslContext.init(null, null, null); in getDefaultSSLSocketFactory()
633 defaultSslSocketFactory = sslContext.getSocketFactory(); in getDefaultSSLSocketFactory()
/external/okhttp/okhttp-urlconnection/src/test/java/com/squareup/okhttp/
DUrlConnectionCacheTest.java85 private final SSLContext sslContext = SslContextBuilder.localhost(); field in UrlConnectionCacheTest
249 server.useHttps(sslContext.getSocketFactory(), false); in secureResponseCaching()
255 c1.setSSLSocketFactory(sslContext.getSocketFactory()); in secureResponseCaching()
267 c2.setSSLSocketFactory(sslContext.getSocketFactory()); in secureResponseCaching()
327 server.useHttps(sslContext.getSocketFactory(), false); in secureResponseCachingAndRedirects()
337 client.client().setSslSocketFactory(sslContext.getSocketFactory()); in secureResponseCachingAndRedirects()
363 server2.useHttps(sslContext.getSocketFactory(), false); in secureResponseCachingAndProtocolRedirects()
374 client.client().setSslSocketFactory(sslContext.getSocketFactory()); in secureResponseCachingAndProtocolRedirects()
1393 server.useHttps(sslContext.getSocketFactory(), false); in varyAndHttps()
1401 connection1.setSSLSocketFactory(sslContext.getSocketFactory()); in varyAndHttps()
[all …]
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/framed/
DHttpOverSpdyTest.java74 protected SSLContext sslContext = SslContextBuilder.localhost(); field in HttpOverSpdyTest
85 server.useHttps(sslContext.getSocketFactory(), false); in setUp()
87 client.client().setSslSocketFactory(sslContext.getSocketFactory()); in setUp()

12