Home
last modified time | relevance | path

Searched refs:SSLContext (Results 1 – 25 of 144) sorted by relevance

123456

/external/conscrypt/openjdk-integ-tests/src/test/java/org/conscrypt/javax/net/ssl/
DSSLContextTest.java50 import javax.net.ssl.SSLContext;
73 SSLContext sslContext = SSLContext.getDefault(); in test_SSLContext_getDefault()
86 SSLContext.setDefault(null); in test_SSLContext_setDefault()
92 SSLContext defaultContext = SSLContext.getDefault(); in test_SSLContext_setDefault()
94 SSLContext oldContext = SSLContext.getDefault(); in test_SSLContext_setDefault()
96 SSLContext newContext = SSLContext.getInstance(protocol); in test_SSLContext_setDefault()
99 SSLContext.setDefault(newContext); in test_SSLContext_setDefault()
100 assertSame(newContext, SSLContext.getDefault()); in test_SSLContext_setDefault()
102 SSLContext.setDefault(defaultContext); in test_SSLContext_setDefault()
107 SSLConfigurationAsserts.assertSSLContextDefaultConfiguration(SSLContext.getDefault()); in test_SSLContext_defaultConfiguration()
[all …]
DSSLServerSocketTest.java27 import javax.net.ssl.SSLContext;
47 SSLContext context = SSLContext.getInstance("TLSv1.2"); in testSetEnabledCipherSuitesAffectsGetter_TLS12()
104 SSLContext context = SSLContext.getInstance("TLSv1.3"); in test_SSLSocket_setEnabledCipherSuites_TLS13()
/external/conscrypt/repackaged/openjdk-integ-tests/src/test/java/com/android/org/conscrypt/javax/net/ssl/
DSSLContextTest.java51 import javax.net.ssl.SSLContext;
77 SSLContext sslContext = SSLContext.getDefault(); in test_SSLContext_getDefault()
90 SSLContext.setDefault(null); in test_SSLContext_setDefault()
96 SSLContext defaultContext = SSLContext.getDefault(); in test_SSLContext_setDefault()
98 SSLContext oldContext = SSLContext.getDefault(); in test_SSLContext_setDefault()
100 SSLContext newContext = SSLContext.getInstance(protocol); in test_SSLContext_setDefault()
103 SSLContext.setDefault(newContext); in test_SSLContext_setDefault()
104 assertSame(newContext, SSLContext.getDefault()); in test_SSLContext_setDefault()
106 SSLContext.setDefault(defaultContext); in test_SSLContext_setDefault()
111 SSLConfigurationAsserts.assertSSLContextDefaultConfiguration(SSLContext.getDefault()); in test_SSLContext_defaultConfiguration()
[all …]
DSSLServerSocketTest.java28 import javax.net.ssl.SSLContext;
51 SSLContext context = SSLContext.getInstance("TLSv1.2"); in testSetEnabledCipherSuitesAffectsGetter_TLS12()
107 SSLContext context = SSLContext.getInstance("TLSv1.3"); in test_SSLSocket_setEnabledCipherSuites_TLS13()
/external/conscrypt/benchmark-jmh/src/jmh/java/org/conscrypt/
DOpenJdkEngineFactory.java35 import javax.net.ssl.SSLContext;
55 private final SSLContext clientContext = initClientSslContext(newContext());
56 private final SSLContext serverContext = initServerSslContext(newContext());
74 private SSLContext newContext() { in newContext()
76 return SSLContext.getInstance(OpenJdkEngineFactoryConfig.PROTOCOL); in newContext()
83 private final SSLContext clientContext = newConscryptClientContext();
84 private final SSLContext serverContext = newConscryptServerContext();
104 private SSLContext newContext() { in newContext()
106 return SSLContext.getInstance( in newContext()
114 private final SSLContext clientContext = newConscryptClientContext();
[all …]
DOpenJdkEndpointFactory.java5 import javax.net.ssl.SSLContext;
55 SSLContext clientContext = TestUtils.newClientSslContext(provider); in newJdkFactories()
56 SSLContext serverContext = TestUtils.newServerSslContext(provider); in newJdkFactories()
65 SSLContext clientContext = TestUtils.newClientSslContext(provider); in newConscryptFactories()
66 SSLContext serverContext = TestUtils.newServerSslContext(provider); in newConscryptFactories()
/external/conscrypt/testing/src/main/java/org/conscrypt/javax/net/ssl/
DSSLConfigurationAsserts.java27 import javax.net.ssl.SSLContext;
48 public static void assertSSLContextDefaultConfiguration(SSLContext sslContext) in assertSSLContextDefaultConfiguration()
78 assertSSLSocketFactoryConfigSameAsSSLContext(sslSocketFactory, SSLContext.getDefault()); in assertSSLSocketFactoryDefaultConfiguration()
86 SSLSocketFactory sslSocketFactory, SSLContext sslContext) throws IOException { in assertSSLSocketFactoryConfigSameAsSSLContext()
106 assertSSLSocketConfigSameAsSSLContext(sslSocket, SSLContext.getDefault()); in assertSSLSocketDefaultConfiguration()
112 SSLSocket sslSocket, SSLContext sslContext) { in assertSSLSocketConfigSameAsSSLContext()
132 sslServerSocketFactory, SSLContext.getDefault()); in assertSSLServerSocketFactoryDefaultConfiguration()
141 SSLServerSocketFactory sslServerSocketFactory, SSLContext sslContext) in assertSSLServerSocketFactoryConfigSameAsSSLContext()
164 assertSSLServerSocketConfigSameAsSSLContext(sslServerSocket, SSLContext.getDefault()); in assertSSLServerSocketDefaultConfiguration()
172 SSLServerSocket sslServerSocket, SSLContext sslContext) { in assertSSLServerSocketConfigSameAsSSLContext()
[all …]
DTestSSLContext.java38 import javax.net.ssl.SSLContext;
81 public final SSLContext clientContext;
82 public final SSLContext serverContext;
174 X509TrustManager serverTrustManager, SSLContext clientContext, in TestSSLContext()
175 SSLContext serverContext, SSLServerSocket serverSocket, InetAddress host, int port) { in TestSSLContext()
211 private SSLContext clientContext;
212 private SSLContext serverContext;
263 public Builder clientContext(SSLContext clientContext) { in clientContext()
268 public Builder serverContext(SSLContext serverContext) { in serverContext()
298 SSLContext clientContext = this.clientContext; in build()
[all …]
/external/conscrypt/repackaged/testing/src/main/java/com/android/org/conscrypt/javax/net/ssl/
DSSLConfigurationAsserts.java28 import javax.net.ssl.SSLContext;
50 public static void assertSSLContextDefaultConfiguration(SSLContext sslContext) in assertSSLContextDefaultConfiguration()
80 assertSSLSocketFactoryConfigSameAsSSLContext(sslSocketFactory, SSLContext.getDefault()); in assertSSLSocketFactoryDefaultConfiguration()
88 SSLSocketFactory sslSocketFactory, SSLContext sslContext) throws IOException { in assertSSLSocketFactoryConfigSameAsSSLContext()
108 assertSSLSocketConfigSameAsSSLContext(sslSocket, SSLContext.getDefault()); in assertSSLSocketDefaultConfiguration()
114 SSLSocket sslSocket, SSLContext sslContext) { in assertSSLSocketConfigSameAsSSLContext()
134 sslServerSocketFactory, SSLContext.getDefault()); in assertSSLServerSocketFactoryDefaultConfiguration()
143 SSLServerSocketFactory sslServerSocketFactory, SSLContext sslContext) in assertSSLServerSocketFactoryConfigSameAsSSLContext()
166 assertSSLServerSocketConfigSameAsSSLContext(sslServerSocket, SSLContext.getDefault()); in assertSSLServerSocketDefaultConfiguration()
174 SSLServerSocket sslServerSocket, SSLContext sslContext) { in assertSSLServerSocketConfigSameAsSSLContext()
[all …]
DTestSSLContext.java39 import javax.net.ssl.SSLContext;
83 public final SSLContext clientContext;
84 public final SSLContext serverContext;
176 X509TrustManager serverTrustManager, SSLContext clientContext, in TestSSLContext()
177 SSLContext serverContext, SSLServerSocket serverSocket, InetAddress host, int port) { in TestSSLContext()
216 private SSLContext clientContext;
217 private SSLContext serverContext;
268 public Builder clientContext(SSLContext clientContext) { in clientContext()
273 public Builder serverContext(SSLContext serverContext) { in serverContext()
303 SSLContext clientContext = this.clientContext; in build()
[all …]
/external/conscrypt/benchmark-android/src/main/java/org/conscrypt/
DAndroidEngineFactory.java19 import javax.net.ssl.SSLContext;
28 private final SSLContext clientContext = newConscryptClientContext();
29 private final SSLContext serverContext = newConscryptServerContext();
55 private final SSLContext clientContext = TestUtils.newClientSslContext(
57 private final SSLContext serverContext = TestUtils.newServerSslContext(
87 private static SSLContext newConscryptClientContext() { in newConscryptClientContext()
91 private static SSLContext newConscryptServerContext() { in newConscryptServerContext()
/external/conscrypt/repackaged/benchmark-android/src/main/java/com/android/org/conscrypt/
DAndroidEngineFactory.java20 import javax.net.ssl.SSLContext;
30 private final SSLContext clientContext = newConscryptClientContext();
31 private final SSLContext serverContext = newConscryptServerContext();
57 private final SSLContext clientContext =
59 private final SSLContext serverContext =
89 private static SSLContext newConscryptClientContext() { in newConscryptClientContext()
93 private static SSLContext newConscryptServerContext() { in newConscryptServerContext()
/external/conscrypt/repackaged/testing/src/main/java/com/android/org/conscrypt/
DTestUtils.java49 import javax.net.ssl.SSLContext;
332 SSLContext clientContext = initClientSslContext(newContext(provider)); in getSocketFactory()
337 SSLContext serverContext = initServerSslContext(newContext(provider)); in getServerSocketFactory()
341 static SSLContext newContext(Provider provider) { in newContext()
343 return SSLContext.getInstance("TLS", provider); in newContext()
350 SSLContext jdkContext = in getCommonCipherSuites()
352 SSLContext conscryptContext = TestUtils.initSslContext( in getCommonCipherSuites()
362 private static List<String> supportedCiphers(SSLContext ctx) { in supportedCiphers()
409 static SSLContext newClientSslContext(Provider provider) { in newClientSslContext()
410 SSLContext context = newContext(provider); in newClientSslContext()
[all …]
/external/conscrypt/testing/src/main/java/org/conscrypt/
DTestUtils.java48 import javax.net.ssl.SSLContext;
330 SSLContext clientContext = initClientSslContext(newContext(provider)); in getSocketFactory()
335 SSLContext serverContext = initServerSslContext(newContext(provider)); in getServerSocketFactory()
339 static SSLContext newContext(Provider provider) { in newContext()
341 return SSLContext.getInstance("TLS", provider); in newContext()
348 SSLContext jdkContext = in getCommonCipherSuites()
350 SSLContext conscryptContext = TestUtils.initSslContext( in getCommonCipherSuites()
360 private static List<String> supportedCiphers(SSLContext ctx) { in supportedCiphers()
407 static SSLContext newClientSslContext(Provider provider) { in newClientSslContext()
408 SSLContext context = newContext(provider); in newClientSslContext()
[all …]
/external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/internal/
DSslContextBuilder.java31 import javax.net.ssl.SSLContext;
42 private static SSLContext localhost; // Lazily initialized.
45 public static synchronized SSLContext localhost() { in localhost()
90 public SSLContext build() throws GeneralSecurityException { in build()
114 SSLContext sslContext = SSLContext.getInstance("TLS"); in build()
/external/okhttp/samples/static-server/src/main/java/com/squareup/okhttp/sample/
DSampleServer.java17 import javax.net.ssl.SSLContext;
23 private final SSLContext sslContext;
27 public SampleServer(SSLContext sslContext, String root, int port) { in SampleServer()
114 SSLContext sslContext = sslContext(keystoreFile, password); in main()
119 private static SSLContext sslContext(String keystoreFile, String password) in sslContext()
136 SSLContext sslContext = SSLContext.getInstance("TLS"); in sslContext()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/tls/
DCertificatePinnerChainValidationTest.java29 import javax.net.ssl.SSLContext;
63 SSLContext clientContext = new SslContextBuilder() in pinRootNotPresentInChain()
71 SSLContext serverSslContext = new SslContextBuilder() in pinRootNotPresentInChain()
118 SSLContext clientContext = new SslContextBuilder() in pinIntermediatePresentInChain()
126 SSLContext serverSslContext = new SslContextBuilder() in pinIntermediatePresentInChain()
177 SSLContext clientContext = new SslContextBuilder() in unrelatedPinnedLeafCertificateInChain()
200 SSLContext serverSslContext = new SslContextBuilder() in unrelatedPinnedLeafCertificateInChain()
249 SSLContext clientContext = new SslContextBuilder() in unrelatedPinnedIntermediateCertificateInChain()
273 SSLContext serverSslContext = new SslContextBuilder() in unrelatedPinnedIntermediateCertificateInChain()
/external/python/cpython2/Lib/test/
Dtest_ssl.py144 ssl.SSLContext(ssl.PROTOCOL_SSLv2)
541 ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
679 ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
755 ssl.SSLContext(protocol)
756 self.assertRaises(TypeError, ssl.SSLContext)
757 self.assertRaises(ValueError, ssl.SSLContext, -1)
758 self.assertRaises(ValueError, ssl.SSLContext, 42)
763 ctx = ssl.SSLContext(proto)
767 ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
775 ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
[all …]
/external/python/cpython3/Doc/library/
Dssl.rst48 For more sophisticated applications, the :class:`ssl.SSLContext` class
50 by SSL sockets created through the :meth:`SSLContext.wrap_socket` method.
70 :meth:`SSLContext.wrap_socket` of an :class:`SSLContext` instance to wrap
94 context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
104 context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
118 A convenience function helps create :class:`SSLContext` objects for common
123 Return a new :class:`SSLContext` object with default settings for
126 :class:`SSLContext` constructor directly.
130 :meth:`SSLContext.load_verify_locations`. If all three are
137 as *purpose* sets :data:`~SSLContext.verify_mode` to :data:`CERT_REQUIRED`
[all …]
/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/
DCustomTrust.java32 import javax.net.ssl.SSLContext;
41 SSLContext sslContext = sslContextForTrustedCertificates(trustedCertificatesInputStream()); in CustomTrust()
159 public SSLContext sslContextForTrustedCertificates(InputStream in) { in sslContextForTrustedCertificates()
183 SSLContext sslContext = SSLContext.getInstance("TLS"); in sslContextForTrustedCertificates()
/external/python/cpython3/Lib/test/
Dtest_ssl.py165 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
203 ssl.SSLContext(ssl.PROTOCOL_SSLv2)
220 context = ssl.SSLContext(ssl_version)
246 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
249 server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
289 ctx = ssl.SSLContext(proto)
778 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
929 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
1021 ssl.SSLContext(protocol)
1022 ctx = ssl.SSLContext()
[all …]
/external/grpc-grpc-java/testing/src/main/java/io/grpc/testing/
DTestUtils.java39 import javax.net.ssl.SSLContext;
77 ciphers = SSLContext.getDefault().getDefaultSSLParameters().getCipherSuites();
132 SSLContext context = SSLContext.getInstance("TLS", provider);
/external/okhttp/android/src/test/java/com/squareup/okhttp/internal/
DPlatformTest.java33 import javax.net.ssl.SSLContext;
88 SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); in rootTrustIndex_notNull_viaSocketFactory()
102 SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); in trustManager()
/external/grpc-grpc-java/netty/src/main/java/io/grpc/netty/
DJettyTlsUtil.java22 import javax.net.ssl.SSLContext;
41 SSLContext context = SSLContext.getInstance("TLS"); in checkAlpnAvailability()
/external/python/cpython2/Doc/library/
Dssl.rst54 For more sophisticated applications, the :class:`ssl.SSLContext` class
56 by SSL sockets created through the :meth:`SSLContext.wrap_socket` method.
141 Python 2.7.9, it can be more flexible to use :meth:`SSLContext.wrap_socket`
240 A convenience function helps create :class:`SSLContext` objects for common
245 Return a new :class:`SSLContext` object with default settings for
248 :class:`SSLContext` constructor directly.
252 :meth:`SSLContext.load_verify_locations`. If all three are
259 as *purpose* sets :data:`~SSLContext.verify_mode` to :data:`CERT_REQUIRED`
261 *cadata* is given) or uses :meth:`SSLContext.load_default_certs` to load
270 :class:`SSLContext` and apply the settings yourself.
[all …]

123456