From 0c5bc3a802c014f077e6d72f4ca2370880694a37 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Wed, 14 Dec 2016 17:26:35 +0000 Subject: Document X509_NAME_dup(3) and X509_NAME_ENTRY_dup(3) listed in OpenSSL doc/man3/X509_dup.pod and d2i_X509_NAME_ENTRY(3) and i2d_X509_NAME_ENTRY(3) listed in OpenSSL doc/man3/d2i_X509.pod. Also add a RETURN VALUES section. --- src/lib/libcrypto/man/d2i_X509_NAME.3 | 86 ++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/man/d2i_X509_NAME.3 b/src/lib/libcrypto/man/d2i_X509_NAME.3 index 1f1836abaf..0dacb648c7 100644 --- a/src/lib/libcrypto/man/d2i_X509_NAME.3 +++ b/src/lib/libcrypto/man/d2i_X509_NAME.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: d2i_X509_NAME.3,v 1.5 2016/12/14 16:18:31 schwarze Exp $ +.\" $OpenBSD: d2i_X509_NAME.3,v 1.6 2016/12/14 17:26:35 schwarze Exp $ .\" OpenSSL d900a015 Oct 8 14:40:42 2015 +0200 .\" .\" Copyright (c) 2016 Ingo Schwarze @@ -20,7 +20,11 @@ .Os .Sh NAME .Nm d2i_X509_NAME , -.Nm i2d_X509_NAME +.Nm i2d_X509_NAME , +.Nm X509_NAME_dup , +.Nm d2i_X509_NAME_ENTRY , +.Nm i2d_X509_NAME_ENTRY , +.Nm X509_NAME_ENTRY_dup .\" In the following line, "X.501" and "Name" are not typos. .\" The "Name" type is defined in X.501, not in X.509. .\" The type in called "Name" with capital "N", not "name". @@ -38,6 +42,25 @@ .Fa "X509_NAME *name" .Fa "unsigned char **out" .Fc +.Ft X509_NAME * +.Fo X509_NAME_dup +.Fa "X509_NAME *name" +.Fc +.Ft X509_NAME_ENTRY * +.Fo d2i_X509_NAME_ENTRY +.Fa "X509_NAME_ENTRY **ne" +.Fa "unsigned char **in" +.Fa "long length" +.Fc +.Ft int +.Fo i2d_X509_NAME_ENTRY +.Fa "X509_NAME_ENTRY *ne" +.Fa "unsigned char **out" +.Fc +.Ft X509_NAME_ENTRY * +.Fo X509_NAME_ENTRY_dup +.Fa "X509_NAME_ENTRY *ne" +.Fc .Sh DESCRIPTION .Fn d2i_X509_NAME decodes @@ -53,6 +76,36 @@ encodes into DER format and stores the result to .Pf * Fa out . .Pp +.Fn X509_NAME_dup +copies +.Fa name +by calling +.Fn i2d_X509_NAME +and +.Fn d2i_X509_NAME . +.Pp +.Fn d2i_X509_NAME_ENTRY +decodes +.Fa length +bytes of the DER-encoded string +.Pf * Fa in +and stores the resulting RelativeDistinguishedName object in +.Pf * Fa ne . +.Pp +.Fn i2d_X509_NAME_ENTRY +encodes +.Fa ne +into DER format and stores the result to +.Pf * Fa out . +.Pp +.Fn X509_NAME_ENTRY_dup +copies +.Fa ne +by calling +.Fn i2d_X509_NAME_ENTRY +and +.Fn d2i_X509_NAME_ENTRY . +.Pp For details of the behaviour, see .Xr d2i_X509 3 . .Pp @@ -60,8 +113,37 @@ Regarding .Vt X509_NAME objects, see .Xr X509_NAME_new 3 . +Regarding +.Vt X509_NAME_ENTRY +objects, see +.Xr X509_NAME_ENTRY_new 3 . +.Sh RETURN VALUES +.Fn d2i_X509_NAME +and +.Fn X509_NAME_dup +return the new +.Vt X509_NAME +object or +.Dv NULL +if an error occurs. +.Pp +.Fn d2i_X509_NAME_ENTRY +and +.Fn X509_NAME_ENTRY_dup +return the new +.Vt X509_NAME_ENTRY +object or +.Dv NULL +if an error occurs. +.Pp +.Fn i2d_X509_NAME +and +.Fn i2d_X509_NAME_ENTRY +returns the number of bytes successfully encoded or a negative value +if an error occurs. .Sh SEE ALSO .Xr d2i_X509 3 , +.Xr X509_NAME_ENTRY_new 3 , .Xr X509_NAME_new 3 , .Xr X509_NAME_print_ex 3 .Sh STANDARDS -- cgit v1.2.3-55-g6feb