Java Code Examples for javax.net.ssl.SSLSocketFactory#getSupportedCipherSuites()
The following examples show how to use
javax.net.ssl.SSLSocketFactory#getSupportedCipherSuites() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SSLUtils.java From ssltest with Apache License 2.0 | 6 votes |
public CustomSSLSocketFactory(SSLSocketFactory base, String[] sslEnabledProtocols, String[] sslCipherSuites) { _base = base; if(null == sslEnabledProtocols) _sslEnabledProtocols = null; else _sslEnabledProtocols = sslEnabledProtocols.clone(); if(null == sslCipherSuites || 0 == sslCipherSuites.length) _sslCipherSuites = base.getDefaultCipherSuites(); else if(1 == sslCipherSuites.length && "ALL".equalsIgnoreCase(sslCipherSuites[0])) _sslCipherSuites = base.getSupportedCipherSuites(); else _sslCipherSuites = sslCipherSuites.clone(); }
Example 2
Source File: SSLManager.java From servicecomb-java-chassis with Apache License 2.0 | 5 votes |
public static SSLSocketFactory createSSLSocketFactory(SSLOption option, SSLCustom custom) { SSLContext context = createSSLContext(option, custom); SSLSocketFactory factory = context.getSocketFactory(); String[] supported = factory.getSupportedCipherSuites(); String[] eanbled = option.getCiphers().split(","); return new SSLSocketFactoryExt(factory, getEnabledCiphers(supported, eanbled), option.getProtocols().split(",")); }
Example 3
Source File: ServiceIdentitySslSocketFactory.java From vespa with Apache License 2.0 | 5 votes |
public ServiceIdentitySslSocketFactory(Supplier<SSLContext> sslContextSupplier) { super(); SSLContext sslContext = sslContextSupplier.get(); SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory(); this.sslContextSupplier = sslContextSupplier; this.defaultCipherSuites = sslSocketFactory.getDefaultCipherSuites(); this.supportedCipherSuites = sslSocketFactory.getSupportedCipherSuites(); this.sslContext = sslContext; this.sslSocketFactory = sslSocketFactory; }