1.\" $OpenBSD: X509_REQ_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_REQ_NEW 3 19.Os 20.Sh NAME 21.Nm X509_REQ_new , 22.Nm X509_REQ_free , 23.Nm X509_REQ_INFO_new , 24.Nm X509_REQ_INFO_free 25.Nd PKCS#10 certification requests 26.Sh SYNOPSIS 27.In openssl/x509.h 28.Ft X509_REQ * 29.Fn X509_REQ_new void 30.Ft void 31.Fn X509_REQ_free "X509_REQ *req" 32.Ft X509_REQ_INFO * 33.Fn X509_REQ_INFO_new void 34.Ft void 35.Fn X509_REQ_INFO_free "X509_REQ_INFO *req_info" 36.Sh DESCRIPTION 37.Fn X509_REQ_new 38allocates and initializes an empty 39.Vt X509_REQ 40object, representing an ASN.1 41.Vt CertificationRequest 42structure defined in RFC 2986 section 4.2. 43It can hold a pointer to an 44.Vt X509_REQ_INFO 45object discussed below together with a cryptographic signature and 46information about the signature algorithm used. 47.Fn X509_REQ_free 48frees 49.Fa req . 50If 51.Fa req 52is a 53.Dv NULL 54pointer, no action occurs. 55.Pp 56.Fn X509_REQ_INFO_new 57allocates and initializes an empty 58.Vt X509_REQ_INFO 59object, representing an ASN.1 60.Vt CertificationRequestInfo 61structure defined in RFC 2986 section 4.1. 62It is used inside the 63.Vt X509_REQ 64object and can hold the subject and the public key of the requested 65certificate and additional attributes. 66.Fn X509_REQ_INFO_free 67frees 68.Fa req_info . 69If 70.Fa req_info 71is a 72.Dv NULL 73pointer, no action occurs. 74.Sh RETURN VALUES 75.Fn X509_REQ_new 76and 77.Fn X509_REQ_INFO_new 78return the new 79.Vt X509_REQ 80or 81.Vt X509_REQ_INFO 82object, respectively, or 83.Dv NULL 84if an error occurs. 85.Sh SEE ALSO 86.Xr d2i_X509_REQ 3 , 87.Xr PEM_read_X509_REQ 3 , 88.Xr X509_new 3 , 89.Xr X509_REQ_check_private_key 3 , 90.Xr X509_REQ_digest 3 , 91.Xr X509_REQ_get0_signature 3 , 92.Xr X509_REQ_get_pubkey 3 , 93.Xr X509_REQ_get_subject_name 3 , 94.Xr X509_REQ_get_version 3 , 95.Xr X509_REQ_sign 3 96.Sh STANDARDS 97RFC 2986: PKCS #10: Certification Request Syntax Specification 98.Sh HISTORY 99.Fn X509_REQ_new , 100.Fn X509_REQ_free , 101.Fn X509_REQ_INFO_new , 102and 103.Fn X509_REQ_INFO_free 104first appeared in SSLeay 0.4.4 and have been available since 105.Ox 2.4 . 106