Top Description Fields Constructors Methods
io.undertow.server

public Class BasicSSLSessionInfo

extends Object
implements SSLSessionInfo
Class Inheritance
All Implemented Interfaces
io.undertow.server.SSLSessionInfo
Imports
io.undertow.UndertowMessages, io.undertow.util.HexConverter, org.xnio.SslClientAuthMode, javax.net.ssl.SSLPeerUnverifiedException, .SSLSession, javax.security.cert.CertificateException, .X509Certificate, java.io.ByteArrayInputStream, .IOException, java.nio.charset.StandardCharsets, java.util.Collection

Basic SSL session information. This information is generally provided by a front end proxy.
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final X509Certificate[]
certificate

References Deprecated X509Certificate is deprecated or references (maybe indirectly) at least one deprecated element.
private final String
private final Integer
private final Certificate[]
private final byte[]

Constructor Summary

AccessConstructor and Description
public
BasicSSLSessionInfo(byte[]
The SSL session ID
sessionId
,
String
The cypher suite name
cypherSuite
,
String
A string representation of the client certificate
certificate
,
Integer
The key-size used by the cypher
keySize
)

public
BasicSSLSessionInfo(byte[]
The SSL session ID
sessionId
,
String
The cypher suite name
cypherSuite
,
String
A string representation of the client certificate
certificate
)

public
BasicSSLSessionInfo(String
The encoded SSL session ID
sessionId
,
String
The cypher suite name
cypherSuite
,
String
A string representation of the client certificate
certificate
)

public
BasicSSLSessionInfo(String
The encoded SSL session ID
sessionId
,
String
The cypher suite name
cypherSuite
,
String
A string representation of the client certificate
certificate
,
Integer
The key-size used by the cypher
keySize
)

Method Summary

Modifier and TypeMethod and Description
private static byte[]
fromHex(String sessionId)

public String
public int
public X509Certificate[]
getPeerCertificateChain()

Implements io.undertow.server.SSLSessionInfo.getPeerCertificateChain.

Deprecated

This method is no longer supported on java 15 and should be avoided.

public Certificate[]
public byte[]
public SSLSession
public void
renegotiate(HttpServerExchange
The exchange
exchange
,
SslClientAuthMode
The client cert mode to use when renegotiating
sslClientAuthMode
)

Implements io.undertow.server.SSLSessionInfo.renegotiate.

Renegotiate in a blocking manner.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certificateback to summary
private final X509Certificate[] certificate

References Deprecated

X509Certificate is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

cypherSuiteback to summary
private final String cypherSuite
keySizeback to summary
private final Integer keySize
peerCertificateback to summary
private final Certificate[] peerCertificate
sessionIdback to summary
private final byte[] sessionId

Constructor Detail

BasicSSLSessionInfoback to summary
public BasicSSLSessionInfo(byte[] sessionId, String cypherSuite, String certificate, Integer keySize) throws CertificateException, CertificateException
Parameters
sessionId:byte[]

The SSL session ID

cypherSuite:String

The cypher suite name

certificate:String

A string representation of the client certificate

keySize:Integer

The key-size used by the cypher

Exceptions
CertificateException:
  • If the client cert could not be decoded
  • If the client cert could not be decoded
BasicSSLSessionInfoback to summary
public BasicSSLSessionInfo(byte[] sessionId, String cypherSuite, String certificate) throws CertificateException, CertificateException
Parameters
sessionId:byte[]

The SSL session ID

cypherSuite:String

The cypher suite name

certificate:String

A string representation of the client certificate

Exceptions
CertificateException:
  • If the client cert could not be decoded
  • If the client cert could not be decoded
BasicSSLSessionInfoback to summary
public BasicSSLSessionInfo(String sessionId, String cypherSuite, String certificate) throws CertificateException, CertificateException
Parameters
sessionId:String

The encoded SSL session ID

cypherSuite:String

The cypher suite name

certificate:String

A string representation of the client certificate

Exceptions
CertificateException:
  • If the client cert could not be decoded
  • If the client cert could not be decoded
BasicSSLSessionInfoback to summary
public BasicSSLSessionInfo(String sessionId, String cypherSuite, String certificate, Integer keySize) throws CertificateException, CertificateException
Parameters
sessionId:String

The encoded SSL session ID

cypherSuite:String

The cypher suite name

certificate:String

A string representation of the client certificate

keySize:Integer

The key-size used by the cypher

Exceptions
CertificateException:
  • If the client cert could not be decoded
  • If the client cert could not be decoded

Method Detail

fromHexback to summary
private static byte[] fromHex(String sessionId)
getCipherSuiteback to summary
public String getCipherSuite()

Implements io.undertow.server.SSLSessionInfo.getCipherSuite.

Annotations
@Override
getKeySizeback to summary
public int getKeySize()

Overrides default io.undertow.server.SSLSessionInfo.getKeySize.

Annotations
@Override
getPeerCertificateChainback to summary
public X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException

Implements io.undertow.server.SSLSessionInfo.getPeerCertificateChain.

Doc from io.undertow.server.SSLSessionInfo.getPeerCertificateChain.

Deprecated

This method is no longer supported on java 15 and should be avoided.

Annotations
@Deprecated
@Override
getPeerCertificatesback to summary
public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException

Implements io.undertow.server.SSLSessionInfo.getPeerCertificates.

Doc from io.undertow.server.SSLSessionInfo.getPeerCertificates.

Gets the peer certificates. This may force SSL renegotiation.

Returns:Certificate[]

The peer certificates

Annotations
@Override
getSessionIdback to summary
public byte[] getSessionId()

Implements io.undertow.server.SSLSessionInfo.getSessionId.

Returns:byte[]

Doc from io.undertow.server.SSLSessionInfo.getSessionId.

The SSL session ID, or null if this could not be determined.

Annotations
@Override
getSSLSessionback to summary
public SSLSession getSSLSession()

Implements io.undertow.server.SSLSessionInfo.getSSLSession.

Returns:SSLSession

Doc from io.undertow.server.SSLSessionInfo.getSSLSession.

The SSL session, or null if it is not applicable

Annotations
@Override
renegotiateback to summary
public void renegotiate(HttpServerExchange exchange, SslClientAuthMode sslClientAuthMode) throws IOException

Implements io.undertow.server.SSLSessionInfo.renegotiate.

Doc from io.undertow.server.SSLSessionInfo.renegotiate.

Renegotiate in a blocking manner. This will set the client aut

Todo

we also need a non-blocking version

Parameters
exchange:HttpServerExchange

The exchange

sslClientAuthMode:SslClientAuthMode

The client cert mode to use when renegotiating

Annotations
@Override