Interface SSLUtil
- All Known Implementing Classes:
- JSSEUtil,- OpenSSLUtil,- SSLUtilBase
public interface SSLUtil
Provides a common interface for 
SSLImplementations to create the necessary JSSE implementation objects for
 TLS connections created via the JSSE API.- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceOptional interface that can be implemented bySSLEngines to indicate that they support ALPN and can provide the protocol agreed with the client.
- 
Method SummaryModifier and TypeMethodDescriptionvoidconfigureSessionContext(SSLSessionContext sslSessionContext) createSSLContext(List<String> negotiableProtocols) static SSLContextcreateSSLContext(SSLContext sslContext, X509KeyManager keyManager, X509TrustManager trustManager) Creates an instance of Tomcat'sSSLContextfrom the provided inputs.String[]The set of enabled ciphers is the intersection of the implemented ciphers and the configured ciphers.String[]The set of enabled protocols is the intersection of the implemented protocols and the configured protocols.
- 
Method Details- 
createSSLContextstatic SSLContext createSSLContext(SSLContext sslContext, X509KeyManager keyManager, X509TrustManager trustManager) Creates an instance of Tomcat'sSSLContextfrom the provided inputs. Typically used when the user wants to provide a pre-configuredjavax.net.ssl.SSLContextinstance. There is no need to callSSLContext.init(KeyManager[], TrustManager[], java.security.SecureRandom)on the returned value.- Parameters:
- sslContext- The JSSE SSL context
- keyManager- The JSSE key manager
- trustManager- The JSSE trust manager
- Returns:
- An instance of Tomcat's SSLContextformed from the provided inputs.
 
- 
createSSLContext- Throws:
- Exception
 
- 
getKeyManagers- Throws:
- Exception
 
- 
getTrustManagers- Throws:
- Exception
 
- 
configureSessionContext
- 
getEnabledProtocolsThe set of enabled protocols is the intersection of the implemented protocols and the configured protocols. If no protocols are explicitly configured, then all of the implemented protocols will be included in the returned array.- Returns:
- The protocols currently enabled and available for clients to select from for the associated connection
- Throws:
- IllegalArgumentException- If there is no intersection between the implemented and configured protocols
 
- 
getEnabledCiphersThe set of enabled ciphers is the intersection of the implemented ciphers and the configured ciphers. If no ciphers are explicitly configured, then the default ciphers will be included in the returned array.The ciphers used during the TLS handshake may be further restricted by the getEnabledProtocols()and the certificates.- Returns:
- The ciphers currently enabled and available for clients to select from for the associated connection
- Throws:
- IllegalArgumentException- If there is no intersection between the implemented and configured ciphers
 
 
-