Class TBSCertificate
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.TBSCertificate
- All Implemented Interfaces:
ASN1Encodable, Encodable
The TBSCertificate object.
TBSCertificate ::= SEQUENCE {
version [ 0 ] Version DEFAULT v1(0),
serialNumber CertificateSerialNumber,
signature AlgorithmIdentifier,
issuer Name,
validity Validity,
subject Name,
subjectPublicKeyInfo SubjectPublicKeyInfo,
issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
extensions [ 3 ] Extensions OPTIONAL
}
Note: issuerUniqueID and subjectUniqueID are both deprecated by the IETF. This class will parse them, but you really shouldn't be creating new ones.
-
Constructor Summary
ConstructorsConstructorDescriptionTBSCertificate(ASN1Integer version, ASN1Integer serialNumber, AlgorithmIdentifier signature, X500Name issuer, Validity validity, X500Name subject, SubjectPublicKeyInfo subjectPublicKeyInfo, ASN1BitString issuerUniqueId, ASN1BitString subjectUniqueId, Extensions extensions) -
Method Summary
Modifier and TypeMethodDescriptionstatic TBSCertificategetInstance(Object obj) static TBSCertificategetInstance(ASN1TaggedObject obj, boolean explicit) intstatic ListRe-run the parse of a candidate tbsCertificate SEQUENCE collecting every problem the strictgetInstance(...)path would have thrown, instead of stopping at the first.Method providing a primitive representation of this object suitable for encoding.Methods inherited from class ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
TBSCertificate
public TBSCertificate(ASN1Integer version, ASN1Integer serialNumber, AlgorithmIdentifier signature, X500Name issuer, Validity validity, X500Name subject, SubjectPublicKeyInfo subjectPublicKeyInfo, ASN1BitString issuerUniqueId, ASN1BitString subjectUniqueId, Extensions extensions)
-
-
Method Details
-
getInstance
-
getInstance
-
reviewStructure
Re-run the parse of a candidate tbsCertificate SEQUENCE collecting every problem the strictgetInstance(...)path would have thrown, instead of stopping at the first. The strict path and this share one parse method (seeparse(ASN1Sequence, List)); the only difference is the error sink. Intended for diagnostic/reporting tooling (e.g.org.bouncycastle.cert.X509CertificateReviewer, github #1508); it does not relax any rule and does not publish a partially-parsed certificate.- Parameters:
seq- the candidate tbsCertificate SEQUENCE.- Returns:
- the exceptions the strict path would have thrown, one per problem, in parse order (empty if none).
-
getVersionNumber
public int getVersionNumber() -
getVersion
-
getSerialNumber
-
getSignature
-
getIssuer
-
getValidity
-
getStartDate
-
getEndDate
-
getSubject
-
getSubjectPublicKeyInfo
-
getIssuerUniqueId
-
getSubjectUniqueId
-
getExtensions
-
toASN1Primitive
Description copied from class:ASN1ObjectMethod providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-