Top Description Fields Methods
org.apache.tomcat.util.net

public Interface SSLSupport

Known Direct Implementers
org.apache.tomcat.util.net.jsse.JSSESupport
Imports
java.io.IOException, java.security.cert.X509Certificate

Defines an interface to interact with SSL sessions.

Field Summary

Modifier and TypeField and Description
public static final String
CERTIFICATE_KEY

The Request attribute key for the client certificate chain.

public static final String
CIPHER_SUITE_KEY

The Request attribute key for the cipher suite.

public static final String
KEY_SIZE_KEY

The Request attribute key for the key size.

public static final String
PROTOCOL_VERSION_KEY

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.

public static final String
REQUESTED_CIPHERS_KEY

The request attribute key under which the String indicating the ciphers requested by the client are recorded.

public static final String
REQUESTED_PROTOCOL_VERSIONS_KEY

The request attribute key under which the String indicating the protocols requested by the client are recorded.

public static final String
SESSION_ID_KEY

The Request attribute key for the session id. This one is a Tomcat extension to the Servlet spec.

public static final String
SESSION_MGR

The request attribute key for the session manager.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The name of the cipher suite as returned by the SSL/TLS implementation
getCipherSuite
()

The cipher suite being used on this connection.

public Integer

Returns:

The effective key size for the current cipher suite
getKeySize
()

Get the keysize.

public default X509Certificate[]

Returns:

The certificate chain sent with the server certificate first, followed by those of any certificate authorities
getLocalCertificateChain
()

The server certificate chain (if any) that were sent to the peer.

public X509Certificate[]

Returns:

The certificate chain presented by the client with the peer's certificate first, followed by those of any certificate authorities
getPeerCertificateChain
()

The client certificate chain (if any).

public String

Returns:

the protocol String indicating how the SSL socket was created e.g. TLSv1 or TLSv1.2 etc.
getProtocol
()

public String

Returns:

the list of SSL/TLS ciphers requested by the client
getRequestedCiphers
()

public String

Returns:

the list of SSL/TLS protocol versions requested by the client
getRequestedProtocols
()

public String

Returns:

The current SSL/TLS session ID
getSessionId
()

The current session Id.

Field Detail

CERTIFICATE_KEYback to summary
public static final String CERTIFICATE_KEY

The Request attribute key for the client certificate chain.

CIPHER_SUITE_KEYback to summary
public static final String CIPHER_SUITE_KEY

The Request attribute key for the cipher suite.

KEY_SIZE_KEYback to summary
public static final String KEY_SIZE_KEY

The Request attribute key for the key size.

PROTOCOL_VERSION_KEYback to summary
public static final String PROTOCOL_VERSION_KEY

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.

REQUESTED_CIPHERS_KEYback to summary
public static final String REQUESTED_CIPHERS_KEY

The request attribute key under which the String indicating the ciphers requested by the client are recorded.

REQUESTED_PROTOCOL_VERSIONS_KEYback to summary
public static final String REQUESTED_PROTOCOL_VERSIONS_KEY

The request attribute key under which the String indicating the protocols requested by the client are recorded.

SESSION_ID_KEYback to summary
public static final String SESSION_ID_KEY

The Request attribute key for the session id. This one is a Tomcat extension to the Servlet spec.

SESSION_MGRback to summary
public static final String SESSION_MGR

The request attribute key for the session manager. This one is a Tomcat extension to the Servlet spec.

Method Detail

getCipherSuiteback to summary
public String getCipherSuite() throws IOException

The cipher suite being used on this connection.

Returns:String

The name of the cipher suite as returned by the SSL/TLS implementation

Exceptions
IOException:
If an error occurs trying to obtain the cipher suite
getKeySizeback to summary
public Integer getKeySize() throws IOException

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:Integer

The effective key size for the current cipher suite

Exceptions
IOException:
If an error occurs trying to obtain the key size
getLocalCertificateChainback to summary
public default X509Certificate[] getLocalCertificateChain()

The server certificate chain (if any) that were sent to the peer.

Returns:X509Certificate[]

The certificate chain sent with the server certificate first, followed by those of any certificate authorities

getPeerCertificateChainback to summary
public X509Certificate[] getPeerCertificateChain() throws IOException

The client certificate chain (if any).

Returns:X509Certificate[]

The certificate chain presented by the client with the peer's certificate first, followed by those of any certificate authorities

Exceptions
IOException:
If an error occurs trying to obtain the certificate chain
getProtocolback to summary
public String getProtocol() throws IOException
Returns:String

the protocol String indicating how the SSL socket was created e.g. TLSv1 or TLSv1.2 etc.

Exceptions
IOException:
If an error occurs trying to obtain the protocol information from the socket
getRequestedCiphersback to summary
public String getRequestedCiphers() throws IOException
Returns:String

the list of SSL/TLS ciphers requested by the client

Exceptions
IOException:
If an error occurs trying to obtain the client request cipher information from the socket
getRequestedProtocolsback to summary
public String getRequestedProtocols() throws IOException
Returns:String

the list of SSL/TLS protocol versions requested by the client

Exceptions
IOException:
If an error occurs trying to obtain the client requested protocol information from the socket
getSessionIdback to summary
public String getSessionId() throws IOException

The current session Id.

Returns:String

The current SSL/TLS session ID

Exceptions
IOException:
If an error occurs trying to obtain the session ID