Home
last modified time | relevance | path

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

1234567

/external/conscrypt/common/src/test/java/org/conscrypt/javax/net/ssl/
DSSLContextTest.java53 import javax.net.ssl.SSLContext;
76 SSLContext sslContext = SSLContext.getDefault(); in test_SSLContext_getDefault()
89 SSLContext.setDefault(null); in test_SSLContext_setDefault()
95 SSLContext defaultContext = SSLContext.getDefault(); in test_SSLContext_setDefault()
97 SSLContext oldContext = SSLContext.getDefault(); in test_SSLContext_setDefault()
99 SSLContext newContext = SSLContext.getInstance(protocol); in test_SSLContext_setDefault()
102 SSLContext.setDefault(newContext); in test_SSLContext_setDefault()
103 assertSame(newContext, SSLContext.getDefault()); in test_SSLContext_setDefault()
105 SSLContext.setDefault(defaultContext); in test_SSLContext_setDefault()
110 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/common/src/test/java/com/android/org/conscrypt/javax/net/ssl/
DSSLContextTest.java56 import javax.net.ssl.SSLContext;
80 SSLContext sslContext = SSLContext.getDefault(); in test_SSLContext_getDefault()
93 SSLContext.setDefault(null); in test_SSLContext_setDefault()
99 SSLContext defaultContext = SSLContext.getDefault(); in test_SSLContext_setDefault()
101 SSLContext oldContext = SSLContext.getDefault(); in test_SSLContext_setDefault()
103 SSLContext newContext = SSLContext.getInstance(protocol); in test_SSLContext_setDefault()
106 SSLContext.setDefault(newContext); in test_SSLContext_setDefault()
107 assertSame(newContext, SSLContext.getDefault()); in test_SSLContext_setDefault()
109 SSLContext.setDefault(defaultContext); in test_SSLContext_setDefault()
114 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()
108 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/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/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/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.java58 import javax.net.ssl.SSLContext;
377 static SSLContext newContext(Provider provider) { in newContext()
379 return SSLContext.getInstance("TLS", provider); in newContext()
392 SSLContext jdkContext = newClientSslContext(getJdkProvider()); in getCommonProtocolSuites()
393 SSLContext conscryptContext = newClientSslContext(getConscryptProvider()); in getCommonProtocolSuites()
404 SSLContext jdkContext = newClientSslContext(getJdkProvider()); in getCommonCipherSuites()
405 SSLContext conscryptContext = newClientSslContext(getConscryptProvider()); in getCommonCipherSuites()
411 public static List<String> getSupportedCiphers(SSLContext ctx) { in getSupportedCiphers()
415 public static String[] getSupportedCiphers(SSLContext ctx, Predicate<String> predicate) { in getSupportedCiphers()
421 public static List<String> getSupportedProtocols(SSLContext ctx) { in getSupportedProtocols()
[all …]
/external/conscrypt/testing/src/main/java/org/conscrypt/
DTestUtils.java55 import javax.net.ssl.SSLContext;
372 static SSLContext newContext(Provider provider) { in newContext()
374 return SSLContext.getInstance("TLS", provider); in newContext()
387 SSLContext jdkContext = newClientSslContext(getJdkProvider()); in getCommonProtocolSuites()
388 SSLContext conscryptContext = newClientSslContext(getConscryptProvider()); in getCommonProtocolSuites()
398 SSLContext jdkContext = newClientSslContext(getJdkProvider()); in getCommonCipherSuites()
399 SSLContext conscryptContext = newClientSslContext(getConscryptProvider()); in getCommonCipherSuites()
405 public static List<String> getSupportedCiphers(SSLContext ctx) { in getSupportedCiphers()
409 public static String[] getSupportedCiphers(SSLContext ctx, Predicate<String> predicate) { in getSupportedCiphers()
415 public static List<String> getSupportedProtocols(SSLContext ctx) { in getSupportedProtocols()
[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/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.
77 :meth:`SSLContext.wrap_socket` of an :class:`SSLContext` instance to wrap
101 context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
111 context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
125 A convenience function helps create :class:`SSLContext` objects for common
130 Return a new :class:`SSLContext` object with default settings for
133 :class:`SSLContext` constructor directly.
137 :meth:`SSLContext.load_verify_locations`. If all three are
145 as *purpose* sets :data:`~SSLContext.verify_mode` to :data:`CERT_REQUIRED`
[all …]
/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/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/conscrypt/openjdk/src/test/java/org/conscrypt/
DConscryptTest.java27 import javax.net.ssl.SSLContext;
95 SSLContext context = SSLContext.getInstance("TLS"); in buildProvider()
102 context = SSLContext.getInstance("Default"); in buildProvider()
/external/conscrypt/repackaged/openjdk/src/test/java/com/android/org/conscrypt/
DConscryptTest.java29 import javax.net.ssl.SSLContext;
97 SSLContext context = SSLContext.getInstance("TLS"); in buildProvider()
103 context = SSLContext.getInstance("Default"); in buildProvider()
/external/python/cpython3/Lib/
Dssl.py479 class SSLContext(_SSLContext): class
603 super(SSLContext, SSLContext).minimum_version.__set__(self, value)
611 super(SSLContext, SSLContext).maximum_version.__set__(self, value)
619 super(SSLContext, SSLContext).options.__set__(self, value)
680 super(SSLContext, SSLContext)._msg_callback.__set__(self, None)
713 super(SSLContext, SSLContext)._msg_callback.__set__(self, inner)
725 super(SSLContext, SSLContext).verify_flags.__set__(self, value)
737 super(SSLContext, SSLContext).verify_mode.__set__(self, value)
756 context = SSLContext(PROTOCOL_TLS_CLIENT)
760 context = SSLContext(PROTOCOL_TLS_SERVER)
[all …]
/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/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);

1234567