Skip to main content

extract_public_key_from_cert

Function extract_public_key_from_cert 

Source
pub fn extract_public_key_from_cert(cert_der: &[u8]) -> Result<Vec<u8>, Error>
Expand description

Extract raw public key bytes from an X.509 certificate (DER-encoded).

Returns the key material (e.g. uncompressed P-256 point, Ed25519 key bytes) stripped of the unused-bits byte from the BIT STRING encoding.