Package org.apache.tomcat.util.net.jsse
Class JSSESupport
- java.lang.Object
- 
- org.apache.tomcat.util.net.jsse.JSSESupport
 
- 
- All Implemented Interfaces:
- SSLSessionManager,- SSLSupport
 
 public class JSSESupport extends java.lang.Object implements SSLSupport, SSLSessionManager JSSESupport Concrete implementation class for JSSE Support classes. This will only work with JDK 1.2 and up since it depends on JDK 1.2's certificate support- Author:
- EKR, Craig R. McClanahan Parts cribbed from JSSECertCompat Parts cribbed from CertificatesValve
 
- 
- 
Field Summary- 
Fields inherited from interface org.apache.tomcat.util.net.SSLSupportCERTIFICATE_KEY, CIPHER_SUITE_KEY, KEY_SIZE_KEY, PROTOCOL_VERSION_KEY, REQUESTED_CIPHERS_KEY, REQUESTED_PROTOCOL_VERSIONS_KEY, SESSION_ID_KEY, SESSION_MGR
 
- 
 - 
Constructor SummaryConstructors Constructor Description JSSESupport(javax.net.ssl.SSLSession session)Deprecated.This will be removed in Tomcat 10.1.x onwards UseJSSESupport(SSLSession, Map)JSSESupport(javax.net.ssl.SSLSession session, java.util.Map<java.lang.String,java.util.List<java.lang.String>> additionalAttributes)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCipherSuite()The cipher suite being used on this connection.java.lang.IntegergetKeySize()Get the keysize.java.security.cert.X509Certificate[]getPeerCertificateChain()The client certificate chain (if any).java.lang.StringgetProtocol()java.lang.StringgetRequestedCiphers()java.lang.StringgetRequestedProtocols()java.lang.StringgetSessionId()The current session Id.voidinvalidateSession()Invalidate the session this support object is associated with.voidsetSession(javax.net.ssl.SSLSession session)
 
- 
- 
- 
Constructor Detail- 
JSSESupport@Deprecated public JSSESupport(javax.net.ssl.SSLSession session) Deprecated.This will be removed in Tomcat 10.1.x onwards UseJSSESupport(SSLSession, Map)- Parameters:
- session- SSLSession from which information is to be extracted
 
 - 
JSSESupportpublic JSSESupport(javax.net.ssl.SSLSession session, java.util.Map<java.lang.String,java.util.List<java.lang.String>> additionalAttributes)
 
- 
 - 
Method Detail- 
getCipherSuitepublic java.lang.String getCipherSuite() throws java.io.IOExceptionDescription copied from interface:SSLSupportThe cipher suite being used on this connection.- Specified by:
- getCipherSuitein interface- SSLSupport
- Returns:
- The name of the cipher suite as returned by the SSL/TLS implementation
- Throws:
- java.io.IOException- If an error occurs trying to obtain the cipher suite
 
 - 
getPeerCertificateChainpublic java.security.cert.X509Certificate[] getPeerCertificateChain() throws java.io.IOExceptionDescription copied from interface:SSLSupportThe client certificate chain (if any).- Specified by:
- getPeerCertificateChainin interface- SSLSupport
- Returns:
- The certificate chain presented by the client with the peer's certificate first, followed by those of any certificate authorities
- Throws:
- java.io.IOException- If an error occurs trying to obtain the certificate chain
 
 - 
getKeySizepublic java.lang.Integer getKeySize() throws java.io.IOExceptionGet 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.This returns the effective bits for the current cipher suite. - Specified by:
- getKeySizein interface- SSLSupport
- Returns:
- The effective key size for the current cipher suite
- Throws:
- java.io.IOException- If an error occurs trying to obtain the key size
 
 - 
getSessionIdpublic java.lang.String getSessionId() throws java.io.IOExceptionDescription copied from interface:SSLSupportThe current session Id.- Specified by:
- getSessionIdin interface- SSLSupport
- Returns:
- The current SSL/TLS session ID
- Throws:
- java.io.IOException- If an error occurs trying to obtain the session ID
 
 - 
setSessionpublic void setSession(javax.net.ssl.SSLSession session) 
 - 
invalidateSessionpublic void invalidateSession() Invalidate the session this support object is associated with.- Specified by:
- invalidateSessionin interface- SSLSessionManager
 
 - 
getProtocolpublic java.lang.String getProtocol() throws java.io.IOException- Specified by:
- getProtocolin interface- SSLSupport
- Returns:
- the protocol String indicating how the SSL socket was created e.g. TLSv1 or TLSv1.2 etc.
- Throws:
- java.io.IOException- If an error occurs trying to obtain the protocol information from the socket
 
 - 
getRequestedProtocolspublic java.lang.String getRequestedProtocols() throws java.io.IOException- Specified by:
- getRequestedProtocolsin interface- SSLSupport
- Returns:
- the list of SSL/TLS protocol versions requested by the client
- Throws:
- java.io.IOException- If an error occurs trying to obtain the client requested protocol information from the socket
 
 - 
getRequestedCipherspublic java.lang.String getRequestedCiphers() throws java.io.IOException- Specified by:
- getRequestedCiphersin interface- SSLSupport
- Returns:
- the list of SSL/TLS ciphers requested by the client
- Throws:
- java.io.IOException- If an error occurs trying to obtain the client request cipher information from the socket
 
 
- 
 
-