Package io.undertow.server
Class BasicSSLSessionInfo
- java.lang.Object
-
- io.undertow.server.BasicSSLSessionInfo
-
- All Implemented Interfaces:
SSLSessionInfo
public class BasicSSLSessionInfo extends java.lang.Object implements SSLSessionInfo
Basic SSL session information. This information is generally provided by a front end proxy.- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description BasicSSLSessionInfo(byte[] sessionId, java.lang.String cypherSuite, java.lang.String certificate)
BasicSSLSessionInfo(byte[] sessionId, java.lang.String cypherSuite, java.lang.String certificate, java.lang.Integer keySize)
BasicSSLSessionInfo(java.lang.String sessionId, java.lang.String cypherSuite, java.lang.String certificate)
BasicSSLSessionInfo(java.lang.String sessionId, java.lang.String cypherSuite, java.lang.String certificate, java.lang.Integer keySize)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getCipherSuite()
int
getKeySize()
javax.security.cert.X509Certificate[]
getPeerCertificateChain()
Deprecated.java.security.cert.Certificate[]
getPeerCertificates()
Gets the peer certificates.byte[]
getSessionId()
javax.net.ssl.SSLSession
getSSLSession()
void
renegotiate(HttpServerExchange exchange, org.xnio.SslClientAuthMode sslClientAuthMode)
Renegotiate in a blocking manner.
-
-
-
Constructor Detail
-
BasicSSLSessionInfo
public BasicSSLSessionInfo(byte[] sessionId, java.lang.String cypherSuite, java.lang.String certificate, java.lang.Integer keySize) throws java.security.cert.CertificateException, javax.security.cert.CertificateException
- Parameters:
sessionId
- The SSL session IDcypherSuite
- The cypher suite namecertificate
- A string representation of the client certificatekeySize
- The key-size used by the cypher- Throws:
java.security.cert.CertificateException
- If the client cert could not be decodedjavax.security.cert.CertificateException
- If the client cert could not be decoded
-
BasicSSLSessionInfo
public BasicSSLSessionInfo(byte[] sessionId, java.lang.String cypherSuite, java.lang.String certificate) throws java.security.cert.CertificateException, javax.security.cert.CertificateException
- Parameters:
sessionId
- The SSL session IDcypherSuite
- The cypher suite namecertificate
- A string representation of the client certificate- Throws:
java.security.cert.CertificateException
- If the client cert could not be decodedjavax.security.cert.CertificateException
- If the client cert could not be decoded
-
BasicSSLSessionInfo
public BasicSSLSessionInfo(java.lang.String sessionId, java.lang.String cypherSuite, java.lang.String certificate) throws java.security.cert.CertificateException, javax.security.cert.CertificateException
- Parameters:
sessionId
- The encoded SSL session IDcypherSuite
- The cypher suite namecertificate
- A string representation of the client certificate- Throws:
java.security.cert.CertificateException
- If the client cert could not be decodedjavax.security.cert.CertificateException
- If the client cert could not be decoded
-
BasicSSLSessionInfo
public BasicSSLSessionInfo(java.lang.String sessionId, java.lang.String cypherSuite, java.lang.String certificate, java.lang.Integer keySize) throws java.security.cert.CertificateException, javax.security.cert.CertificateException
- Parameters:
sessionId
- The encoded SSL session IDcypherSuite
- The cypher suite namecertificate
- A string representation of the client certificatekeySize
- The key-size used by the cypher- Throws:
java.security.cert.CertificateException
- If the client cert could not be decodedjavax.security.cert.CertificateException
- If the client cert could not be decoded
-
-
Method Detail
-
getSessionId
public byte[] getSessionId()
- Specified by:
getSessionId
in interfaceSSLSessionInfo
- Returns:
- The SSL session ID, or null if this could not be determined.
-
getCipherSuite
public java.lang.String getCipherSuite()
- Specified by:
getCipherSuite
in interfaceSSLSessionInfo
-
getKeySize
public int getKeySize()
- Specified by:
getKeySize
in interfaceSSLSessionInfo
-
getPeerCertificates
public java.security.cert.Certificate[] getPeerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException
Description copied from interface:SSLSessionInfo
Gets the peer certificates. This may force SSL renegotiation.- Specified by:
getPeerCertificates
in interfaceSSLSessionInfo
- Returns:
- The peer certificates
- Throws:
javax.net.ssl.SSLPeerUnverifiedException
-
getPeerCertificateChain
@Deprecated public javax.security.cert.X509Certificate[] getPeerCertificateChain() throws javax.net.ssl.SSLPeerUnverifiedException
Deprecated.Description copied from interface:SSLSessionInfo
This method is no longer supported on java 15 and should be avoided.- Specified by:
getPeerCertificateChain
in interfaceSSLSessionInfo
- Throws:
javax.net.ssl.SSLPeerUnverifiedException
- See Also:
SSLSession.getPeerCertificateChain()
-
renegotiate
public void renegotiate(HttpServerExchange exchange, org.xnio.SslClientAuthMode sslClientAuthMode) throws java.io.IOException
Description copied from interface:SSLSessionInfo
Renegotiate in a blocking manner. This will set the client aut TODO: we also need a non-blocking version- Specified by:
renegotiate
in interfaceSSLSessionInfo
- Parameters:
exchange
- The exchangesslClientAuthMode
- The client cert mode to use when renegotiating- Throws:
java.io.IOException
-
getSSLSession
public javax.net.ssl.SSLSession getSSLSession()
- Specified by:
getSSLSession
in interfaceSSLSessionInfo
- Returns:
- The SSL session, or null if it is not applicable
-
-