1 .\" $OpenBSD: NAME_CONSTRAINTS_new.3,v 1.3 2018/03/23 00:09:11 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 23 2018 $
18 .Dt NAME_CONSTRAINTS_NEW 3
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
28 .Ft NAME_CONSTRAINTS *
29 .Fn NAME_CONSTRAINTS_new void
31 .Fn NAME_CONSTRAINTS_free "NAME_CONSTRAINTS *names"
33 .Fn GENERAL_SUBTREE_new void
35 .Fn GENERAL_SUBTREE_free "GENERAL_SUBTREE *name"
37 X.509 CA certificates can use the name constraints extension
38 to restrict the subject names of subsequent certificates in a
41 .Fn NAME_CONSTRAINTS_new
42 allocates and initializes an empty
44 object, representing an ASN.1
46 structure defined in RFC 5280 section 4.2.1.10.
48 .Vt STACK_OF(GENERAL_SUBTREE)
49 objects, one specifying permitted names, the other excluded names.
50 .Fn NAME_CONSTRAINTS_free
54 .Fn GENERAL_SUBTREE_new
55 allocates and initializes an empty
57 object, representing an ASN.1
59 structure defined in RFC 5280 section 4.2.1.10.
60 It is a trivial wrapper around the
63 .Xr GENERAL_NAME_new 3 .
64 The standard requires the other fields of
67 .Fn GENERAL_SUBTREE_free
71 .Fn NAME_CONSTRAINTS_new
73 .Fn GENERAL_SUBTREE_new
78 object, respectively, or
82 .Xr BASIC_CONSTRAINTS_new 3 ,
83 .Xr GENERAL_NAMES_new 3 ,
84 .Xr X509_EXTENSION_new 3 ,
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
91 .Fn NAME_CONSTRAINTS_new ,
92 .Fn NAME_CONSTRAINTS_free ,
93 .Fn GENERAL_SUBTREE_new ,
95 .Fn GENERAL_SUBTREE_free
96 first appeared in OpenSSL 0.9.8 and have been available since