Top Inners Fields Constructors Methods
org.bouncycastle.jcajce.provider.asymmetric.x509

pack-priv Class X509CertificateObject

extends X509CertificateImpl
implements PKCS12BagAttributeCarrier
Class Inheritance
All Implemented Interfaces
org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier
Imports
java.io.IOException, java.security.PublicKey, java.security.cert.CertificateEncodingException, .CertificateExpiredException, .CertificateNotYetValidException, .CertificateParsingException, java.util.Date, .Enumeration, javax.security.auth.x500.X500Principal, org.bouncycastle.asn1.ASN1BitString, .ASN1Encodable, .ASN1Encoding, .ASN1ObjectIdentifier, .ASN1Primitive, org.bouncycastle.asn1.x509.BasicConstraints, org.bouncycastle.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl, org.bouncycastle.jcajce.util.JcaJceHelper, org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier, org.bouncycastle.util.Arrays

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private PKCS12BagAttributeCarrier
private final Object
private volatile int
private volatile boolean
private X509CertificateInternal
private X500Principal
private PublicKey
private X500Principal
private long[]
Inherited from org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl:
basicConstraintsbcHelperckeyUsagesigAlgNamesigAlgParams

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
checkValidity(Date
the Date to check against to see if this certificate is valid at that date/time.
date
)

Overrides org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl.checkValidity.

Checks that the given date is within the certificate's validity period.
private static BasicConstraints
private static boolean[]
private static String
private static byte[]
public boolean
equals(Object
the object to test for equality with this certificate.
other
)

Overrides java.security.cert.Certificate.equals.

Compares this certificate for equality with the specified object.
public ASN1Encodable
public Enumeration<E>
public byte[]
getEncoded()

Implements abstract java.security.cert.Certificate.getEncoded.

Returns the encoded form of this certificate.
private X509CertificateInternal
public X500Principal
getIssuerX500Principal()

Overrides org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl.getIssuerX500Principal.

Returns the issuer (issuer distinguished name) value from the certificate as an X500Principal.
public PublicKey
public X500Principal
getSubjectX500Principal()

Overrides org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl.getSubjectX500Principal.

Returns the subject (subject distinguished name) value from the certificate as an X500Principal.
public long[]
public int
hashCode()

Overrides java.security.cert.Certificate.hashCode.

Returns a hashcode value for this certificate from its encoded form.
public int

Returns:

the pre-JDK 1.8 hashcode calculation.
originalHashCode
()

Returns the original hash code for Certificates pre-JDK 1.8.

public void
Inherited from org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl:
checkValiditygetBasicConstraintsgetCriticalExtensionOIDsgetExtendedKeyUsagegetExtensionOctetsgetExtensionValuegetExtensionValuegetIssuerAlternativeNamesgetIssuerDNgetIssuerUniqueIDgetIssuerX500NamegetKeyUsagegetNonCriticalExtensionOIDsgetNotAftergetNotBeforegetSerialNumbergetSigAlgNamegetSigAlgOIDgetSigAlgParamsgetSignaturegetSubjectAlternativeNamesgetSubjectDNgetSubjectUniqueIDgetSubjectX500NamegetTBSCertificategetTBSCertificateNativegetVersionhasUnsupportedCriticalExtensiontoStringverifyverifyverify

Field Detail

attrCarrierback to summary
private PKCS12BagAttributeCarrier attrCarrier
cacheLockback to summary
private final Object cacheLock
hashValueback to summary
private volatile int hashValue
hashValueSetback to summary
private volatile boolean hashValueSet
internalCertificateValueback to summary
private X509CertificateInternal internalCertificateValue
issuerValueback to summary
private X500Principal issuerValue
publicKeyValueback to summary
private PublicKey publicKeyValue
subjectValueback to summary
private X500Principal subjectValue
validityValuesback to summary
private long[] validityValues

Constructor Detail

X509CertificateObjectback to summary
pack-priv X509CertificateObject(JcaJceHelper bcHelper, Certificate c) throws CertificateParsingException

Method Detail

checkValidityback to summary
public void checkValidity(Date date) throws CertificateExpiredException, CertificateNotYetValidException

Overrides org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl.checkValidity.

Doc from java.security.cert.X509Certificate.checkValidity.

Checks that the given date is within the certificate's validity period. In other words, this determines whether the certificate would be valid at the given date/time.

Parameters
date:Date

