1.\" $OpenBSD: X509_INFO_new.3,v 1.3 2021/10/19 10:39:33 schwarze Exp $ 2.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org> 3.\" 4.\" Permission to use, copy, modify, and distribute this software for any 5.\" purpose with or without fee is hereby granted, provided that the above 6.\" copyright notice and this permission notice appear in all copies. 7.\" 8.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" 16.Dd $Mdocdate: October 19 2021 $ 17.Dt X509_INFO_NEW 3 18.Os 19.Sh NAME 20.Nm X509_INFO_new , 21.Nm X509_INFO_free 22.Nd X.509 certificate wrapper object 23.Sh SYNOPSIS 24.In openssl/x509.h 25.Ft X509_INFO * 26.Fn X509_INFO_new void 27.Ft void 28.Fn X509_INFO_free "X509_INFO *info" 29.Sh DESCRIPTION 30.Vt X509_INFO 31is a reference-counted wrapper object storing a pointer to an X.509 32certificate together with pointers to the associated private key 33and to an associated certificate revocation list. 34It is for example used internally by 35.Xr X509_load_cert_crl_file 3 . 36.Pp 37.Fn X509_INFO_new 38allocates and initializes an empty 39.Vt X509_INFO 40object and sets its reference count to 1. 41.Pp 42.Fn X509_INFO_free 43decrements the reference count of 44.Fa info 45by 1. 46If the reference count reaches 0, it frees all referenced objects 47as well as the storage needed for 48.Fa info 49itself. 50If 51.Fa info 52is a 53.Dv NULL 54pointer, no action occurs. 55.Sh RETURN VALUES 56.Fn X509_INFO_new 57returns the newly allocated 58.Vt X509_INFO 59object or 60.Dv NULL 61if an error occurs. 62.Sh SEE ALSO 63.Xr PEM_X509_INFO_read 3 , 64.Xr X509_CRL_new 3 , 65.Xr X509_new 3 , 66.Xr X509_PKEY_new 3 67.Sh HISTORY 68.Fn X509_INFO_new 69and 70.Fn X509_INFO_free 71first appeared in SSLeay 0.5.1 and have been available since 72.Ox 2.4 . 73