libc: make stdio_impl.h an internal libc header
[unleashed/tickless.git] / lib / libcrypto / man / d2i_X509_EXTENSION.3
blob8b31e2c667dcce23adeeedc65275d7e9eeb25cad
1 .\"     $OpenBSD: d2i_X509_EXTENSION.3,v 1.1 2016/12/28 13:45:30 schwarze Exp $
2 .\"
3 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4 .\"
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.
8 .\"
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.
16 .\"
17 .Dd $Mdocdate: December 28 2016 $
18 .Dt D2I_X509_EXTENSION 3
19 .Os
20 .Sh NAME
21 .Nm d2i_X509_EXTENSION ,
22 .Nm i2d_X509_EXTENSION ,
23 .Nm d2i_X509_EXTENSIONS ,
24 .Nm i2d_X509_EXTENSIONS
25 .\" In the next line, the capital "E" is not a typo.
26 .\" The ASN.1 structure is called "Extensions", not "extensions".
27 .Nd decode and encode X.509 Extensions
28 .Sh SYNOPSIS
29 .In openssl/x509.h
30 .Ft X509_EXTENSION *
31 .Fo d2i_X509_EXTENSION
32 .Fa "X509_EXTENSION **val_out"
33 .Fa "const unsigned char **der_in"
34 .Fa "long length"
35 .Fc
36 .Ft int
37 .Fo i2d_X509_EXTENSION
38 .Fa "X509_EXTENSION *val_in"
39 .Fa "unsigned char **der_out"
40 .Fc
41 .Ft X509_EXTENSIONS *
42 .Fo d2i_X509_EXTENSIONS
43 .Fa "X509_EXTENSIONS **val_out"
44 .Fa "const unsigned char **der_in"
45 .Fa "long length"
46 .Fc
47 .Ft int
48 .Fo i2d_X509_EXTENSIONS
49 .Fa "X509_EXTENSIONS *val_in"
50 .Fa "unsigned char **der_out"
51 .Fc
52 .Sh DESCRIPTION
53 .Fn d2i_X509_EXTENSION
54 and
55 .Fn i2d_X509_EXTENSION
56 decode and encode an ASN.1
57 .Vt Extension
58 structure defined in RFC 5280 section 4.1.
59 .Pp
60 .Fn d2i_X509_EXTENSIONS
61 and
62 .Fn i2d_X509_EXTENSIONS
63 decode and encode an ASN.1
64 .Vt Extensions
65 structure defined in RFC 5280 section 4.1,
66 which is a SEQUENCE OF
67 .Vt Extension .
68 .Sh RETURN VALUES
69 .Fn d2i_X509_EXTENSION
70 and
71 .Fn d2i_X509_EXTENSIONS
72 return an
73 .Vt X509_EXTENSION
75 .Vt X509_EXTENSIONS
76 object, respectively, or
77 .Dv NULL
78 if an error occurs.
79 .Pp
80 .Fn i2d_X509_EXTENSION
81 and
82 .Fn i2d_X509_EXTENSIONS
83 return the number of bytes successfully encoded or a negative value
84 if an error occurs.
85 .Sh SEE ALSO
86 .Xr ASN1_item_d2i 3 ,
87 .Xr X509_EXTENSION_new 3 ,
88 .Xr X509V3_get_d2i 3 ,
89 .Xr X509v3_get_ext_by_NID 3
90 .Sh STANDARDS
91 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
92 Certificate Revocation List (CRL) Profile