Class CertException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.SecurityException
org.mozilla.jss.netscape.security.x509.CertException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CertParseError
CertException indicates one of a variety of certificate problems.
- Version:
- 1.18
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Indicates an error constructing a certificate or certificate chain.static final int
Indicates a problem with the certificate encodingstatic final int
Indicates a problem with the certificate formatstatic final int
Indicates a problem with the public keystatic final int
Indicates a problem with the certificate versionprivate String
private static final long
static final int
Indicates that a certificate authority in the certification chain is not trusted.static final int
Indicates that the certification chain is too long.static final int
Indicates that the certificate has expired and so is not valid.static final int
Indicates that the certificate is not yet valid.static final int
Indicates that the certificate was revoked, and so is invalid.static final int
Indicates that the signature in the certificate is not valid.static final int
Indicates an error parsing the ASN.1/DER encoding of the certificate.private int
-
Constructor Summary
ConstructorsConstructorDescriptionCertException
(int code) Constructs a certificate exception using just an error code, without a string describing the context.CertException
(int code, String moredata) Constructs a certificate exception using an error code (verf_*
) and a string describing the context of the error. -
Method Summary
Modifier and TypeMethodDescriptionReturns a string describing the certificate exception.Returns a string describing the context in which the exception was reported.int
Returns the error code with which the exception was created.Return a string corresponding to the error code used to create this exception.toString()
Returns a string describing the certificate exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
verf_INVALID_SIG
public static final int verf_INVALID_SIGIndicates that the signature in the certificate is not valid.- See Also:
-
verf_INVALID_REVOKED
public static final int verf_INVALID_REVOKEDIndicates that the certificate was revoked, and so is invalid.- See Also:
-
verf_INVALID_NOTBEFORE
public static final int verf_INVALID_NOTBEFOREIndicates that the certificate is not yet valid.- See Also:
-
verf_INVALID_EXPIRED
public static final int verf_INVALID_EXPIREDIndicates that the certificate has expired and so is not valid.- See Also:
-
verf_CA_UNTRUSTED
public static final int verf_CA_UNTRUSTEDIndicates that a certificate authority in the certification chain is not trusted.- See Also:
-
verf_CHAIN_LENGTH
public static final int verf_CHAIN_LENGTHIndicates that the certification chain is too long.- See Also:
-
verf_PARSE_ERROR
public static final int verf_PARSE_ERRORIndicates an error parsing the ASN.1/DER encoding of the certificate.- See Also:
-
err_CONSTRUCTION
public static final int err_CONSTRUCTIONIndicates an error constructing a certificate or certificate chain.- See Also:
-
err_INVALID_PUBLIC_KEY
public static final int err_INVALID_PUBLIC_KEYIndicates a problem with the public key- See Also:
-
err_INVALID_VERSION
public static final int err_INVALID_VERSIONIndicates a problem with the certificate version- See Also:
-
err_INVALID_FORMAT
public static final int err_INVALID_FORMATIndicates a problem with the certificate format- See Also:
-
err_ENCODING
public static final int err_ENCODINGIndicates a problem with the certificate encoding- See Also:
-
verfCode
private int verfCode -
moreData
-
-
Constructor Details
-
CertException
Constructs a certificate exception using an error code (verf_*
) and a string describing the context of the error. -
CertException
public CertException(int code) Constructs a certificate exception using just an error code, without a string describing the context.
-
-
Method Details
-
getVerfCode
public int getVerfCode()Returns the error code with which the exception was created. -
getMoreData
Returns a string describing the context in which the exception was reported. -
getVerfDescription
Return a string corresponding to the error code used to create this exception. -
toString
Returns a string describing the certificate exception. -
getMessage
Returns a string describing the certificate exception.- Overrides:
getMessage
in classThrowable
-