gnu.crypto.pki

Class X509CertificateImpl

public class X509CertificateImpl extends X509Certificate implements Serializable, GnuPKIExtension

An implementation of X.509 certificates.

Author: Casey Marshall (rsdio@metastatic.org)

Field Summary
protected OIDalgId
protected byte[]algVal
protected byte[]encoded
protected Mapextensions
protected X500Nameissuer
protected BitStringissuerUniqueId
protected static OIDID_DSA
protected static OIDID_DSA_WITH_SHA1
protected static OIDID_ECDSA_WITH_SHA1
protected static OIDID_RSA
protected static OIDID_RSA_WITH_MD2
protected static OIDID_RSA_WITH_MD5
protected static OIDID_RSA_WITH_SHA1
protected DatenotAfter
protected DatenotBefore
protected BigIntegerserialNo
protected OIDsigAlgId
protected byte[]sigAlgVal
protected byte[]signature
protected X500Namesubject
protected PublicKeysubjectKey
protected BitStringsubjectUniqueId
protected byte[]tbsCertBytes
protected intversion
Constructor Summary
X509CertificateImpl(InputStream encoded)
Create a new X.509 certificate from the encoded data.
protected X509CertificateImpl()
Method Summary
voidcheckValidity()
voidcheckValidity(Date date)
booleanequals(Object other)
intgetBasicConstraints()
SetgetCriticalExtensionOIDs()
byte[]getEncoded()
ListgetExtendedKeyUsage()
ExtensiongetExtension(OID oid)
CollectiongetExtensions()
byte[]getExtensionValue(String oid)
CollectiongetIssuerAlternativeNames()
PrincipalgetIssuerDN()
boolean[]getIssuerUniqueID()
X500PrincipalgetIssuerX500Principal()
boolean[]getKeyUsage()
SetgetNonCriticalExtensionOIDs()
DategetNotAfter()
DategetNotBefore()
PublicKeygetPublicKey()
BigIntegergetSerialNumber()
StringgetSigAlgName()
StringgetSigAlgOID()
byte[]getSigAlgParams()
byte[]getSignature()
CollectiongetSubjectAlternativeNames()
PrincipalgetSubjectDN()
boolean[]getSubjectUniqueID()
X500PrincipalgetSubjectX500Principal()
byte[]getTBSCertificate()
intgetVersion()
booleanhasUnsupportedCriticalExtension()
StringtoString()
voidverify(PublicKey key)
voidverify(PublicKey key, String provider)

Field Detail

algId

protected transient OID algId

algVal

protected transient byte[] algVal

encoded

protected transient byte[] encoded

extensions

protected transient Map extensions

issuer

protected transient X500Name issuer

issuerUniqueId

protected transient BitString issuerUniqueId

ID_DSA

protected static final OID ID_DSA

ID_DSA_WITH_SHA1

protected static final OID ID_DSA_WITH_SHA1

ID_ECDSA_WITH_SHA1

protected static final OID ID_ECDSA_WITH_SHA1

ID_RSA

protected static final OID ID_RSA

ID_RSA_WITH_MD2

protected static final OID ID_RSA_WITH_MD2

ID_RSA_WITH_MD5

protected static final OID ID_RSA_WITH_MD5

ID_RSA_WITH_SHA1

protected static final OID ID_RSA_WITH_SHA1

notAfter

protected transient Date notAfter

notBefore

protected transient Date notBefore

serialNo

protected transient BigInteger serialNo

sigAlgId

protected transient OID sigAlgId

sigAlgVal

protected transient byte[] sigAlgVal

signature

protected transient byte[] signature

subject

protected transient X500Name subject

subjectKey

protected transient PublicKey subjectKey

subjectUniqueId

protected transient BitString subjectUniqueId

tbsCertBytes

protected transient byte[] tbsCertBytes

version

protected transient int version

Constructor Detail

X509CertificateImpl

public X509CertificateImpl(InputStream encoded)
Create a new X.509 certificate from the encoded data. The input data are expected to be the ASN.1 DER encoding of the certificate.

Parameters: encoded The encoded certificate data.

Throws: IOException If the certificate cannot be read, possibly from a formatting error. CertificateException If the data read is not an X.509 certificate.

X509CertificateImpl

protected X509CertificateImpl()

Method Detail

checkValidity

public void checkValidity()

checkValidity

public void checkValidity(Date date)

equals

public boolean equals(Object other)

getBasicConstraints

public int getBasicConstraints()

getCriticalExtensionOIDs

public Set getCriticalExtensionOIDs()

getEncoded

public byte[] getEncoded()

getExtendedKeyUsage

public List getExtendedKeyUsage()

getExtension

public Extension getExtension(OID oid)

getExtensions

public Collection getExtensions()

getExtensionValue

public byte[] getExtensionValue(String oid)

getIssuerAlternativeNames

public Collection getIssuerAlternativeNames()

getIssuerDN

public Principal getIssuerDN()

getIssuerUniqueID

public boolean[] getIssuerUniqueID()

getIssuerX500Principal

public X500Principal getIssuerX500Principal()

getKeyUsage

public boolean[] getKeyUsage()

getNonCriticalExtensionOIDs

public Set getNonCriticalExtensionOIDs()

getNotAfter

public Date getNotAfter()

getNotBefore

public Date getNotBefore()

getPublicKey

public PublicKey getPublicKey()

getSerialNumber

public BigInteger getSerialNumber()

getSigAlgName

public String getSigAlgName()

getSigAlgOID

public String getSigAlgOID()

getSigAlgParams

public byte[] getSigAlgParams()

getSignature

public byte[] getSignature()

getSubjectAlternativeNames

public Collection getSubjectAlternativeNames()

getSubjectDN

public Principal getSubjectDN()

getSubjectUniqueID

public boolean[] getSubjectUniqueID()

getSubjectX500Principal

public X500Principal getSubjectX500Principal()

getTBSCertificate

public byte[] getTBSCertificate()

getVersion

public int getVersion()

hasUnsupportedCriticalExtension

public boolean hasUnsupportedCriticalExtension()

toString

public String toString()

verify

public void verify(PublicKey key)

verify

public void verify(PublicKey key, String provider)
Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.