Home | History | Annotate | Download | only in ssl

Lines Matching refs:SSLContext

27 import javax.net.ssl.SSLContext;
43 * Asserts that the provided {@link SSLContext} has the expected default configuration, and that
48 public static void assertSSLContextDefaultConfiguration(SSLContext sslContext)
50 SSLParameters defaultParameters = sslContext.getDefaultSSLParameters();
52 sslContext.getProtocol(), defaultParameters.getProtocols());
56 SSLParameters supportedParameters = sslContext.getSupportedSSLParameters();
65 assertSSLSocketFactoryConfigSameAsSSLContext(sslContext.getSocketFactory(), sslContext);
67 sslContext.getServerSocketFactory(), sslContext);
68 SSLEngine sslEngine = sslContext.createSSLEngine();
70 assertSSLEngineConfigSameAsSSLContext(sslEngine, sslContext);
78 assertSSLSocketFactoryConfigSameAsSSLContext(sslSocketFactory, SSLContext.getDefault());
81 * Asserts that {@link SSLSocketFactory}'s configuration matches {@code SSLContext}'s
86 SSLSocketFactory sslSocketFactory, SSLContext sslContext) throws IOException {
87 assertCipherSuitesEqual(sslContext.getDefaultSSLParameters().getCipherSuites(),
89 assertCipherSuitesEqual(sslContext.getSupportedSSLParameters().getCipherSuites(),
95 assertSSLSocketConfigSameAsSSLContext(sslSocket, sslContext);
106 assertSSLSocketConfigSameAsSSLContext(sslSocket, SSLContext.getDefault());
109 * Asserts that {@link SSLSocket}'s configuration matches {@code SSLContext's} configuration.
112 SSLSocket sslSocket, SSLContext sslContext) {
114 sslSocket.getSSLParameters(), sslContext.getDefaultSSLParameters());
116 sslContext.getDefaultSSLParameters().getCipherSuites());
118 sslContext.getDefaultSSLParameters().getProtocols());
120 sslContext.getSupportedSSLParameters().getCipherSuites());
122 sslContext.getSupportedSSLParameters().getProtocols());
132 sslServerSocketFactory, SSLContext.getDefault());
135 * Asserts that {@link SSLServerSocketFactory}'s configuration matches {@code SSLContext}'s
141 SSLServerSocketFactory sslServerSocketFactory, SSLContext sslContext)
143 assertCipherSuitesEqual(sslContext.getDefaultSSLParameters().getCipherSuites(),
145 assertCipherSuitesEqual(sslContext.getSupportedSSLParameters().getCipherSuites(),
152 assertSSLServerSocketConfigSameAsSSLContext(sslServerSocket, sslContext);
164 assertSSLServerSocketConfigSameAsSSLContext(sslServerSocket, SSLContext.getDefault());
168 * Asserts that {@link SSLServerSocket}'s configuration matches {@code SSLContext's}
172 SSLServerSocket sslServerSocket, SSLContext sslContext) {
174 sslContext.getDefaultSSLParameters().getCipherSuites());
176 sslContext.getDefaultSSLParameters().getProtocols());
178 sslContext.getSupportedSSLParameters().getCipherSuites());
180 sslContext.getSupportedSSLParameters().getProtocols());
182 sslContext.getDefaultSSLParameters().getNeedClientAuth());
184 sslContext.getDefaultSSLParameters().getWantClientAuth());
192 assertSSLEngineConfigSameAsSSLContext(sslEngine, SSLContext.getDefault());
195 * Asserts that {@link SSLEngine}'s configuration matches {@code SSLContext's} configuration.
198 SSLEngine sslEngine, SSLContext sslContext) {
200 sslEngine.getSSLParameters(), sslContext.getDefaultSSLParameters());
202 sslContext.getDefaultSSLParameters().getCipherSuites());
204 sslContext.getDefaultSSLParameters().getProtocols());
206 sslContext.getSupportedSSLParameters().getCipherSuites());
208 sslContext.getSupportedSSLParameters().getProtocols());