the Date to check against to see if this certificate is valid at that date/time.

Exceptions
CertificateExpiredException:
if the certificate has expired with respect to the date supplied.
CertificateNotYetValidException:
if the certificate is not yet valid with respect to the date supplied.
createBasicConstraintsback to summary
private static BasicConstraints createBasicConstraints(Certificate c) throws CertificateParsingException
createKeyUsageback to summary
private static boolean[] createKeyUsage(Certificate c) throws CertificateParsingException
createSigAlgNameback to summary
private static String createSigAlgName(Certificate c) throws CertificateParsingException
createSigAlgParamsback to summary
private static byte[] createSigAlgParams(Certificate c) throws CertificateParsingException
equalsback to summary
public boolean equals(Object other)

Overrides java.security.cert.Certificate.equals.

Doc from java.security.cert.Certificate.equals.

Compares this certificate for equality with the specified object. If the other object is an instanceof Certificate, then its encoded form is retrieved and compared with the encoded form of this certificate.

Parameters
other:Object

the object to test for equality with this certificate.

Returns:boolean

true iff the encoded forms of the two certificates match, false otherwise.

getBagAttributeback to summary
public ASN1Encodable getBagAttribute(ASN1ObjectIdentifier oid)

Implements org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier.getBagAttribute.

getBagAttributeKeysback to summary
public Enumeration<E> getBagAttributeKeys()

Implements org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier.getBagAttributeKeys.

getEncodedback to summary
public byte[] getEncoded() throws CertificateEncodingException

Implements abstract java.security.cert.Certificate.getEncoded.

Doc from java.security.cert.Certificate.getEncoded.

Returns the encoded form of this certificate. It is assumed that each certificate type would have only a single form of encoding; for example, X.509 certificates would be encoded as ASN.1 DER.

Returns:byte[]

the encoded form of this certificate

Exceptions
CertificateEncodingException:
if an encoding error occurs.
getInternalCertificateback to summary
private X509CertificateInternal getInternalCertificate()
getIssuerX500Principalback to summary
public X500Principal getIssuerX500Principal()

Overrides org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl.getIssuerX500Principal.

Doc from java.security.cert.X509Certificate.getIssuerX500Principal.

Returns the issuer (issuer distinguished name) value from the certificate as an X500Principal.

It is recommended that subclasses override this method.

Returns:X500Principal

an X500Principal representing the issuer distinguished name

getPublicKeyback to summary
public PublicKey getPublicKey()

Overrides org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl.getPublicKey.

Doc from java.security.cert.Certificate.getPublicKey.

Gets the public key from this certificate.

Returns:PublicKey

the public key.

getSubjectX500Principalback to summary
public X500Principal getSubjectX500Principal()

Overrides org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl.getSubjectX500Principal.

Doc from java.security.cert.X509Certificate.getSubjectX500Principal.

Returns the subject (subject distinguished name) value from the certificate as an X500Principal. If the subject value is empty, then the getName() method of the returned X500Principal object returns an empty string ("").

It is recommended that subclasses override this method.

Returns:X500Principal

an X500Principal representing the subject distinguished name

getValidityValuesback to summary
public long[] getValidityValues()
hashCodeback to summary
public int hashCode()

Overrides java.security.cert.Certificate.hashCode.

Doc from java.security.cert.Certificate.hashCode.

Returns a hashcode value for this certificate from its encoded form.

Returns:int

the hashcode value.

originalHashCodeback to summary
public int originalHashCode()

Returns the original hash code for Certificates pre-JDK 1.8.

Returns:int

the pre-JDK 1.8 hashcode calculation.

setBagAttributeback to summary
public void setBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)

Implements org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier.setBagAttribute.

org.bouncycastle.jcajce.provider.asymmetric.x509 back to summary

private Class X509CertificateObject.X509CertificateEncodingException

extends CertificateEncodingException
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Throwable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Throwable
getCause()

Overrides java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Field Detail

causeback to summary
private final Throwable cause

Hides java.lang.Throwable.cause.

Constructor Detail

X509CertificateEncodingExceptionback to summary
pack-priv X509CertificateEncodingException(Throwable cause)

Method Detail

getCauseback to summary
public Throwable getCause()

Overrides java.lang.Throwable.getCause.

Doc from java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the initCause(Throwable) method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.

Returns:Throwable

the cause of this throwable or null if the cause is nonexistent or unknown.