Interface SSLSupport
- All Known Implementing Classes:
JSSESupport
public interface SSLSupport
Defines an interface to interact with SSL sessions.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The Request attribute key for the client certificate chain.static final String
The Request attribute key for the cipher suite.static final String
The Request attribute key for the key size.static final String
Deprecated.static final String
The request attribute key under which the String indicating the ciphers requested by the client are recorded.static final String
The request attribute key under which the String indicating the protocols requested by the client are recorded.static final String
The Request attribute key for the cipher suite.static final String
The Request attribute key for the session id.static final String
The request attribute key for the session manager. -
Method Summary
Modifier and TypeMethodDescriptionThe cipher suite being used on this connection.Get the keysize.default X509Certificate[]
The server certificate chain (if any) that were sent to the peer.The client certificate chain (if any).The current session Id.
-
Field Details
-
SECURE_PROTOCOL_KEY
-
CIPHER_SUITE_KEY
-
KEY_SIZE_KEY
-
CERTIFICATE_KEY
The Request attribute key for the client certificate chain.- See Also:
-
SESSION_ID_KEY
The Request attribute key for the session id. This one is a Tomcat extension to the Servlet spec.- See Also:
-
SESSION_MGR
The request attribute key for the session manager. This one is a Tomcat extension to the Servlet spec.- See Also:
-
PROTOCOL_VERSION_KEY
Deprecated.Replaced bySECURE_PROTOCOL_KEY
. This constant will be removed in Tomcat 12.The request attribute key under which the String indicating the protocol that created the SSL socket is recorded - e.g. TLSv1 or TLSv1.2 etc.- See Also:
-
REQUESTED_CIPHERS_KEY
The request attribute key under which the String indicating the ciphers requested by the client are recorded.- See Also:
-
REQUESTED_PROTOCOL_VERSIONS_KEY
The request attribute key under which the String indicating the protocols requested by the client are recorded.- See Also:
-
-
Method Details
-
getCipherSuite
The cipher suite being used on this connection.- Returns:
- The name of the cipher suite as returned by the SSL/TLS implementation
- Throws:
IOException
- If an error occurs trying to obtain the cipher suite
-
getPeerCertificateChain
The client certificate chain (if any).- Returns:
- The certificate chain presented by the client with the peer's certificate first, followed by those of any certificate authorities
- Throws:
IOException
- If an error occurs trying to obtain the certificate chain
-
getLocalCertificateChain
The server certificate chain (if any) that were sent to the peer.- Returns:
- The certificate chain sent with the server certificate first, followed by those of any certificate authorities
-
getKeySize
Get the keysize. What we're supposed to put here is ill-defined by the Servlet spec (S 4.7 again). There are at least 4 potential values that might go here: (a) The size of the encryption key (b) The size of the MAC key (c) The size of the key-exchange key (d) The size of the signature key used by the server Unfortunately, all of these values are nonsensical.- Returns:
- The effective key size for the current cipher suite
- Throws:
IOException
- If an error occurs trying to obtain the key size
-
getSessionId
The current session Id.- Returns:
- The current SSL/TLS session ID
- Throws:
IOException
- If an error occurs trying to obtain the session ID
-
getProtocol
- Returns:
- the protocol String indicating how the SSL socket was created e.g. TLSv1 or TLSv1.2 etc.
- Throws:
IOException
- If an error occurs trying to obtain the protocol information from the socket
-
getRequestedProtocols
- Returns:
- the list of SSL/TLS protocol versions requested by the client
- Throws:
IOException
- If an error occurs trying to obtain the client requested protocol information from the socket
-
getRequestedCiphers
- Returns:
- the list of SSL/TLS ciphers requested by the client
- Throws:
IOException
- If an error occurs trying to obtain the client request cipher information from the socket
-
SECURE_PROTOCOL_KEY
.