static final class CertificateMessage.GMTLSCertificateConsumer extends Object implements SSLConsumer
| 限定符 | 构造器和说明 |
|---|---|
private |
GMTLSCertificateConsumer() |
| 限定符和类型 | 方法和说明 |
|---|---|
private void |
adjustCerts(X509Certificate[] x509Certs,
HandshakeContext context) |
private static void |
checkClientCerts(ServerHandshakeContext shc,
X509Certificate[] certs) |
(专用程序包) static void |
checkServerCerts(ClientHandshakeContext chc,
X509Certificate[] certs)
Perform client-side checking of server certificates.
|
void |
consume(ConnectionContext context,
ByteBuffer message) |
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. |
private String |
getEndPoint(HandshakeContext context) |
private static Collection<String> |
getSubjectAltNames(Collection<List<?>> subjectAltNames,
int type) |
private static boolean |
isEquivalent(Collection<String> thisSubAltNames,
Collection<String> prevSubAltNames) |
private static boolean |
isIdentityEquivalent(X509Certificate thisCert,
X509Certificate prevCert) |
private void |
onCertificate(ClientHandshakeContext chc,
CertificateMessage.GMTLSCertificateMessage certificateMessage) |
private void |
onCertificate(ServerHandshakeContext shc,
CertificateMessage.GMTLSCertificateMessage certificateMessage) |
public void consume(ConnectionContext context, ByteBuffer message) throws IOException
consume 在接口中 SSLConsumerIOExceptionprivate void onCertificate(ServerHandshakeContext shc, CertificateMessage.GMTLSCertificateMessage certificateMessage) throws IOException
IOExceptionprivate void onCertificate(ClientHandshakeContext chc, CertificateMessage.GMTLSCertificateMessage certificateMessage) throws IOException
IOExceptionprivate void adjustCerts(X509Certificate[] x509Certs, HandshakeContext context) throws SSLException
SSLExceptionprivate String getEndPoint(HandshakeContext context)
private static boolean isIdentityEquivalent(X509Certificate thisCert, X509Certificate prevCert)
private static Collection<String> getSubjectAltNames(Collection<List<?>> subjectAltNames, int type)
private static boolean isEquivalent(Collection<String> thisSubAltNames, Collection<String> prevSubAltNames)
static void checkServerCerts(ClientHandshakeContext chc, X509Certificate[] certs) throws IOException
certs - an array of X509Certificate objects presented
by the server in the ServerCertificate message.IOException - if a failure occurs during validation or
the trust manager associated with the SSLContext is not
an X509ExtendedTrustManager.private static void checkClientCerts(ServerHandshakeContext shc, X509Certificate[] certs) throws IOException
IOExceptionprivate static Alert getCertificateAlert(ClientHandshakeContext chc, CertificateException cexc)
X509TrustManager, determine what TLS alert description
to use.cexc - The exception thrown by the X509TrustManagerCopyright © 2023. All rights reserved.