All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.security.x509.CertException

java.lang.Object
   |
   +----java.lang.Throwable
           |
           +----java.lang.Exception
                   |
                   +----java.lang.RuntimeException
                           |
                           +----java.lang.SecurityException
                                   |
                                   +----sun.security.x509.CertException

public class CertException
extends SecurityException
CertException indicates one of a variety of certificate problems.

In the future this may be replaced by a family of related exception classes, eliminating the use of the code indicating the specific fault.


Variable Index

 o err_CONSTRUCTION
Indicates an error constructing a certificate or cert chain.
 o err_INVALID_PUBLIC_KEY
Indicates an problem with the public key
 o verf_CA_UNTRUSTED
Indicates that a certificate authority in the certification chain is not trusted.
 o verf_CHAIN_LENGTH
Indicates that the certification chain is too long.
 o verf_INVALID_EXPIRED
Indicates that the certificate has expired and so is not valid.
 o verf_INVALID_NOTBEFORE
Indicates that the certificate is not yet valid.
 o verf_INVALID_REVOKED
Indicates that the certificate was revoked, and so is invalid.
 o verf_INVALID_SIG
Indicates that the signature in the certificate is not valid.
 o verf_PARSE_ERROR
Indicates an error parsing the ASN.1/DER encoding of the certificate.

Constructor Index

 o CertException(int)
Constructs a cert exception using just an error code, without a string describing the context.
 o CertException(int, String)
Constructs a cert exception using an error code (verf_*) and a string describing the context of the error.

Method Index

 o getMoreData()
Returns a string describing the context in which the exception was reported.
 o getVerfCode()
Returns the error code with which the exception was created.
 o getVerfDescription()
Return a string corresponding to the error code used to create this exception.
 o toString()
Returns a string describing the certificate exception.

Variables

 o verf_INVALID_SIG
 public static final int verf_INVALID_SIG
Indicates that the signature in the certificate is not valid.

 o verf_INVALID_REVOKED
 public static final int verf_INVALID_REVOKED
Indicates that the certificate was revoked, and so is invalid.

 o verf_INVALID_NOTBEFORE
 public static final int verf_INVALID_NOTBEFORE
Indicates that the certificate is not yet valid.

 o verf_INVALID_EXPIRED
 public static final int verf_INVALID_EXPIRED
Indicates that the certificate has expired and so is not valid.

 o verf_CA_UNTRUSTED
 public static final int verf_CA_UNTRUSTED
Indicates that a certificate authority in the certification chain is not trusted.

 o verf_CHAIN_LENGTH
 public static final int verf_CHAIN_LENGTH
Indicates that the certification chain is too long.

 o verf_PARSE_ERROR
 public static final int verf_PARSE_ERROR
Indicates an error parsing the ASN.1/DER encoding of the certificate.

 o err_CONSTRUCTION
 public static final int err_CONSTRUCTION
Indicates an error constructing a certificate or cert chain.

 o err_INVALID_PUBLIC_KEY
 public static final int err_INVALID_PUBLIC_KEY
Indicates an problem with the public key

Constructors

 o CertException
 public CertException(int code,
                      String moredata)
Constructs a cert exception using an error code (verf_*) and a string describing the context of the error.

 o CertException
 public CertException(int code)
Constructs a cert exception using just an error code, without a string describing the context.

Methods

 o getVerfCode
 public int getVerfCode()
Returns the error code with which the exception was created.

 o getMoreData
 public String getMoreData()
Returns a string describing the context in which the exception was reported.

 o getVerfDescription
 public String getVerfDescription()
Return a string corresponding to the error code used to create this exception.

 o toString
 public String toString()
Returns a string describing the certificate exception.

Overrides:
toString in class Throwable

All Packages  Class Hierarchy  This Package  Previous  Next  Index