APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.net.http.common

public Class ImmutableExtendedSSLSession

extends ExtendedSSLSession
Class Inheritance
Imports
java.security.Principal, java.util.List, javax.net.ssl.ExtendedSSLSession, .SSLSessionContext, .SSLPeerUnverifiedException, .SNIServerName

All mutating methods throw UnsupportedOperationException

Field Summary

Modifier and TypeField and Description
private final ExtendedSSLSession

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
getApplicationBufferSize()

Implements javax.net.ssl.SSLSession.getApplicationBufferSize.

Gets the current size of the largest application data that is expected when using this session.

public String
getCipherSuite()

Implements javax.net.ssl.SSLSession.getCipherSuite.

Returns the name of the SSL cipher suite which is used for all connections in the session.

public long
getCreationTime()

Implements javax.net.ssl.SSLSession.getCreationTime.

Returns the time at which this Session representation was created, in milliseconds since midnight, January 1, 1970 UTC.

public byte[]
getId()

Implements javax.net.ssl.SSLSession.getId.

Returns the identifier assigned to this Session.

public long
getLastAccessedTime()

Implements javax.net.ssl.SSLSession.getLastAccessedTime.

Returns the last time this Session representation was accessed by the session level infrastructure, in milliseconds since midnight, January 1, 1970 UTC.

public Certificate[]
getLocalCertificates()

Implements javax.net.ssl.SSLSession.getLocalCertificates.

Returns the certificate(s) that were sent to the peer during handshaking.

public Principal
getLocalPrincipal()

Implements javax.net.ssl.SSLSession.getLocalPrincipal.

Returns the principal that was sent to the peer during handshaking.

public String[]
getLocalSupportedSignatureAlgorithms()

Implements abstract javax.net.ssl.ExtendedSSLSession.getLocalSupportedSignatureAlgorithms.

Obtains an array of supported signature algorithms that the local side is willing to use.

public int
getPacketBufferSize()

Implements javax.net.ssl.SSLSession.getPacketBufferSize.

Gets the current size of the largest SSL/TLS/DTLS packet that is expected when using this session.

public Certificate[]
getPeerCertificates()

Implements javax.net.ssl.SSLSession.getPeerCertificates.

Returns the identity of the peer which was established as part of defining the session.

public String
getPeerHost()

Implements javax.net.ssl.SSLSession.getPeerHost.

Returns the host name of the peer in this session.

public int
getPeerPort()

Implements javax.net.ssl.SSLSession.getPeerPort.

Returns the port number of the peer in this session.

public Principal
getPeerPrincipal()

Implements javax.net.ssl.SSLSession.getPeerPrincipal.

Returns the identity of the peer which was established as part of defining the session.

public String[]
getPeerSupportedSignatureAlgorithms()

Implements abstract javax.net.ssl.ExtendedSSLSession.getPeerSupportedSignatureAlgorithms.

Obtains an array of supported signature algorithms that the peer is able to use.

public String
getProtocol()

Implements javax.net.ssl.SSLSession.getProtocol.

Returns the standard name of the protocol used for all connections in the session.

public List<SNIServerName>
getRequestedServerNames()

Overrides javax.net.ssl.ExtendedSSLSession.getRequestedServerNames.

Obtains a List containing all SNIServerNames of the requested Server Name Indication (SNI) extension.

public SSLSessionContext
getSessionContext()

Implements javax.net.ssl.SSLSession.getSessionContext.

Returns the context in which this session is bound.

public List<byte[]>
getStatusResponses()

Overrides javax.net.ssl.ExtendedSSLSession.getStatusResponses.

Returns a List containing DER-encoded OCSP responses (using the ASN.1 type OCSPResponse defined in RFC 6960) for the client to verify status of the server's certificate during handshaking.

public Object
getValue(String name)

Implements javax.net.ssl.SSLSession.getValue.

Returns the object bound to the given name in the session's application layer data.

public String[]
getValueNames()

Implements javax.net.ssl.SSLSession.getValueNames.

Returns an array of the names of all the application layer data objects bound into the Session.

public void
invalidate()

Implements javax.net.ssl.SSLSession.invalidate.

Invalidates the session.

public boolean
isValid()

Implements javax.net.ssl.SSLSession.isValid.

Returns whether this session is valid and available for resuming or joining.

public void
putValue(String name, Object value)

Implements javax.net.ssl.SSLSession.putValue.

Binds the specified value object into the session's application layer data with the given name.

public void
removeValue(String name)

Implements javax.net.ssl.SSLSession.removeValue.

Removes the object bound to the given name in the session's application layer data.

Inherited from javax.net.ssl.ExtendedSSLSession:
exportKeyingMaterialDataexportKeyingMaterialKey

Field Detail

delegateback to summary
private final ExtendedSSLSession delegate

Constructor Detail

ImmutableExtendedSSLSessionback to summary
pack-priv ImmutableExtendedSSLSession(ExtendedSSLSession session)

Method Detail

getApplicationBufferSizeback to summary
public int getApplicationBufferSize()

Implements javax.net.ssl.SSLSession.getApplicationBufferSize.

