Class X509V2AttributeCertificate
java.lang.Object
org.gudy.bouncycastle.x509.X509V2AttributeCertificate
- All Implemented Interfaces:
X509Extension, X509AttributeCertificate
An implementation of a version 2 X.509 Attribute Certificate.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcheckValidity(Date date) booleanReturn the attributes contained in the attribute block in the certificate.getAttributes(String oid) Return the attributes with the same type as the passed in oid.byte[]Return an ASN.1 encoded byte array representing the attribute certificate.private SetgetExtensionOIDs(boolean critical) byte[]getExtensionValue(String oid) Return the holder of the certificate.Return the issuer details for the certificate.boolean[]Return the date after which the certificate is not valid.Return the date before which the certificate is not valid.Return the serial number for the certificate.byte[]intReturn the version number for the certificate.inthashCode()booleanfinal void
-
Field Details
-
cert
-
notBefore
-
notAfter
-
-
Constructor Details
-
X509V2AttributeCertificate
- Throws:
IOException
-
X509V2AttributeCertificate
- Throws:
IOException
-
X509V2AttributeCertificate
X509V2AttributeCertificate(AttributeCertificate cert) throws IOException - Throws:
IOException
-
-
Method Details
-
getVersion
public int getVersion()Description copied from interface:X509AttributeCertificateReturn the version number for the certificate.- Specified by:
getVersionin interfaceX509AttributeCertificate- Returns:
- the version number.
-
getSerialNumber
Description copied from interface:X509AttributeCertificateReturn the serial number for the certificate.- Specified by:
getSerialNumberin interfaceX509AttributeCertificate- Returns:
- the serial number.
-
getHolder
Description copied from interface:X509AttributeCertificateReturn the holder of the certificate.- Specified by:
getHolderin interfaceX509AttributeCertificate- Returns:
- the holder.
-
getIssuer
Description copied from interface:X509AttributeCertificateReturn the issuer details for the certificate.- Specified by:
getIssuerin interfaceX509AttributeCertificate- Returns:
- the issuer details.
-
getNotBefore
Description copied from interface:X509AttributeCertificateReturn the date before which the certificate is not valid.- Specified by:
getNotBeforein interfaceX509AttributeCertificate- Returns:
- the "not valid before" date.
-
getNotAfter
Description copied from interface:X509AttributeCertificateReturn the date after which the certificate is not valid.- Specified by:
getNotAfterin interfaceX509AttributeCertificate- Returns:
- the "not valid afer" date.
-
getIssuerUniqueID
public boolean[] getIssuerUniqueID()- Specified by:
getIssuerUniqueIDin interfaceX509AttributeCertificate
-
checkValidity
- Specified by:
checkValidityin interfaceX509AttributeCertificate- Throws:
CertificateExpiredExceptionCertificateNotYetValidException
-
checkValidity
public void checkValidity(Date date) throws CertificateExpiredException, CertificateNotYetValidException - Specified by:
checkValidityin interfaceX509AttributeCertificate- Throws:
CertificateExpiredExceptionCertificateNotYetValidException
-
getSignature
public byte[] getSignature()- Specified by:
getSignaturein interfaceX509AttributeCertificate
-
verify
public final void verify(PublicKey key, String provider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException - Specified by:
verifyin interfaceX509AttributeCertificate- Throws:
CertificateExceptionNoSuchAlgorithmExceptionInvalidKeyExceptionNoSuchProviderExceptionSignatureException
-
getEncoded
Description copied from interface:X509AttributeCertificateReturn an ASN.1 encoded byte array representing the attribute certificate.- Specified by:
getEncodedin interfaceX509AttributeCertificate- Returns:
- an ASN.1 encoded byte array.
- Throws:
IOException- if the certificate cannot be encoded.
-
getExtensionValue
- Specified by:
getExtensionValuein interfaceX509Extension
-
getExtensionOIDs
-
getNonCriticalExtensionOIDs
- Specified by:
getNonCriticalExtensionOIDsin interfaceX509Extension
-
getCriticalExtensionOIDs
- Specified by:
getCriticalExtensionOIDsin interfaceX509Extension
-
hasUnsupportedCriticalExtension
public boolean hasUnsupportedCriticalExtension()- Specified by:
hasUnsupportedCriticalExtensionin interfaceX509Extension
-
getAttributes
Description copied from interface:X509AttributeCertificateReturn the attributes contained in the attribute block in the certificate.- Specified by:
getAttributesin interfaceX509AttributeCertificate- Returns:
- an array of attributes.
-
getAttributes
Description copied from interface:X509AttributeCertificateReturn the attributes with the same type as the passed in oid.- Specified by:
getAttributesin interfaceX509AttributeCertificate- Parameters:
oid- the object identifier we wish to match.- Returns:
- an array of matched attributes, null if there is no match.
-
equals
-
hashCode
-