1 .\" $OpenBSD: PKCS12_SAFEBAG_new.3,v 1.2 2016/12/25 22:15:10 schwarze Exp $
3 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .Dd $Mdocdate: December 25 2016 $
18 .Dt PKCS12_SAFEBAG_NEW 3
21 .Nm PKCS12_SAFEBAG_new ,
22 .Nm PKCS12_SAFEBAG_free ,
25 .Nd PKCS#12 container for one piece of information
29 .Fn PKCS12_SAFEBAG_new void
31 .Fn PKCS12_SAFEBAG_free "PKCS12_SAFEBAG *safebag"
33 .Fn PKCS12_BAGS_new void
35 .Fn PKCS12_BAGS_free "PKCS12_BAGS *bag"
37 .Fn PKCS12_SAFEBAG_new
38 allocates and initializes an empty
40 object, representing an ASN.1
42 structure defined in RFC 7292 section 4.2.
43 It can hold a pointer to a
45 object together with a type identifier and optional attributes.
46 .Fn PKCS12_SAFEBAG_free
51 allocates and initializes an empty
53 object, representing the bagValue field of an ASN.1
58 and can hold a DER-encoded X.509 certificate,
59 a base64-encoded SDSI certificate,
60 a DER-encoded X.509 CRL,
61 or other user-defined information.
66 .Vt PKCS8_PRIV_KEY_INFO ,
70 objects, the respective pointers are stored directly in the
72 object rather than in the contained
74 object as required by RFC 7292.
76 .Fn PKCS12_SAFEBAG_new
83 object, respectively, or
88 .Xr PKCS8_PRIV_KEY_INFO_new 3 ,
89 .Xr X509_ATTRIBUTE_new 3 ,
94 RFC 7292: PKCS #12: Personal Information Exchange Syntax,
95 section 4.2: The SafeBag Type