Doc from javax.net.ssl.SSLSession.getApplicationBufferSize.

Gets the current size of the largest application data that is expected when using this session.

SSLEngine application data buffers must be large enough to hold the application data from any inbound network application data packet received. Typically, outbound application data buffers can be of any size.

getCipherSuiteback to summary
public String getCipherSuite()

Implements javax.net.ssl.SSLSession.getCipherSuite.

Doc from javax.net.ssl.SSLSession.getCipherSuite.

Returns the name of the SSL cipher suite which is used for all connections in the session.

This defines the level of protection provided to the data sent on the connection, including the kind of encryption used and most aspects of how authentication is done.

getCreationTimeback to summary
public long getCreationTime()

Implements javax.net.ssl.SSLSession.getCreationTime.

Doc from javax.net.ssl.SSLSession.getCreationTime.

Returns the time at which this Session representation was created, in milliseconds since midnight, January 1, 1970 UTC.

getIdback to summary
public byte[] getId()

Implements javax.net.ssl.SSLSession.getId.

Doc from javax.net.ssl.SSLSession.getId.

Returns the identifier assigned to this Session.

getLastAccessedTimeback to summary
public long getLastAccessedTime()

Implements javax.net.ssl.SSLSession.getLastAccessedTime.

Doc from javax.net.ssl.SSLSession.getLastAccessedTime.

Returns the last time this Session representation was accessed by the session level infrastructure, in milliseconds since midnight, January 1, 1970 UTC.

Access indicates a new connection being established using session data. Application level operations, such as getting or setting a value associated with the session, are not reflected in this access time.

This information is particularly useful in session management policies. For example, a session manager thread could leave all sessions in a given context which haven't been used in a long time; or, the sessions might be sorted according to age to optimize some task.

getLocalCertificatesback to summary
public Certificate[] getLocalCertificates()

Implements javax.net.ssl.SSLSession.getLocalCertificates.

Doc from javax.net.ssl.SSLSession.getLocalCertificates.

Returns the certificate(s) that were sent to the peer during handshaking.

Note

This method is useful only when using certificate-based cipher suites.

When multiple certificates are available for use in a handshake, the implementation chooses what it considers the "best" certificate chain available, and transmits that to the other side. This method allows the caller to know which certificate chain was actually used.

getLocalPrincipalback to summary
public Principal getLocalPrincipal()

Implements javax.net.ssl.SSLSession.getLocalPrincipal.

Doc from javax.net.ssl.SSLSession.getLocalPrincipal.

Returns the principal that was sent to the peer during handshaking.

getLocalSupportedSignatureAlgorithmsback to summary
public String[] getLocalSupportedSignatureAlgorithms()

Implements abstract javax.net.ssl.ExtendedSSLSession.getLocalSupportedSignatureAlgorithms.

Doc from javax.net.ssl.ExtendedSSLSession.getLocalSupportedSignatureAlgorithms.

Obtains an array of supported signature algorithms that the local side is willing to use.

Note

this method is used to indicate to the peer which signature algorithms may be used for digital signatures in TLS/DTLS 1.2. It is not meaningful for TLS/DTLS versions prior to 1.2.

The signature algorithm name must be a standard Java Security name (such as "SHA1withRSA", "SHA256withECDSA", and so on). See the Java Security Standard Algorithm Names document for information about standard algorithm names.

Note

the local supported signature algorithms should conform to the algorithm constraints specified by getAlgorithmConstraints() method in SSLParameters.

getPacketBufferSizeback to summary
public int getPacketBufferSize()

Implements javax.net.ssl.SSLSession.getPacketBufferSize.

Doc from javax.net.ssl.SSLSession.getPacketBufferSize.

Gets the current size of the largest SSL/TLS/DTLS packet that is expected when using this session.

An SSLEngine using this session may generate SSL/TLS/DTLS packets of any size up to and including the value returned by this method. All SSLEngine network buffers should be sized at least this large to avoid insufficient space problems when performing wrap and unwrap calls.

getPeerCertificatesback to summary
public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException

Implements javax.net.ssl.SSLSession.getPeerCertificates.

Doc from javax.net.ssl.SSLSession.getPeerCertificates.

Returns the identity of the peer which was established as part of defining the session.

Note

This method can be used only when using certificate-based cipher suites; using it with non-certificate-based cipher suites, such as Kerberos, will throw an SSLPeerUnverifiedException.

Note

The returned value may not be a valid certificate chain and should not be relied on for trust decisions.

Exceptions
SSLPeerUnverifiedException:
if the peer's identity has not been verified
getPeerHostback to summary
public String getPeerHost()

Implements javax.net.ssl.SSLSession.getPeerHost.

Doc from javax.net.ssl.SSLSession.getPeerHost.

Returns the host name of the peer in this session.

For the server, this is the client's host; and for the client, it is the server's host. The name may not be a fully qualified host name or even a host name at all as it may represent a string encoding of the peer's network address. If such a name is desired, it might be resolved through a name service based on the value returned by this method.

