translateToError() — netty Function Reference
Architecture documentation for the translateToError() function in BoringSSLCertificateVerifyCallback.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0d5e17f0_fb40_7067_6726_34868e4d0460["translateToError()"] 581c64f9_86e3_6d21_7ce3_ec0412545f34["BoringSSLCertificateVerifyCallback"] 0d5e17f0_fb40_7067_6726_34868e4d0460 -->|defined in| 581c64f9_86e3_6d21_7ce3_ec0412545f34 6747e14f_2dd2_2bd1_22f3_cbc64acffb1d["verify()"] 6747e14f_2dd2_2bd1_22f3_cbc64acffb1d -->|calls| 0d5e17f0_fb40_7067_6726_34868e4d0460 style 0d5e17f0_fb40_7067_6726_34868e4d0460 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-classes-quic/src/main/java/io/netty/handler/codec/quic/BoringSSLCertificateVerifyCallback.java lines 98–124
private static int translateToError(Throwable cause) {
if (cause instanceof CertificateRevokedException) {
return BoringSSL.X509_V_ERR_CERT_REVOKED;
}
// The X509TrustManagerImpl uses a Validator which wraps a CertPathValidatorException into
// an CertificateException. So we need to handle the wrapped CertPathValidatorException to be
// able to send the correct alert.
Throwable wrapped = cause.getCause();
while (wrapped != null) {
if (wrapped instanceof CertPathValidatorException) {
CertPathValidatorException ex = (CertPathValidatorException) wrapped;
CertPathValidatorException.Reason reason = ex.getReason();
if (reason == CertPathValidatorException.BasicReason.EXPIRED) {
return BoringSSL.X509_V_ERR_CERT_HAS_EXPIRED;
}
if (reason == CertPathValidatorException.BasicReason.NOT_YET_VALID) {
return BoringSSL.X509_V_ERR_CERT_NOT_YET_VALID;
}
if (reason == CertPathValidatorException.BasicReason.REVOKED) {
return BoringSSL.X509_V_ERR_CERT_REVOKED;
}
}
wrapped = wrapped.getCause();
}
return BoringSSL.X509_V_ERR_UNSPECIFIED;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does translateToError() do?
translateToError() is a function in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/BoringSSLCertificateVerifyCallback.java.
Where is translateToError() defined?
translateToError() is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/BoringSSLCertificateVerifyCallback.java at line 98.
What calls translateToError()?
translateToError() is called by 1 function(s): verify.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free