update libressl to v2.7.4
[unleashed.git] / lib / libcrypto / man / X509_NAME_new.3
blob27ab03dfab3d4ef3f40b57fad95f364fc496543b
1 .\"     $OpenBSD: X509_NAME_new.3,v 1.4 2018/03/21 03:16:08 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 21 2018 $
18 .Dt X509_NAME_NEW 3
19 .Os
20 .Sh NAME
21 .Nm X509_NAME_new ,
22 .Nm X509_NAME_free
23 .\" In the following line, "X.501" and "Name" are not typos.
24 .\" The "Name" type is defined in X.501, not in X.509.
25 .\" The type in called "Name" with capital "N", not "name".
26 .Nd X.501 Name object
27 .Sh SYNOPSIS
28 .In openssl/x509.h
29 .Ft X509_NAME *
30 .Fn X509_NAME_new void
31 .Ft void
32 .Fn X509_NAME_free "X509_NAME *name"
33 .Sh DESCRIPTION
34 An X.501
35 .Vt Name
36 is an ordered sequence of relative distinguished names.
37 A relative distinguished name is a set of key-value pairs; see
38 .Xr X509_NAME_ENTRY_new 3
39 for details.
40 .Pp
41 Various X.509 structures contain X.501
42 .Vt Name
43 substructures.
44 They are for example used for the issuers of certificates and
45 certificate revocation lists and for the subjects of certificates
46 and certificate requests.
47 .Pp
48 .Fn X509_NAME_new
49 allocates and initializes an empty
50 .Vt X509_NAME
51 object, representing an ASN.1
52 .Vt Name
53 structure defined in RFC 5280 section 4.1.2.4.
54 Data can be added to such objects with the functions described in
55 .Xr X509_NAME_add_entry_by_txt 3 ,
56 and they can be inspected with the functions described in
57 .Xr X509_NAME_get_index_by_NID 3 .
58 .Pp
59 .Fn X509_NAME_free
60 frees
61 .Fa name
62 and all the
63 .Vt X509_NAME_ENTRY
64 objects contained in it.
65 .Sh RETURN VALUES
66 .Fn X509_NAME_new
67 returns a new
68 .Vt X509_NAME
69 object or
70 .Dv NULL
71 if an error occurred.
72 .Sh SEE ALSO
73 .Xr d2i_X509_NAME 3 ,
74 .Xr GENERAL_NAME_new 3 ,
75 .Xr NAME_CONSTRAINTS_new 3 ,
76 .Xr SSL_load_client_CA_file 3 ,
77 .Xr X509_get_subject_name 3 ,
78 .Xr X509_NAME_add_entry_by_txt 3 ,
79 .Xr X509_NAME_ENTRY_new 3 ,
80 .Xr X509_NAME_get_index_by_NID 3 ,
81 .Xr X509_NAME_print_ex 3
82 .Sh STANDARDS
83 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
84 Certificate Revocation List (CRL) Profile
85 .Pp
86 ITU-T Recommendation X.501, also known as ISO/IEC 9594-2:
87 Information Technology \(en Open Systems Interconnection \(en
88 The Directory: Models, section 9: Names
89 .Sh HISTORY
90 .Fn X509_NAME_new
91 and
92 .Fn X509_NAME_free
93 appeared before SSLeay 0.8 and have been available since
94 .Ox 2.4 .