APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.security.ssl

pack-priv final Class CertificateMessage

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, java.nio.ByteBuffer, java.security.PublicKey, java.security.cert.CertPathValidatorException, .CertPathValidatorException.BasicReason, .CertPathValidatorException.Reason, .CertificateEncodingException, .CertificateException, .CertificateFactory, .CertificateParsingException, .X509Certificate, java.text.MessageFormat, java.util.*, javax.net.ssl.SSLEngine, .SSLException, .SSLProtocolException, .SSLSocket, .X509ExtendedTrustManager, .X509TrustManager, javax.security.auth.x500.X500Principal, sun.security.ssl.ClientHello.ClientHelloMessage, .SSLHandshake.HandshakeMessage, .X509Authentication.X509Credentials, .X509Authentication.X509Possession

Pack of the CertificateMessage handshake message.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
CertificateMessage.CertificateEntry

The certificate entry used in Certificate handshake message for TLS 1.3.

pack-priv static class
CertificateMessage.T12CertificateConsumer

The "Certificate" handshake message consumer for TLS 1.2 and previous SSL/TLS protocol versions.

pack-priv static class
CertificateMessage.T12CertificateMessage

The Certificate handshake message for TLS 1.2 and previous SSL/TLS protocol versions.

private static class
CertificateMessage.T12CertificateProducer

The "Certificate" handshake message producer for TLS 1.2 and previous SSL/TLS protocol versions.

private static class
CertificateMessage.T13CertificateConsumer

The "Certificate" handshake message consumer for TLS 1.3.

pack-priv static class
CertificateMessage.T13CertificateMessage

The Certificate handshake message for TLS 1.3.

private static class
CertificateMessage.T13CertificateProducer

The "Certificate" handshake message producer for TLS 1.3.

Field Summary

Modifier and TypeField and Description
pack-priv static final SSLConsumer
pack-priv static final HandshakeProducer
pack-priv static final SSLConsumer
pack-priv static final HandshakeProducer

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static Alert

Returns:

A byte value corresponding to a TLS alert description number.
getCertificateAlert
(ClientHandshakeContext chc, CertificateException
The exception thrown by the X509TrustManager
cexc
)

When a failure happens during certificate checking from an X509TrustManager, determine what TLS alert description to use.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

t12HandshakeConsumerback to summary
pack-priv static final SSLConsumer t12HandshakeConsumer
t12HandshakeProducerback to summary
pack-priv static final HandshakeProducer t12HandshakeProducer
t13HandshakeConsumerback to summary
pack-priv static final SSLConsumer t13HandshakeConsumer
t13HandshakeProducerback to summary
pack-priv static final HandshakeProducer t13HandshakeProducer

Constructor Detail

CertificateMessageback to summary
pack-priv CertificateMessage()

Method Detail

getCertificateAlertback to summary
private static Alert getCertificateAlert(ClientHandshakeContext chc, CertificateException cexc)

When a failure happens during certificate checking from an X509TrustManager, determine what TLS alert description to use.

Parameters
cexc:CertificateException

The exception thrown by the X509TrustManager

Returns:Alert

A byte value corresponding to a TLS alert description number.

sun.security.ssl back to summary

pack-priv final Class CertificateMessage.CertificateEntry

extends Object
Class Inheritance

The certificate entry used in Certificate handshake message for TLS 1.3.

Field Summary

Modifier and TypeField and Description
pack-priv final byte[]
private final SSLExtensions

Constructor Summary

AccessConstructor and Description
pack-priv
CertificateEntry(byte[] encoded, SSLExtensions extensions)

Method Summary

Modifier and TypeMethod and Description
private int
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

encodedback to summary
pack-priv final byte[] encoded
extensionsback to summary
private final SSLExtensions extensions

Constructor Detail

CertificateEntryback to summary
pack-priv CertificateEntry(byte[] encoded, SSLExtensions extensions)

Method Detail

getEncodedSizeback to summary
private int getEncodedSize()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
sun.security.ssl back to summary

pack-priv final Class CertificateMessage.T12CertificateConsumer

extends Object
implements SSLConsumer
Class Inheritance
All Implemented Interfaces
sun.security.ssl.SSLConsumer

The "Certificate" handshake message consumer for TLS 1.2 and previous SSL/TLS protocol versions.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
pack-priv static void
checkServerCerts(ClientHandshakeContext chc, X509Certificate[]
an array of X509Certificate objects presented by the server in the ServerCertificate message.
certs
)

Perform client-side checking of server certificates.

