org.jsslutils.sslcontext
Class ReloadableX509CRL

java.lang.Object
  extended by java.security.cert.CRL
      extended by java.security.cert.X509CRL
          extended by org.jsslutils.sslcontext.ReloadableX509CRL
All Implemented Interfaces:
X509Extension

public class ReloadableX509CRL
extends X509CRL

This class is a wrapper for an X509CRL object that allows it to be re-loaded. The Callable obtained with getReloaderCallable() can be put into a ScheduledThreadPoolExecutor, for example. Note that the constructor does not initially download the CRL, so classes uses this should call the callable at least once priori to use.

Author:
Bruno Harbulot (Bruno.Harbulot@manchester.ac.uk)

Constructor Summary
ReloadableX509CRL(String crlUrl)
           
ReloadableX509CRL(String crlUrl, CertificateFactory certificateFactory)
           
 
Method Summary
 Set<String> getCriticalExtensionOIDs()
           
 byte[] getEncoded()
           
 byte[] getExtensionValue(String oid)
           
 Principal getIssuerDN()
           
 Date getNextUpdate()
           
 Set<String> getNonCriticalExtensionOIDs()
           
 Callable<X509CRL> getReloaderCallable()
           
 X509CRLEntry getRevokedCertificate(BigInteger serialNumber)
           
 Set<? extends X509CRLEntry> getRevokedCertificates()
           
 String getSigAlgName()
           
 String getSigAlgOID()
           
 byte[] getSigAlgParams()
           
 byte[] getSignature()
           
 byte[] getTBSCertList()
           
 Date getThisUpdate()
           
 int getVersion()
           
 boolean hasUnsupportedCriticalExtension()
           
 boolean isRevoked(Certificate cert)
           
 String toString()
           
 void verify(PublicKey key)
           
 void verify(PublicKey key, String sigProvider)
           
 
Methods inherited from class java.security.cert.X509CRL
equals, getIssuerX500Principal, getRevokedCertificate, hashCode
 
Methods inherited from class java.security.cert.CRL
getType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReloadableX509CRL

public ReloadableX509CRL(String crlUrl)

ReloadableX509CRL

public ReloadableX509CRL(String crlUrl,
                         CertificateFactory certificateFactory)
Method Detail

getReloaderCallable

public Callable<X509CRL> getReloaderCallable()

getEncoded

public byte[] getEncoded()
                  throws CRLException
Specified by:
getEncoded in class X509CRL
Throws:
CRLException

getIssuerDN

public Principal getIssuerDN()
Specified by:
getIssuerDN in class X509CRL

getNextUpdate

public Date getNextUpdate()
Specified by:
getNextUpdate in class X509CRL

getRevokedCertificate

public X509CRLEntry getRevokedCertificate(BigInteger serialNumber)
Specified by:
getRevokedCertificate in class X509CRL

getRevokedCertificates

public Set<? extends X509CRLEntry> getRevokedCertificates()
Specified by:
getRevokedCertificates in class X509CRL

getSigAlgName

public String getSigAlgName()
Specified by:
getSigAlgName in class X509CRL

getSigAlgOID

public String getSigAlgOID()
Specified by:
getSigAlgOID in class X509CRL

getSigAlgParams

public byte[] getSigAlgParams()
Specified by:
getSigAlgParams in class X509CRL

getSignature

public byte[] getSignature()
Specified by:
getSignature in class X509CRL

getTBSCertList

public byte[] getTBSCertList()
                      throws CRLException
Specified by:
getTBSCertList in class X509CRL
Throws:
CRLException

getThisUpdate

public Date getThisUpdate()
Specified by:
getThisUpdate in class X509CRL

getVersion

public int getVersion()
Specified by:
getVersion in class X509CRL

verify

public void verify(PublicKey key,
                   String sigProvider)
            throws CRLException,
                   NoSuchAlgorithmException,
                   InvalidKeyException,
                   NoSuchProviderException,
                   SignatureException
Specified by:
verify in class X509CRL
Throws:
CRLException
NoSuchAlgorithmException
InvalidKeyException
NoSuchProviderException
SignatureException

verify

public void verify(PublicKey key)
            throws CRLException,
                   NoSuchAlgorithmException,
                   InvalidKeyException,
                   NoSuchProviderException,
                   SignatureException
Specified by:
verify in class X509CRL
Throws:
CRLException
NoSuchAlgorithmException
InvalidKeyException
NoSuchProviderException
SignatureException

getCriticalExtensionOIDs

public Set<String> getCriticalExtensionOIDs()

getExtensionValue

public byte[] getExtensionValue(String oid)

getNonCriticalExtensionOIDs

public Set<String> getNonCriticalExtensionOIDs()

hasUnsupportedCriticalExtension

public boolean hasUnsupportedCriticalExtension()

isRevoked

public boolean isRevoked(Certificate cert)
Specified by:
isRevoked in class CRL

toString

public String toString()
Specified by:
toString in class CRL


Copyright © 2012. All Rights Reserved.