summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-12-26 18:04:46 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-12-26 18:04:46 +0000
commitdcc39ffdb1911d10a0dead20637b71e375120abd (patch)
treeb0423e7e8e25bf5e133a2218744f8b9c0b4f0ed0 /lib
parent6a52ca3bc05c6169d1f10c3b5374ff06ecf37707 (diff)
Write the missing d2i_PKCS12(3) manual page from scratch.
It is already referenced from some other manuals. All these functions are listed in <openssl/pkcs12.h> and in OpenSSL doc/man3/d2i_X509.pod.
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/man/Makefile3
-rw-r--r--lib/libcrypto/man/d2i_PKCS12.3186
2 files changed, 188 insertions, 1 deletions
diff --git a/lib/libcrypto/man/Makefile b/lib/libcrypto/man/Makefile
index a7d1d9a7e61..f260c0d4ee9 100644
--- a/lib/libcrypto/man/Makefile
+++ b/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.101 2016/12/24 21:42:30 schwarze Exp $
+# $OpenBSD: Makefile,v 1.102 2016/12/26 18:04:45 schwarze Exp $
.include <bsd.own.mk>
@@ -231,6 +231,7 @@ MAN= \
d2i_DHparams.3 \
d2i_DSAPublicKey.3 \
d2i_ECPKParameters.3 \
+ d2i_PKCS12.3 \
d2i_PKCS8PrivateKey_bio.3 \
d2i_PrivateKey.3 \
d2i_RSAPublicKey.3 \
diff --git a/lib/libcrypto/man/d2i_PKCS12.3 b/lib/libcrypto/man/d2i_PKCS12.3
new file mode 100644
index 00000000000..5b1513002bc
--- /dev/null
+++ b/lib/libcrypto/man/d2i_PKCS12.3
@@ -0,0 +1,186 @@
+.\" $OpenBSD: d2i_PKCS12.3,v 1.1 2016/12/26 18:04:45 schwarze Exp $
+.\"
+.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: December 26 2016 $
+.Dt D2I_PKCS12 3
+.Os
+.Sh NAME
+.Nm d2i_PKCS12 ,
+.Nm i2d_PKCS12 ,
+.Nm d2i_PKCS12_bio ,
+.Nm i2d_PKCS12_bio ,
+.Nm d2i_PKCS12_fp ,
+.Nm i2d_PKCS12_fp ,
+.Nm d2i_PKCS12_MAC_DATA ,
+.Nm i2d_PKCS12_MAC_DATA ,
+.Nm d2i_PKCS12_SAFEBAG ,
+.Nm i2d_PKCS12_SAFEBAG ,
+.Nm d2i_PKCS12_BAGS ,
+.Nm i2d_PKCS12_BAGS
+.Nd decode and encode PKCS#12 structures
+.Sh SYNOPSIS
+.In openssl/pkcs12.h
+.Ft PKCS12 *
+.Fo d2i_PKCS12
+.Fa "PKCS12 **val_out"
+.Fa "const unsigned char **der_in"
+.Fa "long length"
+.Fc
+.Ft int
+.Fo i2d_PKCS12
+.Fa "PKCS12 *val_in"
+.Fa "unsigned char **der_out"
+.Fc
+.Ft PKCS12 *
+.Fo d2i_PKCS12_bio
+.Fa "BIO *in_bio"
+.Fa "PKCS12 **val_out"
+.Fc
+.Ft int
+.Fo i2d_PKCS12_bio
+.Fa "BIO *out_bio"
+.Fa "PKCS12 *val_in"
+.Fc
+.Ft PKCS12 *
+.Fo d2i_PKCS12_fp
+.Fa "FILE *in_fp"
+.Fa "PKCS12 **val_out"
+.Fc
+.Ft int
+.Fo i2d_PKCS12_fp
+.Fa "FILE *out_fp"
+.Fa "PKCS12 *val_in"
+.Fc
+.Ft PKCS12_MAC_DATA *
+.Fo d2i_PKCS12_MAC_DATA
+.Fa "PKCS12_MAC_DATA **val_out"
+.Fa "const unsigned char **der_in"
+.Fa "long length"
+.Fc
+.Ft int
+.Fo i2d_PKCS12_MAC_DATA
+.Fa "PKCS12_MAC_DATA *val_in"
+.Fa "unsigned char **der_out"
+.Fc
+.Ft PKCS12_SAFEBAG *
+.Fo d2i_PKCS12_SAFEBAG
+.Fa "PKCS12_SAFEBAG **val_out"
+.Fa "const unsigned char **der_in"
+.Fa "long length"
+.Fc
+.Ft int
+.Fo i2d_PKCS12_SAFEBAG
+.Fa "PKCS12_SAFEBAG *val_in"
+.Fa "unsigned char **der_out"
+.Fc
+.Ft PKCS12_BAGS *
+.Fo d2i_PKCS12_BAGS
+.Fa "PKCS12_BAGS **val_out"
+.Fa "const unsigned char **der_in"
+.Fa "long length"
+.Fc
+.Ft int
+.Fo i2d_PKCS12_BAGS
+.Fa "PKCS12_BAGS *val_in"
+.Fa "unsigned char **der_out"
+.Fc
+.Sh DESCRIPTION
+These functions decode and encode PKCS#12 structures.
+For details about the semantics, examples, caveats, and bugs, see
+.Xr ASN1_item_d2i 3 .
+.Pp
+.Fn d2i_PKCS12
+and
+.Fn i2d_PKCS12
+decode and encode an ASN.1
+.Vt PFX
+.Pq personal information exchange
+structure defined in RFC 7292 section 4.
+.Fn d2i_PKCS12_bio ,
+.Fn i2d_PKCS12_bio ,
+.Fn d2i_PKCS12_fp ,
+and
+.Fn i2d_PKCS12_fp
+are similar except that they decode or encode using a
+.Vt BIO
+or
+.Vt FILE
+pointer.
+.Pp
+.Fn d2i_PKCS12_MAC_DATA
+and
+.Fn i2d_PKCS12_MAC_DATA
+decode and encode an ASN.1
+.Vt MacData
+structure defined in RFC 7292 section 4.
+.Pp
+.Fn d2i_PKCS12_SAFEBAG
+and
+.Fn i2d_PKCS12_SAFEBAG
+decode and encode an ASN.1
+.Vt SafeBag
+structure defined in RFC 7292 section 4.2.
+.Pp
+.Fn d2i_PKCS12_BAGS
+and
+.Fn i2d_PKCS12_BAGS
+decode and encode the bagValue field of an ASN.1
+.Vt SafeBag
+structure.
+.Sh RETURN VALUES
+.Fn d2i_PKCS12 ,
+.Fn d2i_PKCS12_bio ,
+and
+.Fn d2i_PKCS12_fp
+return a
+.Vt PKCS12
+object or
+.Dv NULL
+if an error occurs.
+.Pp
+.Fn d2i_PKCS12_MAC_DATA ,
+.Fn d2i_PKCS12_SAFEBAG ,
+and
+.Fn d2i_PKCS12_BAGS
+return a
+.Vt PKCS12_MAC_DATA ,
+.Vt PKCS12_SAFEBAG ,
+or
+.Vt PKCS12_BAGS
+object, respectively, or
+.Dv NULL
+if an error occurs.
+.Pp
+.Fn i2d_PKCS12 ,
+.Fn i2d_PKCS12_MAC_DATA ,
+.Fn i2d_PKCS12_SAFEBAG ,
+and
+.Fn i2d_PKCS12_BAGS
+return the number of bytes successfully encoded or a negative value
+if an error occurs.
+.Pp
+.Fn i2d_PKCS12_bio
+and
+.Fn i2d_PKCS12_fp
+return 1 for success or 0 if an error occurs.
+.Sh SEE ALSO
+.Xr ASN1_item_d2i 3 ,
+.Xr PKCS12_create 3 ,
+.Xr PKCS12_new 3 ,
+.Xr PKCS12_parse 3 ,
+.Xr PKCS12_SAFEBAG_new 3
+.Sh STANDARDS
+RFC 7292: PKCS #12: Personal Information Exchange Syntax