Expand description
Just enough DER to fill in a certificate record’s attributes.
A keychain stores several fields of an X.509 certificate alongside the certificate itself: the subject and issuer names, the serial number, the subject key identifier, and a hash of the public key. Every one of them is a copy of bytes already in the certificate, so this module locates fields and hands back slices. It does not decode, validate, or re-encode anything, and it is not a general ASN.1 library — that boundary is what keeps it small enough to be obviously right.
Field positions come from RFC 5280:
Certificate ::= SEQUENCE { tbsCertificate, signatureAlgorithm, signature }
TBSCertificate ::= SEQUENCE { [0] version OPTIONAL, serialNumber, signature,
issuer, validity, subject,
subjectPublicKeyInfo, ... [3] extensions }Modules§
- tag
- Universal and context tags this module names.
Structs§
- Certificate
- The parts of a certificate a keychain record stores.
- Private
KeyInfo - A PKCS#8
PrivateKeyInfo, enough of it to describe the key. - Tlv
- A tag-length-value element, with its contents located inside the input.
Constants§
- OID_
EC_ PUBLIC_ KEY id-ecPublicKey(1.2.840.10045.2.1).- OID_
RSA_ ENCRYPTION rsaEncryption(1.2.840.113549.1.1.1).
Functions§
- pem_
or_ der - Decode PEM if the input looks like it, otherwise pass DER through.
- read
- Read one element at
at.