summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2016-12-28 14:33:34 +0000
committerschwarze <>2016-12-28 14:33:34 +0000
commit2fcb8c24b79fb891e0bc1ccc9bf7d2122256a7bb (patch)
tree08807b6d2995c3872a939fb11afbdcff210782aa
parent325f87a00fe03d369ba473865a83a92841f79dd5 (diff)
downloadopenbsd-2fcb8c24b79fb891e0bc1ccc9bf7d2122256a7bb.tar.gz
openbsd-2fcb8c24b79fb891e0bc1ccc9bf7d2122256a7bb.tar.bz2
openbsd-2fcb8c24b79fb891e0bc1ccc9bf7d2122256a7bb.zip
Use the same parameter names as in ASN1_item_d2i(3).
Use simpler standard wordings. Add X.509 references.
-rw-r--r--src/lib/libcrypto/man/d2i_X509_NAME.385
1 files changed, 32 insertions, 53 deletions
diff --git a/src/lib/libcrypto/man/d2i_X509_NAME.3 b/src/lib/libcrypto/man/d2i_X509_NAME.3
index d3c085784e..f5dc62fb8e 100644
--- a/src/lib/libcrypto/man/d2i_X509_NAME.3
+++ b/src/lib/libcrypto/man/d2i_X509_NAME.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: d2i_X509_NAME.3,v 1.7 2016/12/25 22:15:10 schwarze Exp $ 1.\" $OpenBSD: d2i_X509_NAME.3,v 1.8 2016/12/28 14:33:34 schwarze Exp $
2.\" OpenSSL d900a015 Oct 8 14:40:42 2015 +0200 2.\" OpenSSL d900a015 Oct 8 14:40:42 2015 +0200
3.\" 3.\"
4.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> 4.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17.\" 17.\"
18.Dd $Mdocdate: December 25 2016 $ 18.Dd $Mdocdate: December 28 2016 $
19.Dt D2I_X509_NAME 3 19.Dt D2I_X509_NAME 3
20.Os 20.Os
21.Sh NAME 21.Sh NAME
@@ -33,94 +33,70 @@
33.In openssl/x509.h 33.In openssl/x509.h
34.Ft X509_NAME * 34.Ft X509_NAME *
35.Fo d2i_X509_NAME 35.Fo d2i_X509_NAME
36.Fa "X509_NAME **name" 36.Fa "X509_NAME **val_out"
37.Fa "unsigned char **in" 37.Fa "unsigned char **der_in"
38.Fa "long length" 38.Fa "long length"
39.Fc 39.Fc
40.Ft int 40.Ft int
41.Fo i2d_X509_NAME 41.Fo i2d_X509_NAME
42.Fa "X509_NAME *name" 42.Fa "X509_NAME *val_in"
43.Fa "unsigned char **out" 43.Fa "unsigned char **der_out"
44.Fc 44.Fc
45.Ft X509_NAME * 45.Ft X509_NAME *
46.Fo X509_NAME_dup 46.Fo X509_NAME_dup
47.Fa "X509_NAME *name" 47.Fa "X509_NAME *val_in"
48.Fc 48.Fc
49.Ft X509_NAME_ENTRY * 49.Ft X509_NAME_ENTRY *
50.Fo d2i_X509_NAME_ENTRY 50.Fo d2i_X509_NAME_ENTRY
51.Fa "X509_NAME_ENTRY **ne" 51.Fa "X509_NAME_ENTRY **val_out"
52.Fa "unsigned char **in" 52.Fa "unsigned char **der_in"
53.Fa "long length" 53.Fa "long length"
54.Fc 54.Fc
55.Ft int 55.Ft int
56.Fo i2d_X509_NAME_ENTRY 56.Fo i2d_X509_NAME_ENTRY
57.Fa "X509_NAME_ENTRY *ne" 57.Fa "X509_NAME_ENTRY *val_in"
58.Fa "unsigned char **out" 58.Fa "unsigned char **der_out"
59.Fc 59.Fc
60.Ft X509_NAME_ENTRY * 60.Ft X509_NAME_ENTRY *
61.Fo X509_NAME_ENTRY_dup 61.Fo X509_NAME_ENTRY_dup
62.Fa "X509_NAME_ENTRY *ne" 62.Fa "X509_NAME_ENTRY *val_in"
63.Fc 63.Fc
64.Sh DESCRIPTION 64.Sh DESCRIPTION
65.Fn d2i_X509_NAME 65These functions decode and encode X.501
66decodes
67.Fa length
68bytes of the DER-encoded string
69.Pf * Fa in
70and stores the resulting
71.Vt Name 66.Vt Name
72object in 67objects using DER format.
73.Pf * Fa name . 68For details about the semantics, examples, caveats, and bugs, see
69.Xr ASN1_item_d2i 3 .
74.Pp 70.Pp
71.Fn d2i_X509_NAME
72and
75.Fn i2d_X509_NAME 73.Fn i2d_X509_NAME
76encodes 74decode and encode an ASN.1
77.Fa name 75.Vt Name
78into DER format and stores the result to 76structure defined in RFC 5280 section 4.1.2.4.
79.Pf * Fa out .
80.Pp 77.Pp
81.Fn X509_NAME_dup 78.Fn X509_NAME_dup
82copies 79copies
83.Fa name 80.Fa val_in
84by calling 81by calling
85.Fn i2d_X509_NAME 82.Fn i2d_X509_NAME
86and 83and
87.Fn d2i_X509_NAME . 84.Fn d2i_X509_NAME .
88.Pp 85.Pp
89.Fn d2i_X509_NAME_ENTRY 86.Fn d2i_X509_NAME_ENTRY
90decodes 87and
91.Fa length
92bytes of the DER-encoded string
93.Pf * Fa in
94and stores the resulting
95.Vt RelativeDistinguishedName
96object in
97.Pf * Fa ne .
98.Pp
99.Fn i2d_X509_NAME_ENTRY 88.Fn i2d_X509_NAME_ENTRY
100encodes 89decode and encode an ASN.1
101.Fa ne 90.Vt RelativeDistinguishedName
102into DER format and stores the result to 91structure defined in RFC 5280 section 4.1.2.4.
103.Pf * Fa out .
104.Pp 92.Pp
105.Fn X509_NAME_ENTRY_dup 93.Fn X509_NAME_ENTRY_dup
106copies 94copies
107.Fa ne 95.Fa val_in
108by calling 96by calling
109.Fn i2d_X509_NAME_ENTRY 97.Fn i2d_X509_NAME_ENTRY
110and 98and
111.Fn d2i_X509_NAME_ENTRY . 99.Fn d2i_X509_NAME_ENTRY .
112.Pp
113For details of the behaviour, see
114.Xr d2i_X509 3 .
115.Pp
116Regarding
117.Vt X509_NAME
118objects, see
119.Xr X509_NAME_new 3 .
120Regarding
121.Vt X509_NAME_ENTRY
122objects, see
123.Xr X509_NAME_ENTRY_new 3 .
124.Sh RETURN VALUES 100.Sh RETURN VALUES
125.Fn d2i_X509_NAME 101.Fn d2i_X509_NAME
126and 102and
@@ -143,14 +119,17 @@ if an error occurs.
143.Fn i2d_X509_NAME 119.Fn i2d_X509_NAME
144and 120and
145.Fn i2d_X509_NAME_ENTRY 121.Fn i2d_X509_NAME_ENTRY
146returns the number of bytes successfully encoded or a negative value 122return the number of bytes successfully encoded or a negative value
147if an error occurs. 123if an error occurs.
148.Sh SEE ALSO 124.Sh SEE ALSO
149.Xr d2i_X509 3 , 125.Xr ASN1_item_d2i 3 ,
150.Xr X509_NAME_ENTRY_new 3 , 126.Xr X509_NAME_ENTRY_new 3 ,
151.Xr X509_NAME_new 3 , 127.Xr X509_NAME_new 3 ,
152.Xr X509_NAME_print_ex 3 128.Xr X509_NAME_print_ex 3
153.Sh STANDARDS 129.Sh STANDARDS
130RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
131Certificate Revocation List (CRL) Profile
132.Pp
154ITU-T Recommendation X.690, also known as ISO/IEC 8825-1: 133ITU-T Recommendation X.690, also known as ISO/IEC 8825-1:
155Information technology - ASN.1 encoding rules: 134Information technology - ASN.1 encoding rules:
156Specification of Basic Encoding Rules (BER), Canonical Encoding 135Specification of Basic Encoding Rules (BER), Canonical Encoding