org.glite.security.trustmanager
Class CRLCertChecker

java.lang.Object
  extended by java.security.cert.PKIXCertPathChecker
      extended by org.glite.security.trustmanager.CRLCertChecker
All Implemented Interfaces:
java.lang.Cloneable

public class CRLCertChecker
extends java.security.cert.PKIXCertPathChecker

The CRLCertChecker is used to check a certificate agaisnt Certificate Revocation Lists (CRLs) and thus determine if the certificate is revoked or not.

Author:
Joni Hahkala Created on April 11, 2002, 4:24 PM

Constructor Summary
CRLCertChecker(java.util.Vector crls, boolean crlRequired)
          Creates a new instance of CRLCertChecker and sets the CRLs to use.
 
Method Summary
 void check(java.security.cert.Certificate certificate, java.util.Collection collection)
          Checks that the certificate is not revoked.
 java.util.Vector getCrls()
          Returns the verctor of crls.
 java.util.Set getSupportedExtensions()
          Returns the Set of supported extensions.
 void init(boolean param)
          This method is used to initialize the checker and to set the direction of checking (forward or reverse).
 boolean isForwardCheckingSupported()
          This method returns true if forward checking is supported.
 void setCrls(java.util.Vector crls)
          Sets the vector of crls to use for crl checking.
 
Methods inherited from class java.security.cert.PKIXCertPathChecker
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRLCertChecker

public CRLCertChecker(java.util.Vector crls,
                      boolean crlRequired)
Creates a new instance of CRLCertChecker and sets the CRLs to use.

Parameters:
crls - the Vector of CRLs to use for checking.
crlRequired - defines if the crls are required or just used if available.
Method Detail

check

public void check(java.security.cert.Certificate certificate,
                  java.util.Collection collection)
           throws java.security.cert.CertPathValidatorException
Checks that the certificate is not revoked.

Specified by:
check in class java.security.cert.PKIXCertPathChecker
Parameters:
certificate - The certificate to check.
collection - The collection of unresolved certificate extensions. Not used.
Throws:
java.security.cert.CertPathValidatorException - Thrown if the certificate is revoked or otherwise malformed or unreadable.

getSupportedExtensions

public java.util.Set getSupportedExtensions()
Returns the Set of supported extensions.

Specified by:
getSupportedExtensions in class java.security.cert.PKIXCertPathChecker
Returns:
returns null, as this checker does not hadle extensions.

init

public void init(boolean param)
          throws java.security.cert.CertPathValidatorException
This method is used to initialize the checker and to set the direction of checking (forward or reverse). As the CRL checking does not care about the direction, this method does nothing.

Specified by:
init in class java.security.cert.PKIXCertPathChecker
Parameters:
param - the direction, not used.
Throws:
java.security.cert.CertPathValidatorException - newer thrown.

isForwardCheckingSupported

public boolean isForwardCheckingSupported()
This method returns true if forward checking is supported. As CRL checking does not care about the direction, true is alwaus returned.

Specified by:
isForwardCheckingSupported in class java.security.cert.PKIXCertPathChecker
Returns:
returns true.

getCrls

public java.util.Vector getCrls()
Returns the verctor of crls.

Returns:
Returns the crls.

setCrls

public void setCrls(java.util.Vector crls)
Sets the vector of crls to use for crl checking.

Parameters:
crls - The crls to set.