public class SignedCertificateTimestampList extends V3Extension
SignedCertificateTimestampList Extension.
The SignedCertificateTimestampList extension is used by
Certificate Transparency to convey a Signed Certificate Timestamp in an
X.509 Certificate.
The SignedCertificateTimestampList OID is "1.3.6.1.4.1.11129.2.4.2".
* From RFC 6962 section 3.3:
Similarly, a certificate authority MAY submit a Pre certificate to
more than one log, and all obtained SCTs can be directly embedded in
the final certificate, by encoding the SignedCertificateTimestampList
structure as an ASN.1 OCTET STRING and inserting the resulting data
in the TBSCertificate as an X.509v3 certificate extension (OID
1.3.6.1.4.1.11129.2.4.2). Upon receiving the certificate, clients
can reconstruct the original TBSCertificate to verify the SCT
signature.
The contents of the ASN.1 OCTET STRING embedded in an OCSP extension
or X509v3 certificate extension are as follows:
opaque SerializedSCT<1..2^16-1>;
struct {
SerializedSCT sct_list <1..2^16-1>;
} SignedCertificateTimestampList;V3Extension,
X509Certificate,
GeneralString| Modifier and Type | Field and Description |
|---|---|
static ObjectID |
oid
The Object ID for SignedCertificateTimestampList
|
critical| Constructor and Description |
|---|
SignedCertificateTimestampList()
Default constructor used when decoding from a certificate or other ASN.1
structure.
|
SignedCertificateTimestampList(byte[] signedCertificateTimestampList)
Parse a stream of bytes into a SignedCertificateTimestampList
|
SignedCertificateTimestampList(java.io.InputStream signedCertificateTimestampList)
Parses an InputStream of bytes into a SignedCertificateTimestampList
|
SignedCertificateTimestampList(SignedCertificateTimestamp[] arrayOfTimestamps)
The constructor which takes an array of
SignedCertificateTimestamp
objects. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getEncoded() |
ObjectID |
getObjectID()
Returns the object ID of this
EntrustVersInfo extension |
SignedCertificateTimestamp[] |
getSignedCertificateTimestampList() |
int |
hashCode()
Returns a hashcode for this identity.
|
void |
init(ASN1Object obj)
Initialize this
SignedCertificateTimestampList implementation with an ASN1Object
representing the value of this extension. |
ASN1Object |
toASN1Object()
This object returns an ASN1 representation of this object.
|
java.lang.String |
toString()
Returns a string that represents the contents of this
EntrustVersInfo extension. |
java.security.PublicKey[] |
verify(X509Certificate PreCertOrFinal,
java.security.PublicKey[] logkeys,
java.security.PublicKey issuerKey)
Verify the list of Signed Certificate Timestamp.
|
getName, isCritical, setCriticalpublic static final ObjectID oid
public SignedCertificateTimestampList()
public SignedCertificateTimestampList(SignedCertificateTimestamp[] arrayOfTimestamps)
SignedCertificateTimestamp
objects.arrayOfTimestamps - The array of SignedCertificateTimestamp objectspublic SignedCertificateTimestampList(byte[] signedCertificateTimestampList)
throws java.io.IOException
signedCertificateTimestampList - java.io.IOExceptionpublic SignedCertificateTimestampList(java.io.InputStream signedCertificateTimestampList)
throws java.io.IOException
signedCertificateTimestampList - java.io.IOException - if error parsing through the SCTListjava.lang.IllegalArgumentException - if null is passed in.public SignedCertificateTimestamp[] getSignedCertificateTimestampList()
public byte[] getEncoded()
throws java.io.IOException
SignedCertificateTimestampListjava.io.IOException - if an error occurs when encoding the array of signed certificate
timestamps.public ObjectID getObjectID()
EntrustVersInfo extensiongetObjectID in class V3Extensionpublic void init(ASN1Object obj) throws X509ExtensionException
SignedCertificateTimestampList implementation with an ASN1Object
representing the value of this extension.
The ASN1Object is the extensionValue from ASN.1 type "Extension" representing
the entrustVers and entrustInfo values of this extension.
init in class V3Extensionobj - the extensionValue as an ASN1ObjectX509ExtensionException - if the extension could not be parsedpublic java.security.PublicKey[] verify(X509Certificate PreCertOrFinal, java.security.PublicKey[] logkeys, java.security.PublicKey issuerKey) throws java.security.SignatureException
SignedCertificateTimestampList object would not be extracted from the Certificate, but
could be constructed by passing in the list of SignedCertificateTimestamp objects.PreCertOrFinal - The certificate used to calculate the Signed Certificate Timestamp (SCT) signature as mentioned above.logkeys - The list of Public Log keys, used to validate the SCT signature(s).issuerKey - The issuer key of the certificate. This is only needed if the Certificate was the X.509 pre-certificate or X.509 final certificate
with embedded SignedCertificateTimestampList.java.security.SignatureException - if none of the SCT can be validation. The cause of the Inner exception will be a CertificateTransparencyException
which can be checked to see why each signature failed.public ASN1Object toASN1Object() throws X509ExtensionException
toASN1Object in class V3ExtensionX509ExtensionException - if the extension could not be createdpublic int hashCode()
hashCode in class V3Extensionpublic java.lang.String toString()
EntrustVersInfo extension.toString in class java.lang.Object