[#PKCS12_add_safe] = PKCS12_add_safe :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( 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); ---- == 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#