wire / wire-format / x509-certificate
An X.509 v3 certificate is a DER-encoded (ASN.1) structure: TBSCertificate (to-be-signed: version, serial number, signature algorithm, issuer, validity, subject, subject public key info, extensions), signature algorithm identifier, and the signature value. The whole is wrapped in a SEQUENCE.
aka: X.509 certificate (DER) structure
spec: RFC 5280 (X.509 PKIX)
An X.509 v3 certificate is a DER-encoded (ASN.1) structure: TBSCertificate (to-be-signed: version, serial number, signature algorithm, issuer, validity, subject, subject public key info, extensions), signature algorithm identifier, and the signature value. The whole is wrapped in a SEQUENCE.
| field | size | meaning |
|---|---|---|
| Certificate SEQUENCE | variable | Outer SEQUENCE wrapping tbsCertificate, signatureAlgorithm, signatureValue. |
| tbsCertificate | variable | SEQUENCE: version [0] (v3), serialNumber INTEGER, signature AlgorithmIdentifier, issuer Name, validity (notBefore, notAfter), subject Name, subjectPublicKeyInfo, issuerUniqueID [1], subjectUniqueID [2], extensions [3]. |
| signatureAlgorithm | variable | AlgorithmIdentifier (OID + parameters) for the signature (e.g. sha256WithRSAEncryption 1.2.840.113549.1.1.11). |
| signatureValue | variable | BIT STRING containing the signature bytes. |
example:
30 82 03 00 30 82 02 00 a0 03 02 01 02 02 01 01 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00
DER prefix: SEQUENCE { SEQUENCE { [0] version v3, serial 1, sig alg sha256WithRSAEncryption ... } }
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/x509-certificate
or /wire-format/x509-certificate.json