OpenSslCertificateException Class — netty Architecture
Architecture documentation for the OpenSslCertificateException class in OpenSslCertificateException.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 1d357d80_422f_42a2_590c_4e58672d1fe9["OpenSslCertificateException"] a3e86c94_cb30_8567_df9b_628718dbf1bc["OpenSslCertificateException.java"] 1d357d80_422f_42a2_590c_4e58672d1fe9 -->|defined in| a3e86c94_cb30_8567_df9b_628718dbf1bc 3ed8d00b_fc54_6ee4_6e08_4892caef820e["OpenSslCertificateException()"] 1d357d80_422f_42a2_590c_4e58672d1fe9 -->|method| 3ed8d00b_fc54_6ee4_6e08_4892caef820e e4e74b11_cf3d_ded0_f535_40b39aca0dbf["errorCode()"] 1d357d80_422f_42a2_590c_4e58672d1fe9 -->|method| e4e74b11_cf3d_ded0_f535_40b39aca0dbf a7006d08_4eac_1df3_acaf_590af5ed84eb["checkErrorCode()"] 1d357d80_422f_42a2_590c_4e58672d1fe9 -->|method| a7006d08_4eac_1df3_acaf_590af5ed84eb
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/OpenSslCertificateException.java lines 26–81
public final class OpenSslCertificateException extends CertificateException {
private static final long serialVersionUID = 5542675253797129798L;
private final int errorCode;
/**
* Construct a new exception with the
* <a href="https://www.openssl.org/docs/manmaster/apps/verify.html">error code</a>.
*/
public OpenSslCertificateException(int errorCode) {
this((String) null, errorCode);
}
/**
* Construct a new exception with the msg and
* <a href="https://www.openssl.org/docs/manmaster/apps/verify.html">error code</a> .
*/
public OpenSslCertificateException(String msg, int errorCode) {
super(msg);
this.errorCode = checkErrorCode(errorCode);
}
/**
* Construct a new exception with the msg, cause and
* <a href="https://www.openssl.org/docs/manmaster/apps/verify.html">error code</a> .
*/
public OpenSslCertificateException(String message, Throwable cause, int errorCode) {
super(message, cause);
this.errorCode = checkErrorCode(errorCode);
}
/**
* Construct a new exception with the cause and
* <a href="https://www.openssl.org/docs/manmaster/apps/verify.html">error code</a> .
*/
public OpenSslCertificateException(Throwable cause, int errorCode) {
this(null, cause, errorCode);
}
/**
* Return the <a href="https://www.openssl.org/docs/man1.0.2/apps/verify.html">error code</a> to use.
*/
public int errorCode() {
return errorCode;
}
private static int checkErrorCode(int errorCode) {
// Call OpenSsl.isAvailable() to ensure we try to load the native lib as CertificateVerifier.isValid(...)
// will depend on it. If loading fails we will just skip the validation.
if (OpenSsl.isAvailable() && !CertificateVerifier.isValid(errorCode)) {
throw new IllegalArgumentException("errorCode '" + errorCode +
"' invalid, see https://www.openssl.org/docs/man1.0.2/apps/verify.html.");
}
return errorCode;
}
}
Source
Frequently Asked Questions
What is the OpenSslCertificateException class?
OpenSslCertificateException is a class in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/OpenSslCertificateException.java.
Where is OpenSslCertificateException defined?
OpenSslCertificateException is defined in handler/src/main/java/io/netty/handler/ssl/OpenSslCertificateException.java at line 26.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free