org.apache.geronimo.util.jce.provider
Class X509CertificateObject

java.lang.Object
  extended byjava.security.cert.Certificate
      extended byjava.security.cert.X509Certificate
          extended byorg.apache.geronimo.util.jce.provider.X509CertificateObject
All Implemented Interfaces:
PKCS12BagAttributeCarrier, Serializable, X509Extension

public class X509CertificateObject
extends X509Certificate
implements PKCS12BagAttributeCarrier

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.security.cert.Certificate
Certificate.CertificateRep
 
Constructor Summary
X509CertificateObject(X509CertificateStructure c)
           
 
Method Summary
 void checkValidity()
           
 void checkValidity(Date date)
           
 DEREncodable getBagAttribute(DERObjectIdentifier oid)
           
 Enumeration getBagAttributeKeys()
           
 int getBasicConstraints()
           
 Set getCriticalExtensionOIDs()
           
 byte[] getEncoded()
           
 List getExtendedKeyUsage()
           
 byte[] getExtensionValue(String oid)
           
 Principal getIssuerDN()
           
 boolean[] getIssuerUniqueID()
           
 X500Principal getIssuerX500Principal()
           
 boolean[] getKeyUsage()
           
 Set getNonCriticalExtensionOIDs()
           
 Date getNotAfter()
           
 Date getNotBefore()
           
 PublicKey getPublicKey()
           
 BigInteger getSerialNumber()
           
 String getSigAlgName()
          return a more "meaningful" representation for the signature algorithm used in the certficate.
 String getSigAlgOID()
          return the object identifier for the signature.
 byte[] getSigAlgParams()
          return the signature parameters, or null if there aren't any.
 byte[] getSignature()
           
 Principal getSubjectDN()
           
 boolean[] getSubjectUniqueID()
           
 X500Principal getSubjectX500Principal()
           
 byte[] getTBSCertificate()
           
 int getVersion()
           
 boolean hasUnsupportedCriticalExtension()
           
 void setBagAttribute(DERObjectIdentifier oid, DEREncodable attribute)
           
 String toString()
           
 void verify(PublicKey key)
           
 void verify(PublicKey key, String sigProvider)
           
 
Methods inherited from class java.security.cert.X509Certificate
getIssuerAlternativeNames, getSubjectAlternativeNames
 
Methods inherited from class java.security.cert.Certificate
equals, getType, hashCode, writeReplace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

X509CertificateObject

public X509CertificateObject(X509CertificateStructure c)
Method Detail

checkValidity

public void checkValidity()
                   throws CertificateExpiredException,
                          CertificateNotYetValidException
Throws:
CertificateExpiredException
CertificateNotYetValidException

checkValidity

public void checkValidity(Date date)
                   throws CertificateExpiredException,
                          CertificateNotYetValidException
Throws:
CertificateExpiredException
CertificateNotYetValidException

getVersion

public int getVersion()

getSerialNumber

public BigInteger getSerialNumber()

getIssuerDN

public Principal getIssuerDN()

getIssuerX500Principal

public X500Principal getIssuerX500Principal()

getSubjectDN

public Principal getSubjectDN()

getSubjectX500Principal

public X500Principal getSubjectX500Principal()

getNotBefore

public Date getNotBefore()

getNotAfter

public Date getNotAfter()

getTBSCertificate

public byte[] getTBSCertificate()
                         throws CertificateEncodingException
Throws:
CertificateEncodingException

getSignature

public byte[] getSignature()

getSigAlgName

public String getSigAlgName()
return a more "meaningful" representation for the signature algorithm used in the certficate.


getSigAlgOID

public String getSigAlgOID()
return the object identifier for the signature.


getSigAlgParams

public byte[] getSigAlgParams()
return the signature parameters, or null if there aren't any.


getIssuerUniqueID

public boolean[] getIssuerUniqueID()

getSubjectUniqueID

public boolean[] getSubjectUniqueID()

getKeyUsage

public boolean[] getKeyUsage()

getExtendedKeyUsage

public List getExtendedKeyUsage()
                         throws CertificateParsingException
Throws:
CertificateParsingException

getBasicConstraints

public int getBasicConstraints()

getCriticalExtensionOIDs

public Set getCriticalExtensionOIDs()
Specified by:
getCriticalExtensionOIDs in interface X509Extension

getExtensionValue

public byte[] getExtensionValue(String oid)
Specified by:
getExtensionValue in interface X509Extension

getNonCriticalExtensionOIDs

public Set getNonCriticalExtensionOIDs()
Specified by:
getNonCriticalExtensionOIDs in interface X509Extension

hasUnsupportedCriticalExtension

public boolean hasUnsupportedCriticalExtension()
Specified by:
hasUnsupportedCriticalExtension in interface X509Extension

getPublicKey

public PublicKey getPublicKey()

getEncoded

public byte[] getEncoded()
                  throws CertificateEncodingException
Throws:
CertificateEncodingException

setBagAttribute

public void setBagAttribute(DERObjectIdentifier oid,
                            DEREncodable attribute)
Specified by:
setBagAttribute in interface PKCS12BagAttributeCarrier

getBagAttribute

public DEREncodable getBagAttribute(DERObjectIdentifier oid)
Specified by:
getBagAttribute in interface PKCS12BagAttributeCarrier

getBagAttributeKeys

public Enumeration getBagAttributeKeys()
Specified by:
getBagAttributeKeys in interface PKCS12BagAttributeCarrier

toString

public String toString()

verify

public final void verify(PublicKey key)
                  throws CertificateException,
                         NoSuchAlgorithmException,
                         InvalidKeyException,
                         NoSuchProviderException,
                         SignatureException
Throws:
CertificateException
NoSuchAlgorithmException
InvalidKeyException
NoSuchProviderException
SignatureException

verify

public final void verify(PublicKey key,
                         String sigProvider)
                  throws CertificateException,
                         NoSuchAlgorithmException,
                         InvalidKeyException,
                         NoSuchProviderException,
                         SignatureException
Throws:
CertificateException
NoSuchAlgorithmException
InvalidKeyException
NoSuchProviderException
SignatureException


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.