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