pub fn spki_of_leaf(cert: &CertificateDer<'_>) -> Option<Vec<u8>>Expand description
Extract the DER-encoded SubjectPublicKeyInfo of a leaf certificate by
walking Certificate -> TBSCertificate -> (version?) serial, signature,
issuer, validity, subject, SPKI. Returns the SPKI DER including its own
SEQUENCE header (the same encoding SigningKey::public_key yields) or
None on any structural shortcoming (treated as a mismatch by the
caller, which rejects).