Package org.apache.harmony.security.x509
Class TBSCertificate
java.lang.Object
org.apache.harmony.security.x509.TBSCertificate
public final class TBSCertificate extends Object
The class encapsulates the ASN.1 DER encoding/decoding work
with TBSCertificate structure which is the part of X.509 certificate
(as specified in RFC 3280 -
Internet X.509 Public Key Infrastructure.
Certificate and Certificate Revocation List (CRL) Profile.
http://www.ietf.org/rfc/rfc3280.txt):
TBSCertificate ::= SEQUENCE {
version [0] EXPLICIT Version DEFAULT v1,
serialNumber CertificateSerialNumber,
signature AlgorithmIdentifier,
issuer Name,
validity Validity,
subject Name,
subjectPublicKeyInfo SubjectPublicKeyInfo,
issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
-- If present, version MUST be v2 or v3
subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
-- If present, version MUST be v2 or v3
extensions [3] EXPLICIT Extensions OPTIONAL
-- If present, version MUST be v3
}
-
Field Summary
Fields Modifier and Type Field Description static ASN1SequenceASN1X.509 TBSCertificate encoder/decoder. -
Constructor Summary
Constructors Constructor Description TBSCertificate(int version, BigInteger serialNumber, AlgorithmIdentifier signature, Name issuer, Validity validity, Name subject, SubjectPublicKeyInfo subjectPublicKeyInfo, boolean[] issuerUniqueID, boolean[] subjectUniqueID, Extensions extensions) -
Method Summary
Modifier and Type Method Description voiddumpValue(StringBuilder sb)byte[]getEncoded()Returns ASN.1 encoded form of this X.509 TBSCertificate value.ExtensionsgetExtensions()Returns the value of extensions field of the structure.NamegetIssuer()Returns the value of issuer field of the structure.boolean[]getIssuerUniqueID()Returns the value of issuerUniqueID field of the structure.BigIntegergetSerialNumber()Returns the value of serialNumber field of the structure.AlgorithmIdentifiergetSignature()Returns the value of signature field of the structure.NamegetSubject()Returns the value of subject field of the structure.SubjectPublicKeyInfogetSubjectPublicKeyInfo()Returns the value of subjectPublicKeyInfo field of the structure.boolean[]getSubjectUniqueID()Returns the value of subjectUniqueID field of the structure.ValiditygetValidity()Returns the value of validity field of the structure.intgetVersion()Returns the value of version field of the structure.
-
Field Details
-
ASN1
X.509 TBSCertificate encoder/decoder.
-
-
Constructor Details
-
TBSCertificate
public TBSCertificate(int version, BigInteger serialNumber, AlgorithmIdentifier signature, Name issuer, Validity validity, Name subject, SubjectPublicKeyInfo subjectPublicKeyInfo, boolean[] issuerUniqueID, boolean[] subjectUniqueID, Extensions extensions)
-
-
Method Details
-
getVersion
public int getVersion()Returns the value of version field of the structure. -
getSerialNumber
Returns the value of serialNumber field of the structure. -
getSignature
Returns the value of signature field of the structure. -
getIssuer
Returns the value of issuer field of the structure. -
getValidity
Returns the value of validity field of the structure. -
getSubject
Returns the value of subject field of the structure. -
getSubjectPublicKeyInfo
Returns the value of subjectPublicKeyInfo field of the structure. -
getIssuerUniqueID
public boolean[] getIssuerUniqueID()Returns the value of issuerUniqueID field of the structure. -
getSubjectUniqueID
public boolean[] getSubjectUniqueID()Returns the value of subjectUniqueID field of the structure. -
getExtensions
Returns the value of extensions field of the structure. -
getEncoded
public byte[] getEncoded()Returns ASN.1 encoded form of this X.509 TBSCertificate value. -
dumpValue
-