-# $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>
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 \
-.\" $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>
.\"
.\" 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
.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 ,
--- /dev/null
+.\" $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 .
-.\" $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>.
.\" 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
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
.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 ,