1 =pod 2 3 =head1 NAME 4 5 PKCS12_init, PKCS12_init_ex - Create a new empty PKCS#12 structure 6 7 =head1 SYNOPSIS 8 9 #include <openssl/pkcs12.h> 10 11 PKCS12 *PKCS12_init(int mode); 12 PKCS12 *PKCS12_init_ex(int mode, OSSL_LIB_CTX *ctx, const char *propq); 13 14 =head1 DESCRIPTION 15 16 PKCS12_init() creates an empty PKCS#12 structure. Any PKCS#7 authSafes added 17 to this structure are enclosed first within a single PKCS#7 contentInfo 18 of type I<mode>. Currently the only supported type is B<NID_pkcs7_data>. 19 20 PKCS12_init_ex() creates an empty PKCS#12 structure and assigns the supplied 21 I<ctx> and I<propq> to be used to select algorithm implementations for 22 operations performed on the B<PKCS12> object. 23 24 =head1 RETURN VALUES 25 26 PKCS12_init() and PKCS12_init_ex() return a valid B<PKCS12> structure or NULL 27 if an error occurred. 28 29 =head1 SEE ALSO 30 31 L<d2i_PKCS12(3)>, 32 L<PKCS12_create(3)>, 33 L<passphrase-encoding(7)> 34 35 =head1 HISTORY 36 37 PKCS12_init_ex() was added in OpenSSL 3.0. 38 39 =head1 COPYRIGHT 40 41 Copyright 2021 The OpenSSL Project Authors. All Rights Reserved. 42 43 Licensed under the Apache License 2.0 (the "License"). You may not use 44 this file except in compliance with the License. You can obtain a copy 45 in the file LICENSE in the source distribution or at 46 L<https://www.openssl.org/source/license.html>. 47 48 =cut 49