update libressl to 2.8.2
[unleashed.git] / lib / libcrypto / man / X509_REQ_new.3
blob8d000328f6581e75f1fc01b98b321df965aa7aae
1 .\"     $OpenBSD: X509_REQ_new.3,v 1.5 2018/07/29 20:29:32 tb 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: July 29 2018 $
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
38 allocates and initializes an empty
39 .Vt X509_REQ
40 object, representing an ASN.1
41 .Vt CertificationRequest
42 structure defined in RFC 2986 section 4.2.
43 It can hold a pointer to an
44 .Vt X509_REQ_INFO
45 object discussed below together with a cryptographic signature and
46 information about the signature algorithm used.
47 .Fn X509_REQ_free
48 frees
49 .Fa req .
51 .Fa req
52 is a
53 .Dv NULL
54 pointer, no action occurs.
55 .Pp
56 .Fn X509_REQ_INFO_new
57 allocates and initializes an empty
58 .Vt X509_REQ_INFO
59 object, representing an ASN.1
60 .Vt CertificationRequestInfo
61 structure defined in RFC 2986 section 4.1.
62 It is used inside the
63 .Vt X509_REQ
64 object and can hold the subject and the public key of the requested
65 certificate and additional attributes.
66 .Fn X509_REQ_INFO_free
67 frees
68 .Fa req_info .
70 .Fa req_info
71 is a
72 .Dv NULL
73 pointer, no action occurs.
74 .Sh RETURN VALUES
75 .Fn X509_REQ_new
76 and
77 .Fn X509_REQ_INFO_new
78 return the new
79 .Vt X509_REQ
81 .Vt X509_REQ_INFO
82 object, respectively, or
83 .Dv NULL
84 if 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_get_pubkey 3 ,
90 .Xr X509_REQ_get_subject_name 3 ,
91 .Xr X509_REQ_get_version 3 ,
92 .Xr X509_REQ_sign 3
93 .Sh STANDARDS
94 RFC 2986: PKCS #10: Certification Request Syntax Specification
95 .Sh HISTORY
96 .Fn X509_REQ_new ,
97 .Fn X509_REQ_free ,
98 .Fn X509_REQ_INFO_new ,
99 and
100 .Fn X509_REQ_INFO_free
101 first appeared in SSLeay 0.4.4 and have been available since
102 .Ox 2.4 .