[#PKCS12_create] = PKCS12_create :mrdocs: Create a PKCS#12 structure from a key, certificate, and optional CA stack (default library context). == Synopsis Declared in `<openssl/pkcs12.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:PKCS12.adoc[PKCS12]* PKCS12_create( char const* pass, char const* name, xref:EVP_PKEY.adoc[EVP_PKEY]* pkey, xref:X509.adoc[X509]* cert, xref:stack_st_X509.adoc[stack_st_X509]* ca, int nid_key, int nid_cert, int iter, int mac_iter, int keytype); ---- == Return Value New PKCS#12 structure, or NULL on error. == Parameters [cols="1,4"] |=== | Name| Description | *pass* | Passphrase for encryption and MAC. | *name* | Friendly name for the key and certificate. | *pkey* | Private key to include, or NULL. | *cert* | Entity certificate to include, or NULL. | *ca* | Optional additional certificates, or NULL. | *nid_key* | PBE NID for key encryption, or 0/‐1 for defaults/no encryption. | *nid_cert* | PBE NID for certificate encryption, or 0/‐1 for defaults/no encryption. | *iter* | Encryption iteration count, or 0 for default. | *mac_iter* | MAC iteration count, or 0/‐1 for default/omit MAC. | *keytype* | MS key‐usage flag (KEY_SIG or KEY_EX), or 0 to omit. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#