Skip to main content

encode_signed_data_der

Function encode_signed_data_der 

Source
pub fn encode_signed_data_der(
    signed_data: &SignedData,
) -> Result<Vec<u8>, DerError>
Expand description

Encode a SignedData into DER bytes.

Produces the outer ContentInfo wrapper per RFC 5652 ยง3:

ContentInfo ::= SEQUENCE {
    contentType OBJECT IDENTIFIER,  -- 1.2.840.113549.1.7.2 (signedData)
    content [0] EXPLICIT ANY DEFINED BY contentType }