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