PKCS12_SAFEBAG_new
,
PKCS12_SAFEBAG_free
,
PKCS12_BAGS_new
,
PKCS12_BAGS_free
— PKCS#12
container for one piece of information
#include
<openssl/pkcs12.h>
PKCS12_SAFEBAG *
PKCS12_SAFEBAG_new
(void);
void
PKCS12_SAFEBAG_free
(PKCS12_SAFEBAG
*safebag);
PKCS12_BAGS *
PKCS12_BAGS_new
(void);
void
PKCS12_BAGS_free
(PKCS12_BAGS
*bag);
PKCS12_SAFEBAG_new
()
allocates and initializes an empty PKCS12_SAFEBAG
object, representing an ASN.1 SafeBag structure
defined in RFC 7292 section 4.2. It can hold a pointer to a
PKCS12_BAGS object together with a type identifier and
optional attributes.
PKCS12_SAFEBAG_free
()
frees safebag.
PKCS12_BAGS_new
()
allocates and initializes an empty PKCS12_BAGS object,
representing the bagValue field of an ASN.1 SafeBag
structure. It is used in PKCS12_SAFEBAG and can hold a
DER-encoded X.509 certificate, a base64-encoded SDSI certificate, a
DER-encoded X.509 CRL, or other user-defined information.
If an instance of PKCS12_SAFEBAG contains
PKCS8_PRIV_KEY_INFO, X509_SIG,
or nested PKCS12_SAFEBAG objects, the respective
pointers are stored directly in the PKCS12_SAFEBAG
object rather than in the contained PKCS12_BAGS object
as required by RFC 7292.
PKCS12_SAFEBAG_new
() and
PKCS12_BAGS_new
() return the new
PKCS12_SAFEBAG or PKCS12_BAGS
object, respectively, or NULL
if an error
occurs.
RFC 7292: PKCS #12: Personal Information Exchange Syntax, section
4.2: The SafeBag Type
PKCS12_SAFEBAG_new
(),
PKCS12_SAFEBAG_free
(),
PKCS12_BAGS_new
(), and
PKCS12_BAGS_free
() first appeared in OpenSSL 0.9.3
and have been available since OpenBSD 2.6.