Home
last modified time | relevance | path

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

123

/external/conscrypt/testing/src/main/java/org/conscrypt/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/repackaged/testing/src/main/java/com/android/org/conscrypt/javax/net/ssl/
DSSLConfigurationAsserts.java50 public static void assertSSLContextDefaultConfiguration(SSLContext sslContext) in assertSSLContextDefaultConfiguration() argument
52 SSLParameters defaultParameters = sslContext.getDefaultSSLParameters(); in assertSSLContextDefaultConfiguration()
54 sslContext.getProtocol(), defaultParameters.getProtocols()); in assertSSLContextDefaultConfiguration()
58 SSLParameters supportedParameters = sslContext.getSupportedSSLParameters(); in assertSSLContextDefaultConfiguration()
67 assertSSLSocketFactoryConfigSameAsSSLContext(sslContext.getSocketFactory(), sslContext); in assertSSLContextDefaultConfiguration() local
69 sslContext.getServerSocketFactory(), sslContext); in assertSSLContextDefaultConfiguration() local
70 SSLEngine sslEngine = sslContext.createSSLEngine(); in assertSSLContextDefaultConfiguration()
72 assertSSLEngineConfigSameAsSSLContext(sslEngine, sslContext); in assertSSLContextDefaultConfiguration()
88 SSLSocketFactory sslSocketFactory, SSLContext sslContext) throws IOException { in assertSSLSocketFactoryConfigSameAsSSLContext() argument
89 assertCipherSuitesEqual(sslContext.getDefaultSSLParameters().getCipherSuites(), in assertSSLSocketFactoryConfigSameAsSSLContext()
[all …]
/external/conscrypt/common/src/test/java/org/conscrypt/javax/net/ssl/
DSSLContextTest.java75 SSLContext sslContext = SSLContext.getDefault(); in test_SSLContext_getDefault() local
76 assertNotNull(sslContext); in test_SSLContext_getDefault()
78 sslContext.init(null, null, null); in test_SSLContext_getDefault()
112 SSLContext sslContext = SSLContext.getInstance(protocol); in test_SSLContext_defaultConfiguration() local
114 sslContext.init(null, null, null); in test_SSLContext_defaultConfiguration()
116 SSLConfigurationAsserts.assertSSLContextDefaultConfiguration(sslContext); in test_SSLContext_defaultConfiguration()
124 SSLContext sslContext = SSLContext.getInstance("TLS"); in test_SSLContext_pskOnlyConfiguration_defaultProviderOnly() local
125 sslContext.init(new KeyManager[] { PSKKeyManagerProxy.getConscryptPSKKeyManager( in test_SSLContext_pskOnlyConfiguration_defaultProviderOnly()
132 assertEnabledCipherSuites(expectedCipherSuites, sslContext); in test_SSLContext_pskOnlyConfiguration_defaultProviderOnly()
138 SSLContext sslContext = SSLContext.getInstance("TLS"); in test_SSLContext_x509AndPskConfiguration_defaultProviderOnly() local
[all …]
/external/conscrypt/repackaged/common/src/test/java/com/android/org/conscrypt/javax/net/ssl/
DSSLContextTest.java79 SSLContext sslContext = SSLContext.getDefault(); in test_SSLContext_getDefault() local
80 assertNotNull(sslContext); in test_SSLContext_getDefault()
82 sslContext.init(null, null, null); in test_SSLContext_getDefault()
116 SSLContext sslContext = SSLContext.getInstance(protocol); in test_SSLContext_defaultConfiguration() local
118 sslContext.init(null, null, null); in test_SSLContext_defaultConfiguration()
120 SSLConfigurationAsserts.assertSSLContextDefaultConfiguration(sslContext); in test_SSLContext_defaultConfiguration()
128 SSLContext sslContext = SSLContext.getInstance("TLS"); in test_SSLContext_pskOnlyConfiguration_defaultProviderOnly() local
129 sslContext.init(new KeyManager[] { PSKKeyManagerProxy.getConscryptPSKKeyManager( in test_SSLContext_pskOnlyConfiguration_defaultProviderOnly()
136 assertEnabledCipherSuites(expectedCipherSuites, sslContext); in test_SSLContext_pskOnlyConfiguration_defaultProviderOnly()
142 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/grpc-grpc-java/netty/src/main/java/io/grpc/netty/
DNettyServerBuilder.java78 private SslContext sslContext; field in NettyServerBuilder
193 public NettyServerBuilder sslContext(SslContext sslContext) { in sslContext() argument
194 if (sslContext != null) { in sslContext()
195 checkArgument(sslContext.isServer(), in sslContext()
197 GrpcSslContexts.ensureAlpnAndH2Enabled(sslContext.applicationProtocolNegotiator()); in sslContext()
199 this.sslContext = sslContext; in sslContext()
428 negotiator = sslContext != null ? ProtocolNegotiators.serverTls(sslContext) : in buildTransportServer()
445 sslContext = GrpcSslContexts.forServer(certChain, privateKey).build(); in useTransportSecurity()
456 sslContext = GrpcSslContexts.forServer(certChain, privateKey).build(); in useTransportSecurity()
DNettyChannelBuilder.java77 private SslContext sslContext; field in NettyChannelBuilder
184 public NettyChannelBuilder sslContext(SslContext sslContext) { in sslContext() argument
185 if (sslContext != null) { in sslContext()
186 checkArgument(sslContext.isClient(), in sslContext()
188 GrpcSslContexts.ensureAlpnAndH2Enabled(sslContext.applicationProtocolNegotiator()); in sslContext()
190 this.sslContext = sslContext; in sslContext()
374 SslContext localSslContext = sslContext; in buildTransportFactory()
418 SslContext sslContext) { in createProtocolNegotiatorByType() argument
425 return ProtocolNegotiators.tls(sslContext); in createProtocolNegotiatorByType()
DProtocolNegotiators.java117 public static ProtocolNegotiator serverTls(final SslContext sslContext) {
118 Preconditions.checkNotNull(sslContext, "sslContext");
122 return new ServerTlsHandler(sslContext, handler);
134 private final SslContext sslContext;
136 ServerTlsHandler(SslContext sslContext, GrpcHttp2ConnectionHandler grpcHandler) {
137 this.sslContext = sslContext;
145 SSLEngine sslEngine = sslContext.newEngine(ctx.alloc());
277 public static ProtocolNegotiator tls(SslContext sslContext) {
278 return new TlsNegotiator(sslContext);
283 private final SslContext sslContext;
[all …]
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/
DNettyServerBuilderTest.java43 builder.sslContext(null); in sslContextCanBeNull()
48 SslContext sslContext = mock(SslContext.class); in failIfSslContextIsNotServer() local
49 when(sslContext.isClient()).thenReturn(true); in failIfSslContextIsNotServer()
53 builder.sslContext(sslContext); in failIfSslContextIsNotServer()
DProtocolNegotiatorsTest.java88 private SslContext sslContext; field in ProtocolNegotiatorsTest
96 sslContext = GrpcSslContexts.forServer(serverCert, key) in setUp()
111 ChannelHandler handler = new ServerTlsHandler(sslContext, grpcHandler); in tlsAdapter_exceptionClosesChannel()
123 ChannelHandler handler = new ServerTlsHandler(sslContext, grpcHandler); in tlsHandler_handlerAddedAddsSslHandler()
132 ChannelHandler handler = new ServerTlsHandler(sslContext, grpcHandler); in tlsHandler_userEventTriggeredNonSslEvent()
153 ChannelHandler handler = new ServerTlsHandler(sslContext, grpcHandler); in tlsHandler_userEventTriggeredSslEvent_unsupportedProtocol()
170 ChannelHandler handler = new ServerTlsHandler(sslContext, grpcHandler); in tlsHandler_userEventTriggeredSslEvent_handshakeFailure()
192 ChannelHandler handler = new ServerTlsHandler(sslContext, grpcHandler); in tlsHandler_userEventTriggeredSslEvent_supportedProtocolH2()
215 ChannelHandler handler = new ServerTlsHandler(sslContext, grpcHandler); in tlsHandler_userEventTriggeredSslEvent_supportedProtocolGrpcExp()
231 ChannelHandler handler = new ServerTlsHandler(sslContext, grpcHandler); in engineLog()
DNettyChannelBuilderTest.java127 builder.sslContext(null); in sslContextCanBeNull()
132 SslContext sslContext = mock(SslContext.class); in failIfSslContextIsNotClient() local
138 builder.sslContext(sslContext); in failIfSslContextIsNotClient()
/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/src/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/grpc-grpc-java/interop-testing/src/test/java/io/grpc/testing/integration/
DConcurrencyTest.java196 SslContext sslContext = in newServer() local
203 .sslContext(sslContext) in newServer()
216 SslContext sslContext = in newClientChannel() local
225 .sslContext(sslContext) in newClientChannel()
/external/grpc-grpc-java/interop-testing/src/main/java/io/grpc/testing/integration/
DTestServiceServer.java131 SslContext sslContext = null; in start() local
142 sslContext = in start()
149 .sslContext(sslContext) in start()
/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
518 server.useHttps(sslContext.getSocketFactory(), false); in connectViaHttps()
521 client.client().setSslSocketFactory(sslContext.getSocketFactory()); in connectViaHttps()
532 server.useHttps(sslContext.getSocketFactory(), false); in inspectHandshakeThroughoutRequestLifecycle()
535 client.client().setSslSocketFactory(sslContext.getSocketFactory()); in inspectHandshakeThroughoutRequestLifecycle()
561 server.useHttps(sslContext.getSocketFactory(), false); in connectViaHttpsReusingConnections()
566 SSLSocketFactory clientSocketFactory = sslContext.getSocketFactory(); in connectViaHttpsReusingConnections()
583 server.useHttps(sslContext.getSocketFactory(), false); in connectViaHttpsReusingConnectionsDifferentFactories()
588 client.client().setSslSocketFactory(sslContext.getSocketFactory()); in connectViaHttpsReusingConnectionsDifferentFactories()
603 server.useHttps(sslContext.getSocketFactory(), false); in connectViaHttpsWithSSLFallback()
[all …]
/external/grpc-grpc-java/examples/src/main/java/io/grpc/examples/helloworldtls/
DHelloWorldClientTls.java64 SslContext sslContext) throws SSLException { in HelloWorldClientTls() argument
68 .sslContext(sslContext) in HelloWorldClientTls()
/external/grpc-grpc-java/alts/src/main/java/io/grpc/alts/internal/
DGoogleDefaultProtocolNegotiator.java31 public GoogleDefaultProtocolNegotiator(TsiHandshakerFactory altsFactory, SslContext sslContext) { in GoogleDefaultProtocolNegotiator() argument
33 tlsProtocolNegotiator = ProtocolNegotiators.tls(sslContext); in GoogleDefaultProtocolNegotiator()
/external/grpc-grpc-java/alts/src/main/java/io/grpc/alts/
DGoogleDefaultChannelBuilder.java122 SslContext sslContext; in buildProtocolNegotiator() local
124 sslContext = GrpcSslContexts.forClient().build(); in buildProtocolNegotiator()
129 new GoogleDefaultProtocolNegotiator(altsHandshakerFactory, sslContext); in buildProtocolNegotiator()
/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()
/external/apache-http/android/src/android/net/http/
DHttpsConnection.java81 SSLContext sslContext = SSLContext.getInstance("TLS", "AndroidOpenSSL"); in initializeEngine() local
100 sslContext.init(null, trustManagers, null); in initializeEngine()
101 ((ClientSessionContext) sslContext.getClientSessionContext()).setPersistentCache(cache); in initializeEngine()
104 mSslSocketFactory = sslContext.getSocketFactory(); in initializeEngine()

123