ice.ssl
Class CertificateErrorInfo

java.lang.Object
  extended byice.ssl.CertificateErrorInfo

public class CertificateErrorInfo
extends Object

Contains informations usefull to efficiently treat and display server certificate errors.

Since:
ICEsecure 1.1
Author:
Jerome Bugnet

Field Summary
static int EXPIRED_DATE
          The certificate is no longer valid.
static int INVALID_SIGNATURE
          The signature is not verified with the CA's public key.
static int NOT_MATCHING_HOST_NAME
          The certificate has been issued for a site that is different from te site you are connecting to.
static int NOT_TRUSTED_CA
          The Certificate Authority that signed this certificate is not trusted.
static int NOT_YET_VALID_DATE
          The certificate is not yet valid.
static int PARSING_ERROR
          An error occured while parsing the certificate.
 
Method Summary
 Object getFaulty()
          The wrong parameter, if relevant.
 int getId()
          Indicates which error has been encountered.
 String getMessage()
          An optional explanation message.
 Object getShouldBe()
          What should be the faulty paramter, if relevant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARSING_ERROR

public static final int PARSING_ERROR
An error occured while parsing the certificate.

See Also:
Constant Field Values

NOT_TRUSTED_CA

public static final int NOT_TRUSTED_CA
The Certificate Authority that signed this certificate is not trusted.
getFaulty() returns the CA's DN - an instance of ice.cert.X500Name.

See Also:
Constant Field Values

INVALID_SIGNATURE

public static final int INVALID_SIGNATURE
The signature is not verified with the CA's public key. This can mean that the certificate has been forged.

See Also:
Constant Field Values

NOT_MATCHING_HOST_NAME

public static final int NOT_MATCHING_HOST_NAME
The certificate has been issued for a site that is different from te site you are connecting to.
getFaulty() returns the certificate's host name - an instance of java.lang.String.
getShouldBe() returns the site's host name - an instance of java.lang.String.

See Also:
Constant Field Values

EXPIRED_DATE

public static final int EXPIRED_DATE
The certificate is no longer valid.
getFaulty() returns the certificate's valid-to date - an instance of java.util.Date.
getShouldBe() returns this computer's date at the time of parsing the certificate - an instance of java.util.Date.

See Also:
Constant Field Values

NOT_YET_VALID_DATE

public static final int NOT_YET_VALID_DATE
The certificate is not yet valid.
getFaulty() returns the certificate's valid-from date - an instance of java.util.Date.
getShouldBe() returns this computer's date at the time of parsing the certificate - an instance of java.util.Date.

See Also:
Constant Field Values
Method Detail

getId

public int getId()
Indicates which error has been encountered. See the public fields for the possible return values.

See Also:
PARSING_ERROR, NOT_TRUSTED_CA, INVALID_SIGNATURE, NOT_MATCHING_HOST_NAME, EXPIRED_DATE, NOT_YET_VALID_DATE

getMessage

public String getMessage()
An optional explanation message.


getFaulty

public Object getFaulty()
The wrong parameter, if relevant. See the public fields to know the class of the returned Object.

See Also:
PARSING_ERROR, NOT_TRUSTED_CA, INVALID_SIGNATURE, NOT_MATCHING_HOST_NAME, EXPIRED_DATE, NOT_YET_VALID_DATE

getShouldBe

public Object getShouldBe()
What should be the faulty paramter, if relevant. See the public fields to know the class of the return Object. This usually returns an object of the same class as getFaulty(). This method may return null even if getFaulty() returns an object, but it never returns an object if getFaulty() does not return an object.

See Also:
PARSING_ERROR, NOT_TRUSTED_CA, INVALID_SIGNATURE, NOT_MATCHING_HOST_NAME, EXPIRED_DATE, NOT_YET_VALID_DATE