Package org.bouncycastle.x509
Class X509V2AttributeCertificate
java.lang.Object
org.bouncycastle.x509.X509V2AttributeCertificate
- All Implemented Interfaces:
X509Extension,X509AttributeCertificate
public class X509V2AttributeCertificate extends Object implements X509AttributeCertificate
Deprecated.
use org.bouncycastle.cert.X509AttributeCertificateHolder
An implementation of a version 2 X.509 Attribute Certificate.
-
Constructor Summary
Constructors Constructor Description X509V2AttributeCertificate(byte[] encoded)Deprecated.X509V2AttributeCertificate(InputStream encIn)Deprecated. -
Method Summary
Modifier and Type Method Description voidcheckValidity()Deprecated.voidcheckValidity(Date date)Deprecated.booleanequals(Object o)Deprecated.Compares this instance with the specified object and indicates if they are equal.X509Attribute[]getAttributes()Deprecated.Return the attributes contained in the attribute block in the certificate.X509Attribute[]getAttributes(String oid)Deprecated.Return the attributes with the same type as the passed in oid.SetgetCriticalExtensionOIDs()Deprecated.Returns the set of OIDs of the extension(s) marked as CRITICAL, that this implementation manages.byte[]getEncoded()Deprecated.Return an ASN.1 encoded byte array representing the attribute certificate.byte[]getExtensionValue(String oid)Deprecated.Returns the extension value as DER-encoded OCTET string for the specified OID.AttributeCertificateHoldergetHolder()Deprecated.Return the holder of the certificate.AttributeCertificateIssuergetIssuer()Deprecated.Return the issuer details for the certificate.boolean[]getIssuerUniqueID()Deprecated.SetgetNonCriticalExtensionOIDs()Deprecated.Returns the set of OIDs of the extension(s) marked as NON-CRITICAL, that this implementation manages.DategetNotAfter()Deprecated.Return the date after which the certificate is not valid.DategetNotBefore()Deprecated.Return the date before which the certificate is not valid.BigIntegergetSerialNumber()Deprecated.Return the serial number for the certificate.byte[]getSignature()Deprecated.intgetVersion()Deprecated.Return the version number for the certificate.inthashCode()Deprecated.Returns an integer hash code for this object.booleanhasUnsupportedCriticalExtension()Deprecated.Returns whether this instance has an extension marked as CRITICAL that it cannot support.voidverify(PublicKey key, String provider)Deprecated.
-
Constructor Details
-
X509V2AttributeCertificate
Deprecated.- Throws:
IOException
-
X509V2AttributeCertificate
Deprecated.- Throws:
IOException
-
-
Method Details
-
getVersion
public int getVersion()Deprecated.Description copied from interface:X509AttributeCertificateReturn the version number for the certificate.- Specified by:
getVersionin interfaceX509AttributeCertificate- Returns:
- the version number.
-
getSerialNumber
Deprecated.Description copied from interface:X509AttributeCertificateReturn the serial number for the certificate.- Specified by:
getSerialNumberin interfaceX509AttributeCertificate- Returns:
- the serial number.
-
getHolder
Deprecated.Description copied from interface:X509AttributeCertificateReturn the holder of the certificate.- Specified by:
getHolderin interfaceX509AttributeCertificate- Returns:
- the holder.
-
getIssuer
Deprecated.Description copied from interface:X509AttributeCertificateReturn the issuer details for the certificate.- Specified by:
getIssuerin interfaceX509AttributeCertificate- Returns:
- the issuer details.
-
getNotBefore
Deprecated.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
Deprecated.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()Deprecated.- Specified by:
getIssuerUniqueIDin interfaceX509AttributeCertificate
-
checkValidity
Deprecated.- Specified by:
checkValidityin interfaceX509AttributeCertificate- Throws:
CertificateExpiredExceptionCertificateNotYetValidException
-
checkValidity
public void checkValidity(Date date) throws CertificateExpiredException, CertificateNotYetValidExceptionDeprecated.- Specified by:
checkValidityin interfaceX509AttributeCertificate- Throws:
CertificateExpiredExceptionCertificateNotYetValidException
-
getSignature
public byte[] getSignature()Deprecated.- Specified by:
getSignaturein interfaceX509AttributeCertificate
-
verify
public final void verify(PublicKey key, String provider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureExceptionDeprecated.- Specified by:
verifyin interfaceX509AttributeCertificate- Throws:
CertificateExceptionNoSuchAlgorithmExceptionInvalidKeyExceptionNoSuchProviderExceptionSignatureException
-
getEncoded
Deprecated.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
Deprecated.Description copied from interface:X509ExtensionReturns the extension value as DER-encoded OCTET string for the specified OID.- Specified by:
getExtensionValuein interfaceX509Extension- 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.
-
getNonCriticalExtensionOIDs
Deprecated.Description copied from interface:X509ExtensionReturns the set of OIDs of the extension(s) marked as NON-CRITICAL, that this implementation manages.- Specified by:
getNonCriticalExtensionOIDsin interfaceX509Extension- 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.
-
getCriticalExtensionOIDs
Deprecated.Description copied from interface:X509ExtensionReturns the set of OIDs of the extension(s) marked as CRITICAL, that this implementation manages.- Specified by:
getCriticalExtensionOIDsin interfaceX509Extension- Returns:
- the set of extension OIDs marked as CRITIAL, an empty set if none
are marked as CRITICAL, or
nullif no extensions are present.
-
hasUnsupportedCriticalExtension
public boolean hasUnsupportedCriticalExtension()Deprecated.Description copied from interface:X509ExtensionReturns whether this instance has an extension marked as CRITICAL that it cannot support.- Specified by:
hasUnsupportedCriticalExtensionin interfaceX509Extension- Returns:
trueif an unsupported CRITICAL extension is present,falseotherwise.
-
getAttributes
Deprecated.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
Deprecated.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
Deprecated.Description copied from class:ObjectCompares this instance with the specified object and indicates if they are equal. In order to be equal,omust represent the same object as this instance using a class-specific comparison. The general contract is that this comparison should be reflexive, symmetric, and transitive. Also, no object reference other than null is equal to null.The default implementation returns
trueonly ifthis == o. See Writing a correctequalsmethod if you intend implementing your ownequalsmethod.The general contract for the
equalsandObject.hashCode()methods is that ifequalsreturnstruefor any two objects, thenhashCode()must return the same value for these objects. This means that subclasses ofObjectusually override either both methods or neither of them.- Overrides:
equalsin classObject- Parameters:
o- the object to compare this instance with.- Returns:
trueif the specified object is equal to thisObject;falseotherwise.- See Also:
Object.hashCode()
-
hashCode
public int hashCode()Deprecated.Description copied from class:ObjectReturns an integer hash code for this object. By contract, any two objects for whichObject.equals(java.lang.Object)returnstruemust return the same hash code value. This means that subclasses ofObjectusually override both methods or neither method.Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCodemethod if you intend implementing your ownhashCodemethod.- Overrides:
hashCodein classObject- Returns:
- this object's hash code.
- See Also:
Object.equals(java.lang.Object)
-