summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/X509_REQ_add_extensions.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/X509_REQ_add_extensions.3')
-rw-r--r--src/lib/libcrypto/man/X509_REQ_add_extensions.3113
1 files changed, 0 insertions, 113 deletions
diff --git a/src/lib/libcrypto/man/X509_REQ_add_extensions.3 b/src/lib/libcrypto/man/X509_REQ_add_extensions.3
deleted file mode 100644
index ff33edf474..0000000000
--- a/src/lib/libcrypto/man/X509_REQ_add_extensions.3
+++ /dev/null
@@ -1,113 +0,0 @@
1.\" $OpenBSD: X509_REQ_add_extensions.3,v 1.2 2024/08/18 11:04:55 tb Exp $
2.\"
3.\" Copyright (c) 2021 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: August 18 2024 $
18.Dt X509_REQ_ADD_EXTENSIONS 3
19.Os
20.Sh NAME
21.Nm X509_REQ_add_extensions ,
22.Nm X509_REQ_add_extensions_nid ,
23.Nm X509_REQ_get_extensions ,
24.Nm X509_REQ_extension_nid
25.Nd extensions in certification requests
26.Sh SYNOPSIS
27.In openssl/x509.h
28.Ft int
29.Fo X509_REQ_add_extensions
30.Fa "X509_REQ *req"
31.Fa "STACK_OF(X509_EXTENSION) *extensions"
32.Fc
33.Ft int
34.Fo X509_REQ_add_extensions_nid
35.Fa "X509_REQ *req"
36.Fa "STACK_OF(X509_EXTENSION) *extensions"
37.Fa "int nid"
38.Fc
39.Ft STACK_OF(X509_EXTENSION) *
40.Fn X509_REQ_get_extensions "X509_REQ *req"
41.Ft int
42.Fn X509_REQ_extension_nid "int nid"
43.Sh DESCRIPTION
44.Fn X509_REQ_add_extensions
45encodes the array of
46.Fa extensions
47using
48.Xr i2d_X509_EXTENSIONS 3
49and adds a new X.501 Attribute object of the type
50.Dv NID_ext_req
51to
52.Fa req
53using the equivalent of
54.Xr X509_ATTRIBUTE_create_by_NID 3
55with a
56.Fa type
57of
58.Dv V_ASN1_SEQUENCE .
59.Pp
60.Fn X509_REQ_add_extensions_nid
61is identical except that the specified
62.Fa nid
63is used as the X.501 Attribute type instead of
64.Dv NID_ext_req .
65.Pp
66.Fn X509_REQ_get_extensions
67retrieves the first value of the first X.501 Attribute of appropriate type.
68By default, the attribute types
69.Dv NID_ext_req
70and
71.Dv NID_ms_ext_req
72are considered appropriate.
73.Pp
74.Fn X509_REQ_extension_nid
75checks whether
76.Fn X509_REQ_get_extensions
77regards the
78.Fa nid
79argument as a type appropriate for storing extensions.
80.Sh RETURN VALUES
81.Fn X509_REQ_add_extensions
82and
83.Fn X509_REQ_add_extensions_nid
84returns 1 for success or 0 for failure.
85.Pp
86.Fn X509_REQ_get_extensions
87returns a newly allocated array of ASN.1
88.Vt Extension
89objects or
90.Dv NULL
91if
92.Fa req
93is
94.Dv NULL ,
95does not contain
96.Vt CertificationRequestInfo ,
97contains no attribute of an appropriate type,
98or if decoding or memory allocation fails.
99.Pp
100.Fn X509_REQ_extension_nid
101returns 1 if
102.Fa nid
103is considered appropriate or 0 otherwise.
104.Sh SEE ALSO
105.Xr d2i_X509_EXTENSION 3 ,
106.Xr STACK_OF 3 ,
107.Xr X509_EXTENSION_new 3 ,
108.Xr X509_REQ_new 3 ,
109.Xr X509V3_extensions_print 3
110.Sh HISTORY
111These functions first appeared in OpenSSL 0.9.5
112and have been available since
113.Ox 2.7 .