[#PKCS12_add_safe_ex] = PKCS12_add_safe_ex :mrdocs: Pack safeBags into a PKCS#7 contentInfo and append it to a stack of safes. == Synopsis Declared in `<openssl/pkcs12.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int PKCS12_add_safe_ex( xref:stack_st_PKCS7.adoc[stack_st_PKCS7]** psafes, xref:stack_st_PKCS12_SAFEBAG.adoc[stack_st_PKCS12_SAFEBAG]* bags, int safe_nid, int iter, char const* pass, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* ctx, char const* propq); ---- == Return Value 1 on success, 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *psafes* | Address of PKCS#7 stack pointer (created if *`psafes` is NULL). | *bags* | Stack of safeBags to pack. | *safe_nid* | ‐1 for plain data, 0 for default encrypted, or a PBE NID for encrypted. | *iter* | Iteration count for encryption, or 0 for default (2048). | *pass* | Passphrase when `safe_nid` selects encryption, or NULL for plain data. | *ctx* | Library context for algorithm fetching, or NULL for default. | *propq* | Property query for algorithm fetching, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#