summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2019-08-19 13:52:54 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2019-08-19 13:52:54 +0000
commitbebb329c8ef8f1b7434bc6cd36a9e5136b7b8a73 (patch)
tree779627fe68f66c29002ff968af97b947e0990134 /lib
parent184ee651491963d3fdd878eebd8b882876e4c519 (diff)
document X509_INFO_new(3) and X509_INFO_free(3)
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/man/Makefile3
-rw-r--r--lib/libcrypto/man/X509_CRL_new.35
-rw-r--r--lib/libcrypto/man/X509_INFO_new.370
-rw-r--r--lib/libcrypto/man/X509_new.310
4 files changed, 78 insertions, 10 deletions
diff --git a/lib/libcrypto/man/Makefile b/lib/libcrypto/man/Makefile
index 92e3c1b6f03..b14e5d015fe 100644
--- a/lib/libcrypto/man/Makefile
+++ b/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.150 2019/08/19 13:08:26 schwarze Exp $
+# $OpenBSD: Makefile,v 1.151 2019/08/19 13:52:53 schwarze Exp $
.include <bsd.own.mk>
@@ -240,6 +240,7 @@ MAN= \
X509_CRL_get0_by_serial.3 \
X509_CRL_new.3 \
X509_EXTENSION_set_object.3 \
+ X509_INFO_new.3 \
X509_LOOKUP_hash_dir.3 \
X509_NAME_ENTRY_get_object.3 \
X509_NAME_add_entry_by_txt.3 \
diff --git a/lib/libcrypto/man/X509_CRL_new.3 b/lib/libcrypto/man/X509_CRL_new.3
index b986a6f200f..183de5305c2 100644
--- a/lib/libcrypto/man/X509_CRL_new.3
+++ b/lib/libcrypto/man/X509_CRL_new.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: X509_CRL_new.3,v 1.8 2019/06/06 01:06:59 schwarze Exp $
+.\" $OpenBSD: X509_CRL_new.3,v 1.9 2019/08/19 13:52:53 schwarze Exp $
.\"
.\" Copyright (c) 2016, 2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: June 6 2019 $
+.Dd $Mdocdate: August 19 2019 $
.Dt X509_CRL_NEW 3
.Os
.Sh NAME
@@ -113,6 +113,7 @@ returns 1 on success or 0 on error.
.Xr X509_CRL_get_version 3 ,
.Xr X509_CRL_sign 3 ,
.Xr X509_EXTENSION_new 3 ,
+.Xr X509_INFO_new 3 ,
.Xr X509_load_crl_file 3 ,
.Xr X509_new 3 ,
.Xr X509_OBJECT_get0_X509_CRL 3 ,
diff --git a/lib/libcrypto/man/X509_INFO_new.3 b/lib/libcrypto/man/X509_INFO_new.3
new file mode 100644
index 00000000000..545480e050a
--- /dev/null
+++ b/lib/libcrypto/man/X509_INFO_new.3
@@ -0,0 +1,70 @@
+.\" $OpenBSD: X509_INFO_new.3,v 1.1 2019/08/19 13:52:53 schwarze Exp $
+.\" Copyright (c) 2019 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: August 19 2019 $
+.Dt X509_INFO_NEW 3
+.Os
+.Sh NAME
+.Nm X509_INFO_new ,
+.Nm X509_INFO_free
+.Nd X.509 certificate wrapper object
+.Sh SYNOPSIS
+.In openssl/x509.h
+.Ft X509_INFO *
+.Fn X509_INFO_new void
+.Ft void
+.Fn X509_INFO_free "X509_INFO *info"
+.Sh DESCRIPTION
+.Vt X509_INFO
+is a reference-counted wrapper object storing a pointer to an X.509
+certificate together with pointers to the associated private key
+and to an associated certificate revocation list.
+It is for example used internally by
+.Xr X509_load_cert_crl_file 3 .
+.Pp
+.Fn X509_INFO_new
+allocates and initializes an empty
+.Vt X509_INFO
+object and sets its reference count to 1.
+.Pp
+.Fn X509_INFO_free
+decrements the reference count of
+.Fa info
+by 1.
+If the reference count reaches 0, it frees all referenced objects
+as well as the storage needed for
+.Fa info
+itself.
+If
+.Fa info
+is a
+.Dv NULL
+pointer, no action occurs.
+.Sh RETURN VALUES
+.Fn X509_INFO_new
+returns the newly allocated
+.Vt X509_INFO
+object or
+.Dv NULL
+if an error occurs.
+.Sh SEE ALSO
+.Xr X509_CRL_new 3 ,
+.Xr X509_new 3
+.Sh HISTORY
+.Fn X509_INFO_new
+and
+.Fn X509_INFO_free
+first appeared in SSLeay 0.5.1 and have been available since
+.Ox 2.4 .
diff --git a/lib/libcrypto/man/X509_new.3 b/lib/libcrypto/man/X509_new.3
index b048c89312c..3ccd311e61f 100644
--- a/lib/libcrypto/man/X509_new.3
+++ b/lib/libcrypto/man/X509_new.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: X509_new.3,v 1.17 2019/06/10 14:58:48 schwarze Exp $
+.\" $OpenBSD: X509_new.3,v 1.18 2019/08/19 13:52:53 schwarze Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@@ -49,7 +49,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 10 2019 $
+.Dd $Mdocdate: August 19 2019 $
.Dt X509_NEW 3
.Os
.Sh NAME
@@ -116,11 +116,6 @@ by 1.
Its purpose is similar to
.Fn X509_up_ref :
The returned chain persists after the original is freed.
-.Pp
-The object
-.Vt X509_INFO ,
-which can hold a certificate, the corresponding private key,
-and a certificate revocation list, is not yet documented.
.Sh RETURN VALUES
If the allocation fails,
.Fn X509_new
@@ -162,6 +157,7 @@ if an error occurs.
.Xr X509_get_serialNumber 3 ,
.Xr X509_get_subject_name 3 ,
.Xr X509_get_version 3 ,
+.Xr X509_INFO_new 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_PUBKEY_new 3 ,
.Xr X509_REQ_new 3 ,