public class X509CertificateHolder extends Object
Constructor and Description |
---|
X509CertificateHolder(byte[] certEncoding)
Create a X509CertificateHolder from the passed in bytes.
|
X509CertificateHolder(X509CertificateStructure x509Certificate)
Create a X509CertificateHolder from the passed in ASN.1 structure.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Set |
getCriticalExtensionOIDs()
Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the
critical extensions contained in this holder's certificate.
|
byte[] |
getEncoded()
Return the ASN.1 encoding of this holder's 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 certificate.
|
X500Name |
getIssuer()
Return the issuer of this certificate.
|
IssuerAndSerialNumber |
getIssuerAndSerialNumber() |
Set |
getNonCriticalExtensionOIDs()
Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the
non-critical extensions contained in this holder's certificate.
|
Date |
getNotAfter()
Return the date after which this certificate is not valid.
|
Date |
getNotBefore()
Return the date before which this 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.
|
X500Name |
getSubject()
Return the subject this certificate is for.
|
SubjectPublicKeyInfo |
getSubjectPublicKeyInfo()
Return the SubjectPublicKeyInfo describing the public key this certificate is carrying.
|
int |
getVersion() |
boolean |
hasExtensions()
Return whether or not the holder's certificate contains extensions.
|
int |
hashCode() |
boolean |
isSignatureValid(ContentVerifierProvider verifierProvider)
Validate the signature on the certificate in this holder.
|
boolean |
isValidOn(Date date)
Return whether or not this certificate is valid on a particular date.
|
X509CertificateStructure |
toASN1Structure()
Return the underlying ASN.1 structure for the certificate in this holder.
|
public X509CertificateHolder(byte[] certEncoding) throws IOException
certEncoding
- BER/DER encoding of the certificate.IOException
- in the event of corrupted data, or an incorrect structure.public X509CertificateHolder(X509CertificateStructure x509Certificate)
x509Certificate
- an ASN.1 Certificate structure.public int getVersion()
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 IssuerAndSerialNumber getIssuerAndSerialNumber()
public BigInteger getSerialNumber()
public X500Name getIssuer()
public X500Name getSubject()
public Date getNotBefore()
public Date getNotAfter()
public SubjectPublicKeyInfo getSubjectPublicKeyInfo()
public X509CertificateStructure toASN1Structure()
public AlgorithmIdentifier getSignatureAlgorithm()
public byte[] getSignature()
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.public byte[] getEncoded() throws IOException
IOException
- if an encoding cannot be generated.Copyright © 2015. All rights reserved.