update libressl to v2.7.4
[unleashed.git] / lib / libcrypto / man / NAME_CONSTRAINTS_new.3
blobdb64e14ce4df987abfbc832ec7bca044dbda4713
1 .\"     $OpenBSD: NAME_CONSTRAINTS_new.3,v 1.3 2018/03/23 00:09:11 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: March 23 2018 $
18 .Dt NAME_CONSTRAINTS_NEW 3
19 .Os
20 .Sh NAME
21 .Nm NAME_CONSTRAINTS_new ,
22 .Nm NAME_CONSTRAINTS_free ,
23 .Nm GENERAL_SUBTREE_new ,
24 .Nm GENERAL_SUBTREE_free
25 .Nd X.509 CA name constraints extension
26 .Sh SYNOPSIS
27 .In openssl/x509v3.h
28 .Ft NAME_CONSTRAINTS *
29 .Fn NAME_CONSTRAINTS_new void
30 .Ft void
31 .Fn NAME_CONSTRAINTS_free "NAME_CONSTRAINTS *names"
32 .Ft GENERAL_SUBTREE *
33 .Fn GENERAL_SUBTREE_new void
34 .Ft void
35 .Fn GENERAL_SUBTREE_free "GENERAL_SUBTREE *name"
36 .Sh DESCRIPTION
37 X.509 CA certificates can use the name constraints extension
38 to restrict the subject names of subsequent certificates in a
39 certification path.
40 .Pp
41 .Fn NAME_CONSTRAINTS_new
42 allocates and initializes an empty
43 .Vt NAME_CONSTRAINTS
44 object, representing an ASN.1
45 .Vt NameConstraints
46 structure defined in RFC 5280 section 4.2.1.10.
47 It consists of two
48 .Vt STACK_OF(GENERAL_SUBTREE)
49 objects, one specifying permitted names, the other excluded names.
50 .Fn NAME_CONSTRAINTS_free
51 frees
52 .Fa names .
53 .Pp
54 .Fn GENERAL_SUBTREE_new
55 allocates and initializes an empty
56 .Vt GENERAL_SUBTREE
57 object, representing an ASN.1
58 .Vt GeneralSubtree
59 structure defined in RFC 5280 section 4.2.1.10.
60 It is a trivial wrapper around the
61 .Vt GENERAL_NAME
62 object documented in
63 .Xr GENERAL_NAME_new 3 .
64 The standard requires the other fields of
65 .Vt GENERAL_SUBTREE
66 to be ignored.
67 .Fn GENERAL_SUBTREE_free
68 frees
69 .Fa name .
70 .Sh RETURN VALUES
71 .Fn NAME_CONSTRAINTS_new
72 and
73 .Fn GENERAL_SUBTREE_new
74 return the new
75 .Vt NAME_CONSTRAINTS
77 .Vt GENERAL_SUBTREE
78 object, respectively, or
79 .Dv NULL
80 if an error occurs.
81 .Sh SEE ALSO
82 .Xr BASIC_CONSTRAINTS_new 3 ,
83 .Xr GENERAL_NAMES_new 3 ,
84 .Xr X509_EXTENSION_new 3 ,
85 .Xr X509_new 3
86 .Sh STANDARDS
87 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
88 Certificate Revocation List (CRL) Profile,
89 section 4.2.1.10: Name Constraints
90 .Sh HISTORY
91 .Fn NAME_CONSTRAINTS_new ,
92 .Fn NAME_CONSTRAINTS_free ,
93 .Fn GENERAL_SUBTREE_new ,
94 and
95 .Fn GENERAL_SUBTREE_free
96 first appeared in OpenSSL 0.9.8 and have been available since
97 .Ox 4.5 .