Class CertPathValidatorTest.X509CertificateObject
- java.lang.Object
-
- java.security.cert.Certificate
-
- java.security.cert.X509Certificate
-
- org.bouncycastle.jce.provider.test.CertPathValidatorTest.X509CertificateObject
-
- All Implemented Interfaces:
java.io.Serializable
,java.security.cert.X509Extension
- Enclosing class:
- CertPathValidatorTest
public static class CertPathValidatorTest.X509CertificateObject extends java.security.cert.X509Certificate
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description X509CertificateObject(X509CertificateStructure c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkValidity()
void
checkValidity(java.util.Date date)
boolean
equals(java.lang.Object o)
int
getBasicConstraints()
java.util.Set
getCriticalExtensionOIDs()
byte[]
getEncoded()
java.util.List
getExtendedKeyUsage()
byte[]
getExtensionValue(java.lang.String oid)
java.util.Collection
getIssuerAlternativeNames()
java.security.Principal
getIssuerDN()
boolean[]
getIssuerUniqueID()
javax.security.auth.x500.X500Principal
getIssuerX500Principal()
boolean[]
getKeyUsage()
java.util.Set
getNonCriticalExtensionOIDs()
java.util.Date
getNotAfter()
java.util.Date
getNotBefore()
java.security.PublicKey
getPublicKey()
java.math.BigInteger
getSerialNumber()
java.lang.String
getSigAlgName()
return a more "meaningful" representation for the signature algorithm used in the certficate.java.lang.String
getSigAlgOID()
return the object identifier for the signature.byte[]
getSigAlgParams()
return the signature parameters, or null if there aren't any.byte[]
getSignature()
java.util.Collection
getSubjectAlternativeNames()
java.security.Principal
getSubjectDN()
boolean[]
getSubjectUniqueID()
javax.security.auth.x500.X500Principal
getSubjectX500Principal()
byte[]
getTBSCertificate()
int
getVersion()
int
hashCode()
boolean
hasUnsupportedCriticalExtension()
java.lang.String
toString()
void
verify(java.security.PublicKey key)
void
verify(java.security.PublicKey key, java.lang.String sigProvider)
void
verify(java.security.PublicKey key, java.security.Provider sigProvider)
-
-
-
Constructor Detail
-
X509CertificateObject
public X509CertificateObject(X509CertificateStructure c) throws java.security.cert.CertificateParsingException
- Throws:
java.security.cert.CertificateParsingException
-
-
Method Detail
-
checkValidity
public void checkValidity() throws java.security.cert.CertificateExpiredException, java.security.cert.CertificateNotYetValidException
- Specified by:
checkValidity
in classjava.security.cert.X509Certificate
- Throws:
java.security.cert.CertificateExpiredException
java.security.cert.CertificateNotYetValidException
-
checkValidity
public void checkValidity(java.util.Date date) throws java.security.cert.CertificateExpiredException, java.security.cert.CertificateNotYetValidException
- Specified by:
checkValidity
in classjava.security.cert.X509Certificate
- Throws:
java.security.cert.CertificateExpiredException
java.security.cert.CertificateNotYetValidException
-
getVersion
public int getVersion()
- Specified by:
getVersion
in classjava.security.cert.X509Certificate
-
getSerialNumber
public java.math.BigInteger getSerialNumber()
- Specified by:
getSerialNumber
in classjava.security.cert.X509Certificate
-
getIssuerDN
public java.security.Principal getIssuerDN()
- Specified by:
getIssuerDN
in classjava.security.cert.X509Certificate
-
getIssuerX500Principal
public javax.security.auth.x500.X500Principal getIssuerX500Principal()
- Overrides:
getIssuerX500Principal
in classjava.security.cert.X509Certificate
-
getSubjectDN
public java.security.Principal getSubjectDN()
- Specified by:
getSubjectDN
in classjava.security.cert.X509Certificate
-
getSubjectX500Principal
public javax.security.auth.x500.X500Principal getSubjectX500Principal()
- Overrides:
getSubjectX500Principal
in classjava.security.cert.X509Certificate
-
getNotBefore
public java.util.Date getNotBefore()
- Specified by:
getNotBefore
in classjava.security.cert.X509Certificate
-
getNotAfter
public java.util.Date getNotAfter()
- Specified by:
getNotAfter
in classjava.security.cert.X509Certificate
-
getTBSCertificate
public byte[] getTBSCertificate() throws java.security.cert.CertificateEncodingException
- Specified by:
getTBSCertificate
in classjava.security.cert.X509Certificate
- Throws:
java.security.cert.CertificateEncodingException
-
getSignature
public byte[] getSignature()
- Specified by:
getSignature
in classjava.security.cert.X509Certificate
-
getSigAlgName
public java.lang.String getSigAlgName()
return a more "meaningful" representation for the signature algorithm used in the certficate.- Specified by:
getSigAlgName
in classjava.security.cert.X509Certificate
-
getSigAlgOID
public java.lang.String getSigAlgOID()
return the object identifier for the signature.- Specified by:
getSigAlgOID
in classjava.security.cert.X509Certificate
-
getSigAlgParams
public byte[] getSigAlgParams()
return the signature parameters, or null if there aren't any.- Specified by:
getSigAlgParams
in classjava.security.cert.X509Certificate
-
getIssuerUniqueID
public boolean[] getIssuerUniqueID()
- Specified by:
getIssuerUniqueID
in classjava.security.cert.X509Certificate
-
getSubjectUniqueID
public boolean[] getSubjectUniqueID()
- Specified by:
getSubjectUniqueID
in classjava.security.cert.X509Certificate
-
getKeyUsage
public boolean[] getKeyUsage()
- Specified by:
getKeyUsage
in classjava.security.cert.X509Certificate
-
getExtendedKeyUsage
public java.util.List getExtendedKeyUsage() throws java.security.cert.CertificateParsingException
- Overrides:
getExtendedKeyUsage
in classjava.security.cert.X509Certificate
- Throws:
java.security.cert.CertificateParsingException
-
getBasicConstraints
public int getBasicConstraints()
- Specified by:
getBasicConstraints
in classjava.security.cert.X509Certificate
-
getSubjectAlternativeNames
public java.util.Collection getSubjectAlternativeNames() throws java.security.cert.CertificateParsingException
- Overrides:
getSubjectAlternativeNames
in classjava.security.cert.X509Certificate
- Throws:
java.security.cert.CertificateParsingException
-
getIssuerAlternativeNames
public java.util.Collection getIssuerAlternativeNames() throws java.security.cert.CertificateParsingException
- Overrides:
getIssuerAlternativeNames
in classjava.security.cert.X509Certificate
- Throws:
java.security.cert.CertificateParsingException
-
getCriticalExtensionOIDs
public java.util.Set getCriticalExtensionOIDs()
-
getExtensionValue
public byte[] getExtensionValue(java.lang.String oid)
-
getNonCriticalExtensionOIDs
public java.util.Set getNonCriticalExtensionOIDs()
-
hasUnsupportedCriticalExtension
public boolean hasUnsupportedCriticalExtension()
-
getPublicKey
public java.security.PublicKey getPublicKey()
- Specified by:
getPublicKey
in classjava.security.cert.Certificate
-
getEncoded
public byte[] getEncoded() throws java.security.cert.CertificateEncodingException
- Specified by:
getEncoded
in classjava.security.cert.Certificate
- Throws:
java.security.cert.CertificateEncodingException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.security.cert.Certificate
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.security.cert.Certificate
-
toString
public java.lang.String toString()
- Specified by:
toString
in classjava.security.cert.Certificate
-
verify
public final void verify(java.security.PublicKey key) throws java.security.cert.CertificateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.NoSuchProviderException, java.security.SignatureException
- Specified by:
verify
in classjava.security.cert.Certificate
- Throws:
java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.NoSuchProviderException
java.security.SignatureException
-
verify
public final void verify(java.security.PublicKey key, java.lang.String sigProvider) throws java.security.cert.CertificateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.NoSuchProviderException, java.security.SignatureException
- Specified by:
verify
in classjava.security.cert.Certificate
- Throws:
java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.NoSuchProviderException
java.security.SignatureException
-
verify
public final void verify(java.security.PublicKey key, java.security.Provider sigProvider) throws java.security.cert.CertificateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.SignatureException
- Overrides:
verify
in classjava.security.cert.X509Certificate
- Throws:
java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
-
-