PKCS12_item_pack_safebag

Pack an ASN.1 object into a certBag or crlBag safeBag.

Synopsis

Declared in <openssl/pkcs12.h>

PKCS12_SAFEBAG*
PKCS12_item_pack_safebag(
    void* obj,
    ASN1_ITEM const* it,
    int nid1,
    int nid2);

Return Value

New safeBag, or NULL on error.

Parameters

NameDescription
objObject to pack (e.g. X509 or X509_CRL).
itASN.1 item descriptor for obj.
nid1NID of the inner bag type (e.g. NID_x509Certificate).
nid2NID of the outer safeBag type (e.g. NID_certBag).