1.\" $OpenBSD: X509_CINF_new.3,v 1.6 2019/06/06 01:06:59 schwarze Exp $ 2.\" 3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: June 6 2019 $ 18.Dt X509_CINF_NEW 3 19.Os 20.Sh NAME 21.Nm X509_CINF_new , 22.Nm X509_CINF_free , 23.Nm X509_VAL_new , 24.Nm X509_VAL_free , 25.Nm X509_CERT_AUX_new , 26.Nm X509_CERT_AUX_free 27.Nd X.509 certificate information objects 28.Sh SYNOPSIS 29.In openssl/x509.h 30.Ft X509_CINF * 31.Fn X509_CINF_new void 32.Ft void 33.Fn X509_CINF_free "X509_CINF *inf" 34.Ft X509_VAL * 35.Fn X509_VAL_new void 36.Ft void 37.Fn X509_VAL_free "X509_VAL *val" 38.Ft X509_CERT_AUX * 39.Fn X509_CERT_AUX_new void 40.Ft void 41.Fn X509_CERT_AUX_free "X509_CERT_AUX *aux" 42.Sh DESCRIPTION 43.Fn X509_CINF_new 44allocates and initializes an empty 45.Vt X509_CINF 46object, representing an ASN.1 47.Vt TBSCertificate 48structure defined in RFC 5280 section 4.1. 49It is used inside the 50.Vt X509 51object and holds the main information contained in the X.509 52certificate including subject, public key, issuer, serial number, 53validity period, and extensions. 54.Fn X509_CINF_free 55frees 56.Fa inf . 57.Pp 58.Fn X509_VAL_new 59allocates and initializes an empty 60.Vt X509_VAL 61object, representing an ASN.1 62.Vt Validity 63structure defined in RFC 5280 section 4.1. 64It is used inside the 65.Vt X509_CINF 66object and holds the validity period of the certificate. 67.Fn X509_VAL_free 68frees 69.Fa val . 70.Pp 71.Fn X509_CERT_AUX_new 72allocates and initializes an empty 73.Vt X509_CERT_AUX 74structure. 75It can be used inside an 76.Vt X509 77object to hold optional non-standard auxiliary data appended to a 78certificate, for example friendly alias names and trust data. 79.Fn X509_CERT_AUX_free 80frees 81.Fa aux . 82.Sh RETURN VALUES 83.Fn X509_CINF_new , 84.Fn X509_VAL_new , 85and 86.Fn X509_CERT_AUX_new 87return the new 88.Vt X509_CINF , 89.Vt X509_VAL , 90or 91.Vt X509_CERT_AUX 92object, respectively, or 93.Dv NULL 94if an error occurs. 95.Sh SEE ALSO 96.Xr d2i_X509_CINF 3 , 97.Xr X509_new 3 98.Sh STANDARDS 99RFC 5280: Internet X.509 Public Key Infrastructure Certificate and 100Certificate Revocation List (CRL) Profile 101.Sh HISTORY 102.Fn X509_CINF_new , 103.Fn X509_CINF_free , 104.Fn X509_VAL_new , 105and 106.Fn X509_VAL_free 107appeared in SSLeay 0.4 or earlier and have been available since 108.Ox 2.4 . 109.Pp 110.Fn X509_CERT_AUX_new 111and 112.Fn X509_CERT_AUX_free 113first appeared in OpenSSL 0.9.5 and have been available since 114.Ox 2.7 . 115