public void
private static Collection<String>
getSubjectAltNames(Collection<List<?>> subjectAltNames, int type)

private static boolean
isEquivalent(Collection<String> thisSubAltNames, Collection<String> prevSubAltNames)

private static boolean
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

T12CertificateConsumerback to summary
private T12CertificateConsumer()

Method Detail

checkClientCertsback to summary
private static void checkClientCerts(ServerHandshakeContext shc, X509Certificate[] certs) throws IOException
checkServerCertsback to summary
pack-priv static void checkServerCerts(ClientHandshakeContext chc, X509Certificate[] certs) throws IOException

Perform client-side checking of server certificates.

Parameters
certs:X509Certificate[]

an array of X509Certificate objects presented by the server in the ServerCertificate message.

Exceptions
IOException:
if a failure occurs during validation or the trust manager associated with the SSLContext is not an X509ExtendedTrustManager.
consumeback to summary
public void consume(ConnectionContext context, ByteBuffer message) throws IOException

Implements sun.security.ssl.SSLConsumer.consume.

Annotations
@Override
getSubjectAltNamesback to summary
private static Collection<String> getSubjectAltNames(Collection<List<?>> subjectAltNames, int type)
isEquivalentback to summary
private static boolean isEquivalent(Collection<String> thisSubAltNames, Collection<String> prevSubAltNames)
isIdentityEquivalentback to summary
private static boolean isIdentityEquivalent(X509Certificate thisCert, X509Certificate prevCert)
onCertificateback to summary
private void onCertificate(ServerHandshakeContext shc, CertificateMessage.T12CertificateMessage certificateMessage) throws IOException
onCertificateback to summary
private void onCertificate(ClientHandshakeContext chc, CertificateMessage.T12CertificateMessage certificateMessage) throws IOException
sun.security.ssl back to summary

pack-priv final Class CertificateMessage.T12CertificateMessage

extends HandshakeMessage
Class Inheritance

The Certificate handshake message for TLS 1.2 and previous SSL/TLS protocol versions. In server mode, the certificate handshake message is sent whenever the agreed-upon key exchange method uses certificates for authentication. In client mode, this message is only sent if the server requests a certificate for client authentication. opaque ASN.1Cert<1..2^24-1>; SSL 3.0: struct { ASN.1Cert certificate_list<1..2^24-1>; } Certificate; Note: For SSL 3.0 client authentication, if no suitable certificate is available, the client should send a no_certificate alert instead. This alert is only a warning; however, the server may respond with a fatal handshake failure alert if client authentication is required. TLS 1.0/1.1/1.2: struct { ASN.1Cert certificate_list<0..2^24-1>; } Certificate;

Field Summary

Modifier and TypeField and Description
pack-priv final List<byte[]>
Inherited from sun.security.ssl.SSLHandshake.HandshakeMessage:
handshakeContext

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public SSLHandshake
public int
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from sun.security.ssl.SSLHandshake.HandshakeMessage:
write

Field Detail

encodedCertChainback to summary
pack-priv final List<byte[]> encodedCertChain

Constructor Detail

T12CertificateMessageback to summary
pack-priv T12CertificateMessage(HandshakeContext handshakeContext, X509Certificate[] certChain) throws SSLException
T12CertificateMessageback to summary
pack-priv T12CertificateMessage(HandshakeContext handshakeContext, ByteBuffer m) throws IOException

Method Detail

handshakeTypeback to summary
public SSLHandshake handshakeType()

Implements abstract sun.security.ssl.SSLHandshake.HandshakeMessage.handshakeType.

Annotations
@Override
messageLengthback to summary
public int messageLength()

Implements abstract sun.security.ssl.SSLHandshake.HandshakeMessage.messageLength.

Annotations
@Override
sendback to summary
public void send(HandshakeOutStream hos) throws IOException

Implements abstract sun.security.ssl.SSLHandshake.HandshakeMessage.send.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
sun.security.ssl back to summary

private final Class CertificateMessage.T12CertificateProducer

extends Object
implements HandshakeProducer
Class Inheritance
All Implemented Interfaces
sun.security.ssl.HandshakeProducer

The "Certificate" handshake message producer for TLS 1.2 and previous SSL/TLS protocol versions.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private byte[]
private byte[]
public byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

T12CertificateProducerback to summary
private T12CertificateProducer()

Method Detail

onProduceCertificateback to summary
private byte[] onProduceCertificate(ServerHandshakeContext shc, SSLHandshake.HandshakeMessage message) throws IOException
onProduceCertificateback to summary
private byte[] onProduceCertificate(ClientHandshakeContext chc, SSLHandshake.HandshakeMessage message) throws IOException
produceback to summary
public byte[] produce(ConnectionContext context, SSLHandshake.HandshakeMessage message) throws IOException

