org.glite.security.util
Class FileCRLChecker

java.lang.Object
  extended by org.glite.security.util.RevocationChecker
      extended by org.glite.security.util.FileCRLChecker

public class FileCRLChecker
extends RevocationChecker

The RevocationChecker implementation for checking the certificate revocation against file system storec CRLs with .r0 file ending and CA hash value as file prefix.

Author:
Joni Hahkala

Constructor Summary
FileCRLChecker(java.security.cert.X509Certificate caCert, java.lang.String caBaseFilename, int caNumber, CaseInsensitiveProperties props)
          Generates a new instance of the checker.
 
Method Summary
 void check(java.security.cert.X509Certificate cert)
          Checks the certificate for revocation.
 void checkUpdate()
          If the implementation is file based for example, this will check whether the file has changed and if yes, reloads it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCRLChecker

public FileCRLChecker(java.security.cert.X509Certificate caCert,
                      java.lang.String caBaseFilename,
                      int caNumber,
                      CaseInsensitiveProperties props)
               throws java.security.cert.CertificateException,
                      java.io.IOException
Generates a new instance of the checker.

Parameters:
caCert -
caBaseFilename - the base CA filename that is used to load the crl.
caNumber - the number of ca with the same DN.
props - the properties to use in case they need to be used for flags etc.
Throws:
java.security.cert.CertificateException
java.io.IOException
Method Detail

checkUpdate

public void checkUpdate()
                 throws java.io.IOException,
                        java.security.cert.CertificateException
Description copied from class: RevocationChecker
If the implementation is file based for example, this will check whether the file has changed and if yes, reloads it.

Specified by:
checkUpdate in class RevocationChecker
Throws:
java.io.IOException - if file or network reading fails.
java.security.cert.CertificateException - if e.g. CRL parsing fails.

check

public void check(java.security.cert.X509Certificate cert)
           throws java.io.IOException,
                  java.security.cert.CertificateException,
                  CertificateRevokedException
Description copied from class: RevocationChecker
Checks the certificate for revocation.

Specified by:
check in class RevocationChecker
Parameters:
cert - The certificate to check.
Throws:
java.io.IOException - in case the CRL reading or info loading fails.
java.security.cert.CertificateException - in case CRL is malformed, certificate is malformed or revocation check fails.
CertificateRevokedException