diff options
author | schwarze <> | 2016-12-14 15:04:13 +0000 |
---|---|---|
committer | schwarze <> | 2016-12-14 15:04:13 +0000 |
commit | 94e8040f4ec3560df5a4f4f3ffa38f3916b008b1 (patch) | |
tree | 72ca30d93cc48f10b0ca4cd4258ef39658f1e1a9 /src/lib | |
parent | f0d3da679928efe24e4f87b2ef31f9d768c91689 (diff) | |
download | openbsd-94e8040f4ec3560df5a4f4f3ffa38f3916b008b1.tar.gz openbsd-94e8040f4ec3560df5a4f4f3ffa38f3916b008b1.tar.bz2 openbsd-94e8040f4ec3560df5a4f4f3ffa38f3916b008b1.zip |
Write X509_NAME_new(3) manual from scratch. Both functions are
listed in <openssl/x509.h> and in OpenSSL doc/man3/X509_dup.pod.
Note that the OpenSSL documentation specifies the wrong header file.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_NAME_new.3 | 81 |
2 files changed, 83 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 426b3c4c9b..59cf7e6bce 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.78 2016/12/14 02:03:50 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.79 2016/12/14 15:04:13 schwarze Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -183,6 +183,7 @@ MAN= \ | |||
183 | X509_NAME_ENTRY_get_object.3 \ | 183 | X509_NAME_ENTRY_get_object.3 \ |
184 | X509_NAME_add_entry_by_txt.3 \ | 184 | X509_NAME_add_entry_by_txt.3 \ |
185 | X509_NAME_get_index_by_NID.3 \ | 185 | X509_NAME_get_index_by_NID.3 \ |
186 | X509_NAME_new.3 \ | ||
186 | X509_NAME_print_ex.3 \ | 187 | X509_NAME_print_ex.3 \ |
187 | X509_PUBKEY_new.3 \ | 188 | X509_PUBKEY_new.3 \ |
188 | X509_STORE_CTX_get_error.3 \ | 189 | X509_STORE_CTX_get_error.3 \ |
diff --git a/src/lib/libcrypto/man/X509_NAME_new.3 b/src/lib/libcrypto/man/X509_NAME_new.3 new file mode 100644 index 0000000000..56a23f975d --- /dev/null +++ b/src/lib/libcrypto/man/X509_NAME_new.3 | |||
@@ -0,0 +1,81 @@ | |||
1 | .\" $OpenBSD: X509_NAME_new.3,v 1.1 2016/12/14 15:04:13 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: December 14 2016 $ | ||
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 Name is an ordered sequence of relative distinguished names. | ||
35 | A relative distinguished name is a set of key-value pairs; see | ||
36 | .Xr X509_NAME_ENTRY_new 3 | ||
37 | for details. | ||
38 | .Pp | ||
39 | Various X.509 structures contain X.501 Name substructures. | ||
40 | They are for example used for the issuers of certificates and | ||
41 | certificate revocation lists and for the subjects of certificates | ||
42 | and certificate requests. | ||
43 | .Pp | ||
44 | .Fn X509_NAME_new | ||
45 | allocates and initializes an empty | ||
46 | .Vt X509_NAME | ||
47 | object, representing an ASN.1 Name structure | ||
48 | defined in RFC 5280 section 4.1.2.4. | ||
49 | Data can be added to such objects with the functions described in | ||
50 | .Xr X509_NAME_add_entry_by_txt 3 , | ||
51 | and they can be inspected with the functions described in | ||
52 | .Xr X509_NAME_get_index_by_NID 3 . | ||
53 | .Pp | ||
54 | .Fn X509_NAME_free | ||
55 | frees | ||
56 | .Fa name | ||
57 | and all the | ||
58 | .Vt X509_NAME_ENTRY | ||
59 | objects contained in it. | ||
60 | .Sh RETURN VALUES | ||
61 | .Fn X509_NAME_new | ||
62 | returns a new | ||
63 | .Vt X509_NAME | ||
64 | object or | ||
65 | .Dv NULL | ||
66 | if an error occurred. | ||
67 | .Sh SEE ALSO | ||
68 | .Xr d2i_X509_NAME 3 , | ||
69 | .Xr SSL_load_client_CA_file 3 , | ||
70 | .Xr X509_get_subject_name 3 , | ||
71 | .Xr X509_NAME_add_entry_by_txt 3 , | ||
72 | .Xr X509_NAME_ENTRY_new 3 , | ||
73 | .Xr X509_NAME_get_index_by_NID 3 , | ||
74 | .Xr X509_NAME_print_ex 3 | ||
75 | .Sh STANDARDS | ||
76 | RFC 5280: Internet X.509 Public Key Infrastructure Certificate and | ||
77 | Certificate Revocation List (CRL) Profile | ||
78 | .Pp | ||
79 | ITU-T Recommendation X.501, also known as ISO/IEC 9594-2: | ||
80 | Information Technology \(en Open Systems Interconnection \(en | ||
81 | The Directory: Models, section 9: Names | ||