Implements sun.security.ssl.HandshakeProducer.produce.

Annotations
@Override
sun.security.ssl back to summary

private final Class CertificateMessage.T13CertificateConsumer

extends Object
implements SSLConsumer
Class Inheritance
All Implemented Interfaces
sun.security.ssl.SSLConsumer

The "Certificate" handshake message consumer for TLS 1.3.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static X509Certificate[]
private static X509Certificate[]
public void
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

T13CertificateConsumerback to summary
private T13CertificateConsumer()

Method Detail

checkClientCertsback to summary
private static X509Certificate[] checkClientCerts(ServerHandshakeContext shc, List<CertificateMessage.CertificateEntry> certEntries) throws IOException
checkServerCertsback to summary
private static X509Certificate[] checkServerCerts(ClientHandshakeContext chc, List<CertificateMessage.CertificateEntry> certEntries) throws IOException
consumeback to summary
public void consume(ConnectionContext context, ByteBuffer message) throws IOException

Implements sun.security.ssl.SSLConsumer.consume.

Annotations
@Override
onConsumeCertificateback to summary
private void onConsumeCertificate(ServerHandshakeContext shc, CertificateMessage.T13CertificateMessage certificateMessage) throws IOException
onConsumeCertificateback to summary
private void onConsumeCertificate(ClientHandshakeContext chc, CertificateMessage.T13CertificateMessage certificateMessage) throws IOException
sun.security.ssl back to summary

pack-priv final Class CertificateMessage.T13CertificateMessage

extends HandshakeMessage
Class Inheritance

The Certificate handshake message for TLS 1.3.

Field Summary

Modifier and TypeField and Description
private final List<CertificateMessage.CertificateEntry>
private final byte[]
Inherited from sun.security.ssl.SSLHandshake.HandshakeMessage:
handshakeContext

Constructor Summary

AccessConstructor and Description
pack-priv
T13CertificateMessage(HandshakeContext context, byte[] requestContext, X509Certificate[] certificates)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public SSLHandshake
public int
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from sun.security.ssl.SSLHandshake.HandshakeMessage:
write

Field Detail

certEntriesback to summary
private final List<CertificateMessage.CertificateEntry> certEntries
requestContextback to summary
private final byte[] requestContext

Constructor Detail

T13CertificateMessageback to summary
pack-priv T13CertificateMessage(HandshakeContext context, byte[] requestContext, X509Certificate[] certificates) throws SSLException, CertificateException
T13CertificateMessageback to summary
pack-priv T13CertificateMessage(HandshakeContext handshakeContext, ByteBuffer m) throws IOException

Method Detail

handshakeTypeback to summary
public SSLHandshake handshakeType()

Implements abstract sun.security.ssl.SSLHandshake.HandshakeMessage.handshakeType.

Annotations
@Override
messageLengthback to summary
public int messageLength()

Implements abstract sun.security.ssl.SSLHandshake.HandshakeMessage.messageLength.

Annotations
@Override
sendback to summary
public void send(HandshakeOutStream hos) throws IOException

Implements abstract sun.security.ssl.SSLHandshake.HandshakeMessage.send.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
sun.security.ssl back to summary

private final Class CertificateMessage.T13CertificateProducer

extends Object
implements HandshakeProducer
Class Inheritance
All Implemented Interfaces
sun.security.ssl.HandshakeProducer

The "Certificate" handshake message producer for TLS 1.3.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static SSLPossession
private CertificateMessage.T13CertificateMessage
private CertificateMessage.T13CertificateMessage
public byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

T13CertificateProducerback to summary
private T13CertificateProducer()

Method Detail

choosePossessionback to summary
private static SSLPossession choosePossession(HandshakeContext hc, ClientHello.ClientHelloMessage clientHello)
onProduceCertificateback to summary
private CertificateMessage.T13CertificateMessage onProduceCertificate(ServerHandshakeContext shc, SSLHandshake.HandshakeMessage message) throws IOException
onProduceCertificateback to summary
private CertificateMessage.T13CertificateMessage onProduceCertificate(ClientHandshakeContext chc, SSLHandshake.HandshakeMessage message) throws IOException
produceback to summary
public byte[] produce(ConnectionContext context, SSLHandshake.HandshakeMessage message) throws IOException

Implements sun.security.ssl.HandshakeProducer.produce.

Annotations
@Override