Modules§
- key_
usage - Key usage bit positions
Structs§
- X509
Time - Parsed X.509 time (UTCTime or GeneralizedTime).
Enums§
Constants§
- OID_
BASIC_ CONSTRAINTS - 2.5.29.19 – Basic Constraints
- OID_
ECDSA_ SHA256 - 1.2.840.10045.4.3.2 – ecdsa-with-SHA256
- OID_
ECDSA_ SHA384 - 1.2.840.10045.4.3.3 – ecdsa-with-SHA384
- OID_
EC_ PUBLIC_ KEY - OID_
EC_ PUBLIC_ KEY_ ALG - 1.2.840.10045.2.1 – ecPublicKey (algorithm OID in SPKI)
- OID_
ED25519 - 1.3.101.112 – id-Ed25519
- OID_EKU
- 2.5.29.37 – Extended Key Usage
- OID_
EKU_ SERVER_ AUTH - 1.3.6.1.5.5.7.3.1 – serverAuth EKU
- OID_
KEY_ USAGE - 2.5.29.15 – Key Usage
- OID_
RSA_ PSS - 1.2.840.113549.1.1.10 – id-RSASSA-PSS
- OID_
RSA_ SHA256 - 1.2.840.113549.1.1.11 – sha256WithRSAEncryption
- OID_
RSA_ SHA384 - 1.2.840.113549.1.1.12 – sha384WithRSAEncryption
- OID_
RSA_ SHA512 - 1.2.840.113549.1.1.13 – sha512WithRSAEncryption
- OID_SAN
- 2.5.29.17 – Subject Alternative Name
Functions§
- check_
san_ dns_ name - Check whether any SAN dNSName matches the given server name, without allocating.
- debug_
dn_ pairs - Debug helper: format a DN as a string of “OID=value” pairs.
- dn_
equal - Compare two Distinguished Name byte slices for equality, normalising the SET/SET-OF structure.
- extract_
issuer_ dn - Extract the raw DER-encoded issuer Distinguished Name from an X.509 certificate.
- extract_
key_ from_ spki - Extract raw public key bytes from a SubjectPublicKeyInfo DER blob.
- extract_
public_ key_ from_ cert - Extract raw public key bytes from an X.509 certificate (DER-encoded).
- extract_
signature_ algorithm_ oid - Extract the signature algorithm OID from an X.509 certificate.
- extract_
signature_ value - Extract the signature value from a DER-encoded X.509 certificate.
- extract_
spki_ algorithm_ oid - Extract the algorithm OID from a SubjectPublicKeyInfo DER blob.
- extract_
spki_ from_ cert - Extract the SubjectPublicKeyInfo DER from an X.509 certificate.
- extract_
subject_ dn - Extract the raw DER-encoded subject Distinguished Name from an X.509 certificate.
- extract_
tbs_ cert - Extract the raw TBSCertificate bytes (tag + length + value) from a DER-encoded X.509 certificate.
- find_
extension - Find the value of an extension by OID.
- has_
eku_ server_ auth - Check whether the Extended Key Usage extension includes
serverAuth(1.3.6.1.5.5.7.3.1). - is_ca
- Check whether the certificate is a CA via the Basic Constraints extension.
- parse_
key_ usage - Parse the Key Usage extension and return the raw bit mask as a
u16. - parse_
san_ dns_ names - Parse DNS names from the Subject Alternative Name extension.
- parse_
validity - Parse the validity period from an X.509 certificate.