[#PKCS12_item_pack_safebag]
= PKCS12&lowbar;item&lowbar;pack&lowbar;safebag
:mrdocs:

Pack an ASN&period;1 object into a certBag or crlBag safeBag&period;

== Synopsis

Declared in `&lt;openssl&sol;pkcs12&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:PKCS12_SAFEBAG.adoc[PKCS12&lowbar;SAFEBAG]*
PKCS12&lowbar;item&lowbar;pack&lowbar;safebag(
    void* obj,
    xref:ASN1_ITEM.adoc[ASN1&lowbar;ITEM] const* it,
    int nid1,
    int nid2);
----

== Return Value

New safeBag, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *obj*
| Object to pack (e&period;g&period; X509 or X509&lowbar;CRL)&period;
| *it*
| ASN&period;1 item descriptor for `obj&period;`
| *nid1*
| NID of the inner bag type (e&period;g&period; NID&lowbar;x509Certificate)&period;
| *nid2*
| NID of the outer safeBag type (e&period;g&period; NID&lowbar;certBag)&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
