Package org.bouncycastle.jce.provider
Class X509CRLObject
java.lang.Object
java.security.cert.CRL
java.security.cert.X509CRL
org.bouncycastle.jce.provider.X509CRLObject
- All Implemented Interfaces:
X509Extension
public class X509CRLObject extends X509CRL
The following extensions are listed in RFC 2459 as relevant to CRLs
Authority Key Identifier
Issuer Alternative Name
CRL Number
Delta CRL Indicator (critical)
Issuing Distribution Point (critical)
-
Constructor Summary
Constructors Constructor Description X509CRLObject(CertificateList c) -
Method Summary
Modifier and Type Method Description SetgetCriticalExtensionOIDs()Returns the set of OIDs of the extension(s) marked as CRITICAL, that this implementation manages.byte[]getEncoded()Returns this CRL in ASN.1 DER encoded form.byte[]getExtensionValue(String oid)Returns the extension value as DER-encoded OCTET string for the specified OID.PrincipalgetIssuerDN()Do not use, useX509CRL.getIssuerX500Principal()instead.X500PrincipalgetIssuerX500Principal()Returns the issuer distinguished name of this CRL.DategetNextUpdate()Returns thenextUpdatevalue of this CRL.SetgetNonCriticalExtensionOIDs()Returns the set of OIDs of the extension(s) marked as NON-CRITICAL, that this implementation manages.X509CRLEntrygetRevokedCertificate(BigInteger serialNumber)Returns the CRL entry with the specified certificate serial number.SetgetRevokedCertificates()Returns the set of revoked certificates.StringgetSigAlgName()Returns the name of the signature algorithm.StringgetSigAlgOID()Returns the OID of the signature algorithm.byte[]getSigAlgParams()Returns the parameters of the signature algorithm in DER encoded form.byte[]getSignature()Returns the signature bytes of this CRL.byte[]getTBSCertList()Returns thetbsCertListinformation of this CRL in DER encoded form.DategetThisUpdate()Returns thethisUpdatevalue of this CRL.intgetVersion()Returns the version number of this CRL.booleanhasUnsupportedCriticalExtension()Will return true if any extensions are present and marked as critical as we currently dont handle any extensions!booleanisRevoked(Certificate cert)Checks whether the given certificate is on this CRL.StringtoString()Returns a string representation of this CRL.voidverify(PublicKey key)Verifies this CRL by verifying that this CRL was signed with the corresponding private key to the specified public key.voidverify(PublicKey key, String sigProvider)Verifies this CRL by verifying that this CRL was signed with the corresponding private key to the specified public key.Methods inherited from class java.security.cert.X509CRL
equals, getRevokedCertificate, hashCode
-
Constructor Details
-
X509CRLObject
- Throws:
CRLException
-
-
Method Details
-
hasUnsupportedCriticalExtension
public boolean hasUnsupportedCriticalExtension()Will return true if any extensions are present and marked as critical as we currently dont handle any extensions!- Returns:
trueif an unsupported CRITICAL extension is present,falseotherwise.
-
getCriticalExtensionOIDs
Description copied from interface:X509ExtensionReturns the set of OIDs of the extension(s) marked as CRITICAL, that this implementation manages.- Returns:
- the set of extension OIDs marked as CRITIAL, an empty set if none
are marked as CRITICAL, or
nullif no extensions are present.
-
getNonCriticalExtensionOIDs
Description copied from interface:X509ExtensionReturns the set of OIDs of the extension(s) marked as NON-CRITICAL, that this implementation manages.- Returns:
- the set of extension OIDs marked as NON-CRITIAL, an empty set if
none are marked as NON-.CRITICAL, or
nullif no extensions are present.
-
getExtensionValue
Description copied from interface:X509ExtensionReturns the extension value as DER-encoded OCTET string for the specified OID.- Parameters:
oid- the object identifier to get the extension value for.- Returns:
- the extension value as DER-encoded OCTET string, or
nullif no extension for the specified OID can be found.
-
getEncoded
Description copied from class:X509CRLReturns this CRL in ASN.1 DER encoded form.- Specified by:
getEncodedin classX509CRL- Returns:
- this CRL in ASN.1 DER encoded form.
- Throws:
CRLException- if encoding fails.
-
verify
public void verify(PublicKey key) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureExceptionDescription copied from class:X509CRLVerifies this CRL by verifying that this CRL was signed with the corresponding private key to the specified public key.- Specified by:
verifyin classX509CRL- Parameters:
key- the public key to verify this CRL with.- Throws:
CRLException- if encoding or decoding fails.NoSuchAlgorithmException- if a needed algorithm is not present.InvalidKeyException- if the specified key is invalid.NoSuchProviderException- if no provider can be found.SignatureException- if errors occur on signatures.
-
verify
public void verify(PublicKey key, String sigProvider) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureExceptionDescription copied from class:X509CRLVerifies this CRL by verifying that this CRL was signed with the corresponding private key to the specified public key. The signature verification engine of the specified provider will be used.- Specified by:
verifyin classX509CRL- Parameters:
key- the public key to verify this CRL with.sigProvider- the name of the provider for the signature algorithm.- Throws:
CRLException- if encoding decoding fails.NoSuchAlgorithmException- if a needed algorithm is not present.InvalidKeyException- if the specified key is invalid.NoSuchProviderException- if the specified provider cannot be found.SignatureException- if errors occur on signatures.
-
getVersion
public int getVersion()Description copied from class:X509CRLReturns the version number of this CRL.- Specified by:
getVersionin classX509CRL- Returns:
- the version number of this CRL.
-
getIssuerDN
Description copied from class:X509CRLDo not use, useX509CRL.getIssuerX500Principal()instead. Returns the issuer as an implementation specific Principal object.- Specified by:
getIssuerDNin classX509CRL- Returns:
- the issuer distinguished name.
-
getIssuerX500Principal
Description copied from class:X509CRLReturns the issuer distinguished name of this CRL.- Overrides:
getIssuerX500Principalin classX509CRL- Returns:
- the issuer distinguished name of this CRL.
-
getThisUpdate
Description copied from class:X509CRLReturns thethisUpdatevalue of this CRL.- Specified by:
getThisUpdatein classX509CRL- Returns:
- the
thisUpdatevalue of this CRL.
-
getNextUpdate
Description copied from class:X509CRLReturns thenextUpdatevalue of this CRL.- Specified by:
getNextUpdatein classX509CRL- Returns:
- the
nextUpdatevalue of this CRL, ornullif none is present.
-
getRevokedCertificate
Description copied from class:X509CRLReturns the CRL entry with the specified certificate serial number.- Specified by:
getRevokedCertificatein classX509CRL- Parameters:
serialNumber- the certificate serial number to search for a CRL entry.- Returns:
- the entry for the specified certificate serial number, or
nullif not found.
-
getRevokedCertificates
Description copied from class:X509CRLReturns the set of revoked certificates.- Specified by:
getRevokedCertificatesin classX509CRL- Returns:
- the set of revoked certificates, or
nullif no revoked certificates are in this CRL.
-
getTBSCertList
Description copied from class:X509CRLReturns thetbsCertListinformation of this CRL in DER encoded form.- Specified by:
getTBSCertListin classX509CRL- Returns:
- the CRL information in DER encoded form.
- Throws:
CRLException- if encoding fails.
-
getSignature
public byte[] getSignature()Description copied from class:X509CRLReturns the signature bytes of this CRL.- Specified by:
getSignaturein classX509CRL- Returns:
- the signature bytes of this CRL.
-
getSigAlgName
Description copied from class:X509CRLReturns the name of the signature algorithm.- Specified by:
getSigAlgNamein classX509CRL- Returns:
- the name of the signature algorithm.
-
getSigAlgOID
Description copied from class:X509CRLReturns the OID of the signature algorithm.- Specified by:
getSigAlgOIDin classX509CRL- Returns:
- the OID of the signature algorithm.
-
getSigAlgParams
public byte[] getSigAlgParams()Description copied from class:X509CRLReturns the parameters of the signature algorithm in DER encoded form.- Specified by:
getSigAlgParamsin classX509CRL- Returns:
- the parameters of the signature algorithm in DER encoded form, or
nullif not present.
-
toString
Returns a string representation of this CRL. -
isRevoked
Checks whether the given certificate is on this CRL.
-