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

pack-priv Class X509CertificateInternal

extends X509CertificateImpl
Class Inheritance
Imports
java.security.cert.CertificateEncodingException, org.bouncycastle.asn1.x509.BasicConstraints, org.bouncycastle.jcajce.util.JcaJceHelper

This class exists to let equals(Object) and hashCode() methods be delegated efficiently to the platform default implementations (especially important for compatibility of hashCode() calculations). Those methods fall back to calling getEncoded() for third-party subclasses, and this class allows us to avoid cloning the return value of getEncoded() for those callers.

Field Summary

Modifier and TypeField and Description
private final byte[]
private final CertificateEncodingException
Inherited from org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl:
basicConstraintsbcHelperckeyUsagesigAlgNamesigAlgParams

Constructor Summary

AccessConstructor and Description
pack-priv
X509CertificateInternal(JcaJceHelper bcHelper, Certificate c, BasicConstraints basicConstraints, boolean[] keyUsage, String sigAlgName, byte[] sigAlgParams, byte[] encoding, CertificateEncodingException exception)

Method Summary

Modifier and TypeMethod and Description
public byte[]
getEncoded()

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

Returns the encoded form of this certificate.

Inherited from org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateImpl:
checkValiditycheckValiditygetBasicConstraintsgetCriticalExtensionOIDsgetExtendedKeyUsagegetExtensionOctetsgetExtensionValuegetExtensionValuegetIssuerAlternativeNamesgetIssuerDNgetIssuerUniqueIDgetIssuerX500NamegetIssuerX500PrincipalgetKeyUsagegetNonCriticalExtensionOIDsgetNotAftergetNotBeforegetPublicKeygetSerialNumbergetSigAlgNamegetSigAlgOIDgetSigAlgParamsgetSignaturegetSubjectAlternativeNamesgetSubjectDNgetSubjectUniqueIDgetSubjectX500NamegetSubjectX500PrincipalgetTBSCertificategetTBSCertificateNativegetVersionhasUnsupportedCriticalExtensiontoStringverifyverifyverify

Field Detail

encodingback to summary
private final byte[] encoding
exceptionback to summary
private final CertificateEncodingException exception

Constructor Detail

X509CertificateInternalback to summary
pack-priv X509CertificateInternal(JcaJceHelper bcHelper, Certificate c, BasicConstraints basicConstraints, boolean[] keyUsage, String sigAlgName, byte[] sigAlgParams, byte[] encoding, CertificateEncodingException exception)

Method Detail

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.