1 .\" $OpenBSD: d2i_BASIC_CONSTRAINTS.3,v 1.3 2018/03/22 21:08:22 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: March 22 2018 $
18 .Dt D2I_BASIC_CONSTRAINTS 3
21 .Nm d2i_BASIC_CONSTRAINTS ,
22 .Nm i2d_BASIC_CONSTRAINTS ,
23 .Nm d2i_EXTENDED_KEY_USAGE ,
24 .Nm i2d_EXTENDED_KEY_USAGE
25 .Nd decode and encode X.509 key usage purposes
28 .Ft BASIC_CONSTRAINTS *
29 .Fo d2i_BASIC_CONSTRAINTS
30 .Fa "BASIC_CONSTRAINTS **val_out"
31 .Fa "const unsigned char **der_in"
35 .Fo i2d_BASIC_CONSTRAINTS
36 .Fa "BASIC_CONSTRAINTS *val_in"
37 .Fa "unsigned char **der_out"
39 .Ft EXTENDED_KEY_USAGE *
40 .Fo d2i_EXTENDED_KEY_USAGE
41 .Fa "EXTENDED_KEY_USAGE **val_out"
42 .Fa "const unsigned char **der_in"
46 .Fo i2d_EXTENDED_KEY_USAGE
47 .Fa "EXTENDED_KEY_USAGE *val_in"
48 .Fa "unsigned char **der_out"
51 These functions decode and encode data structures describing the
52 intended purposes that the key contained in an X.509 certificate
54 For details about the semantics, examples, caveats, and bugs, see
57 .Fn d2i_BASIC_CONSTRAINTS
59 .Fn i2d_BASIC_CONSTRAINTS
60 decode and encode an ASN.1
62 structure defined in RFC 5280 section 4.2.1.9.
64 .Fn d2i_EXTENDED_KEY_USAGE
66 .Fn i2d_EXTENDED_KEY_USAGE
67 decode and encode an ASN.1
69 structure defined in RFC 5280 section 4.2.1.12.
71 .Fn d2i_BASIC_CONSTRAINTS
73 .Fn d2i_EXTENDED_KEY_USAGE
77 .Vt EXTENDED_KEY_USAGE
78 object, respectively, or
82 .Fn i2d_BASIC_CONSTRAINTS
84 .Fn i2d_EXTENDED_KEY_USAGE
85 return the number of bytes successfully encoded or a negative value
89 .Xr BASIC_CONSTRAINTS_new 3 ,
90 .Xr EXTENDED_KEY_USAGE_new 3 ,
91 .Xr X509_EXTENSION_new 3
93 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
94 Certificate Revocation List (CRL) Profile
96 .Fn d2i_BASIC_CONSTRAINTS
98 .Fn i2d_BASIC_CONSTRAINTS
99 first appeared in OpenSSL 0.9.2b and have been available since
102 .Fn d2i_EXTENDED_KEY_USAGE
104 .Fn i2d_EXTENDED_KEY_USAGE
105 first appeared in OpenSSL 0.9.7 and have been available since