Pack safeBags into a PKCS#7 contentInfo and append it to a stack of safes.
Declared in <openssl/pkcs12.h>
int
PKCS12_add_safe_ex(
stack_st_PKCS7** psafes,
stack_st_PKCS12_SAFEBAG* bags,
int safe_nid,
int iter,
char const* pass,
OSSL_LIB_CTX* ctx,
char const* propq);
1 on success, 0 on failure.
| 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. |