public class X509AttributeCertificateHolder extends Object
Constructor and Description |
---|
X509AttributeCertificateHolder(AttributeCertificate attrCert)
Create a X509AttributeCertificateHolder from the passed in ASN.1 structure.
|
X509AttributeCertificateHolder(byte[] certEncoding)
Create a X509AttributeCertificateHolder from the passed in bytes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Attribute[] |
getAttributes()
Return the attributes, if any associated with this request.
|
Attribute[] |
getAttributes(ASN1ObjectIdentifier type)
Return an array of attributes matching the passed in type OID.
|
Set |
getCriticalExtensionOIDs()
Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the
critical extensions contained in this holder's attribute certificate.
|
byte[] |
getEncoded()
Return the ASN.1 encoding of this holder's attribute certificate.
|
X509Extension |
getExtension(ASN1ObjectIdentifier oid)
Look up the extension associated with the passed in OID.
|
List |
getExtensionOIDs()
Returns a list of ASN1ObjectIdentifier objects representing the OIDs of the
extensions contained in this holder's attribute certificate.
|
AttributeCertificateHolder |
getHolder()
Return the holder details for this attribute certificate.
|
AttributeCertificateIssuer |
getIssuer()
Return the issuer details for this attribute certificate.
|
boolean[] |
getIssuerUniqueID() |
Set |
getNonCriticalExtensionOIDs()
Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the
non-critical extensions contained in this holder's attribute certificate.
|
Date |
getNotAfter()
Return the date after which this attribute certificate is not valid.
|
Date |
getNotBefore()
Return the date before which this attribute certificate is not valid.
|
BigInteger |
getSerialNumber()
Return the serial number of this attribute certificate.
|
byte[] |
getSignature()
Return the bytes making up the signature associated with this attribute certificate.
|
AlgorithmIdentifier |
getSignatureAlgorithm()
Return the details of the signature algorithm used to create this attribute certificate.
|
int |
getVersion() |
boolean |
hasExtensions()
Return whether or not the holder's attribute certificate contains extensions.
|
int |
hashCode() |
boolean |
isSignatureValid(ContentVerifierProvider verifierProvider)
Validate the signature on the attribute certificate in this holder.
|
boolean |
isValidOn(Date date)
Return whether or not this attribute certificate is valid on a particular date.
|
AttributeCertificate |
toASN1Structure()
Return the underlying ASN.1 structure for the attribute certificate in this holder.
|
public X509AttributeCertificateHolder(byte[] certEncoding) throws IOException
certEncoding
- BER/DER encoding of the certificate.IOException
- in the event of corrupted data, or an incorrect structure.public X509AttributeCertificateHolder(AttributeCertificate attrCert)
attrCert
- an ASN.1 AttributeCertificate structure.public byte[] getEncoded() throws IOException
IOException
- if an encoding cannot be generated.public int getVersion()
public BigInteger getSerialNumber()
public AttributeCertificateHolder getHolder()
public AttributeCertificateIssuer getIssuer()
public Date getNotBefore()
public Date getNotAfter()
public Attribute[] getAttributes()
public Attribute[] getAttributes(ASN1ObjectIdentifier type)
type
- the type of the attribute being looked for.public boolean hasExtensions()
public X509Extension getExtension(ASN1ObjectIdentifier oid)
oid
- the OID of the extension of interest.public List getExtensionOIDs()
public Set getCriticalExtensionOIDs()
public Set getNonCriticalExtensionOIDs()
public boolean[] getIssuerUniqueID()
public AlgorithmIdentifier getSignatureAlgorithm()
public byte[] getSignature()
public AttributeCertificate toASN1Structure()
public boolean isValidOn(Date date)
date
- the date of interest.public boolean isSignatureValid(ContentVerifierProvider verifierProvider) throws CertException
verifierProvider
- a ContentVerifierProvider that can generate a verifier for the signature.CertException
- if the signature cannot be processed or is inappropriate.Copyright © 2015. All rights reserved.