This value is not authenticated and should not be relied upon. It is mainly used as a hint for SSLSession caching strategies.

getPeerPortback to summary
public int getPeerPort()

Implements javax.net.ssl.SSLSession.getPeerPort.

Doc from javax.net.ssl.SSLSession.getPeerPort.

Returns the port number of the peer in this session.

For the server, this is the client's port number; and for the client, it is the server's port number.

This value is not authenticated and should not be relied upon. It is mainly used as a hint for SSLSession caching strategies.

getPeerPrincipalback to summary
public Principal getPeerPrincipal() throws SSLPeerUnverifiedException

Implements javax.net.ssl.SSLSession.getPeerPrincipal.

Doc from javax.net.ssl.SSLSession.getPeerPrincipal.

Returns the identity of the peer which was established as part of defining the session.

Exceptions
SSLPeerUnverifiedException:
if the peer's identity has not been verified
getPeerSupportedSignatureAlgorithmsback to summary
public String[] getPeerSupportedSignatureAlgorithms()

Implements abstract javax.net.ssl.ExtendedSSLSession.getPeerSupportedSignatureAlgorithms.

Doc from javax.net.ssl.ExtendedSSLSession.getPeerSupportedSignatureAlgorithms.

Obtains an array of supported signature algorithms that the peer is able to use.

Note

this method is used to indicate to the local side which signature algorithms may be used for digital signatures in TLS/DTLS 1.2. It is not meaningful for TLS/DTLS versions prior to 1.2.

The signature algorithm name must be a standard Java Security name (such as "SHA1withRSA", "SHA256withECDSA", and so on). See the Java Security Standard Algorithm Names document for information about standard algorithm names.

getProtocolback to summary
public String getProtocol()

Implements javax.net.ssl.SSLSession.getProtocol.

Doc from javax.net.ssl.SSLSession.getProtocol.

Returns the standard name of the protocol used for all connections in the session.

This defines the protocol used in the connection.

getRequestedServerNamesback to summary
public List<SNIServerName> getRequestedServerNames()

Overrides javax.net.ssl.ExtendedSSLSession.getRequestedServerNames.

Doc from javax.net.ssl.ExtendedSSLSession.getRequestedServerNames.

Obtains a List containing all SNIServerNames of the requested Server Name Indication (SNI) extension.

In server mode, unless the return List is empty, the server should use the requested server names to guide its selection of an appropriate authentication certificate, and/or other aspects of security policy.

In client mode, unless the return List is empty, the client should use the requested server names to guide its endpoint identification of the peer's identity, and/or other aspects of security policy.

getSessionContextback to summary
public SSLSessionContext getSessionContext()

Implements javax.net.ssl.SSLSession.getSessionContext.

Doc from javax.net.ssl.SSLSession.getSessionContext.

Returns the context in which this session is bound.

This context may be unavailable in some environments, in which case this method returns null.

getStatusResponsesback to summary
public List<byte[]> getStatusResponses()

Overrides javax.net.ssl.ExtendedSSLSession.getStatusResponses.

Doc from javax.net.ssl.ExtendedSSLSession.getStatusResponses.

Returns a List containing DER-encoded OCSP responses (using the ASN.1 type OCSPResponse defined in RFC 6960) for the client to verify status of the server's certificate during handshaking.

This method only applies to certificate-based server authentication. An X509ExtendedTrustManager will use the returned value for server certificate validation.

getValueback to summary
public Object getValue(String name)

Implements javax.net.ssl.SSLSession.getValue.

Doc from javax.net.ssl.SSLSession.getValue.

Returns the object bound to the given name in the session's application layer data. Returns null if there is no such binding.

getValueNamesback to summary
public String[] getValueNames()

Implements javax.net.ssl.SSLSession.getValueNames.

Doc from javax.net.ssl.SSLSession.getValueNames.

Returns an array of the names of all the application layer data objects bound into the Session.

invalidateback to summary
public void invalidate()

Implements javax.net.ssl.SSLSession.invalidate.

Doc from javax.net.ssl.SSLSession.invalidate.

Invalidates the session.

Future connections will not be able to resume or join this session. However, any existing connection using this session can continue to use the session until the connection is closed.

isValidback to summary
public boolean isValid()

Implements javax.net.ssl.SSLSession.isValid.

Doc from javax.net.ssl.SSLSession.isValid.

Returns whether this session is valid and available for resuming or joining.

putValueback to summary
public void putValue(String name, Object value)

Implements javax.net.ssl.SSLSession.putValue.

Doc from javax.net.ssl.SSLSession.putValue.

Binds the specified value object into the session's application layer data with the given name.

Any existing binding using the same name is replaced. If the new (or existing) value implements the SSLSessionBindingListener interface, the object represented by value is notified appropriately.

removeValueback to summary
public void removeValue(String name)

Implements javax.net.ssl.SSLSession.removeValue.

Doc from javax.net.ssl.SSLSession.removeValue.

Removes the object bound to the given name in the session's application layer data. Does nothing if there is no object bound to the given name. If the bound existing object implements the SSLSessionBindingListener interface, it is notified appropriately.