SMIME_read_ASN1_ex

Parse an S/MIME message into an ASN.1 structure described by it.

Synopsis

Declared in <openssl/asn1.h>

ASN1_VALUE*
SMIME_read_ASN1_ex(
    BIO* bio,
    int flags,
    BIO** bcont,
    ASN1_ITEM const* it,
    ASN1_VALUE** x,
    OSSL_LIB_CTX* libctx,
    char const* propq);

Return Value

Parsed ASN1_VALUE, or NULL on error.

Parameters

NameDescription
bioBIO that supplies the S/MIME input.
flagsCMS_BINARY and/or SMIME_ASCIICRLF control binary vs canonical text handling.
bcontIf non-NULL, set to a memory BIO holding cleartext signed content, or NULL when absent.
itItem descriptor such as ASN1_ITEM_rptr(CMS_ContentInfo) or ASN1_ITEM_rptr(PKCS7).
xOptional existing ASN1_VALUE of type it to reuse, or NULL to allocate a new one.
libctxLibrary context for algorithm fetches during parsing, or NULL for the default.
propqProperty query for those fetches, or NULL.