diff options
Diffstat (limited to 'src/lib/libcrypto/man/X509_REQ_add1_attr.3')
-rw-r--r-- | src/lib/libcrypto/man/X509_REQ_add1_attr.3 | 172 |
1 files changed, 0 insertions, 172 deletions
diff --git a/src/lib/libcrypto/man/X509_REQ_add1_attr.3 b/src/lib/libcrypto/man/X509_REQ_add1_attr.3 deleted file mode 100644 index f9b602dbef..0000000000 --- a/src/lib/libcrypto/man/X509_REQ_add1_attr.3 +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | .\" $OpenBSD: X509_REQ_add1_attr.3,v 1.4 2024/09/02 07:56:28 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: September 2 2024 $ | ||
18 | .Dt X509_REQ_ADD1_ATTR 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm X509_REQ_add1_attr , | ||
22 | .Nm X509_REQ_add1_attr_by_OBJ , | ||
23 | .Nm X509_REQ_add1_attr_by_NID , | ||
24 | .Nm X509_REQ_add1_attr_by_txt , | ||
25 | .Nm X509_REQ_delete_attr , | ||
26 | .Nm X509_REQ_get_attr , | ||
27 | .Nm X509_REQ_get_attr_count , | ||
28 | .Nm X509_REQ_get_attr_by_OBJ , | ||
29 | .Nm X509_REQ_get_attr_by_NID | ||
30 | .Nd X.501 Attributes of PKCS#10 certification requests | ||
31 | .Sh SYNOPSIS | ||
32 | .In openssl/x509.h | ||
33 | .Ft int | ||
34 | .Fo X509_REQ_add1_attr | ||
35 | .Fa "X509_REQ *req" | ||
36 | .Fa "X509_ATTRIBUTE *attr" | ||
37 | .Fc | ||
38 | .Ft int | ||
39 | .Fo X509_REQ_add1_attr_by_OBJ | ||
40 | .Fa "X509_REQ *req" | ||
41 | .Fa "const ASN1_OBJECT *obj" | ||
42 | .Fa "int type" | ||
43 | .Fa "const unsigned char *data" | ||
44 | .Fa "int len" | ||
45 | .Fc | ||
46 | .Ft int | ||
47 | .Fo X509_REQ_add1_attr_by_NID | ||
48 | .Fa "X509_REQ *req" | ||
49 | .Fa "int nid" | ||
50 | .Fa "int type" | ||
51 | .Fa "const unsigned char *data" | ||
52 | .Fa "int len" | ||
53 | .Fc | ||
54 | .Ft int | ||
55 | .Fo X509_REQ_add1_attr_by_txt | ||
56 | .Fa "X509_REQ *req" | ||
57 | .Fa "const char *name" | ||
58 | .Fa "int type" | ||
59 | .Fa "const unsigned char *data" | ||
60 | .Fa "int len" | ||
61 | .Fc | ||
62 | .Ft X509_ATTRIBUTE * | ||
63 | .Fo X509_REQ_delete_attr | ||
64 | .Fa "X509_REQ *req" | ||
65 | .Fa "int index" | ||
66 | .Fc | ||
67 | .Ft X509_ATTRIBUTE * | ||
68 | .Fo X509_REQ_get_attr | ||
69 | .Fa "const X509_REQ *req" | ||
70 | .Fa "int index" | ||
71 | .Fc | ||
72 | .Ft int | ||
73 | .Fo X509_REQ_get_attr_count | ||
74 | .Fa "const X509_REQ *req" | ||
75 | .Fc | ||
76 | .Ft int | ||
77 | .Fo X509_REQ_get_attr_by_OBJ | ||
78 | .Fa "const X509_REQ *req" | ||
79 | .Fa "const ASN1_OBJECT *obj" | ||
80 | .Fa "int start_after" | ||
81 | .Fc | ||
82 | .Ft int | ||
83 | .Fo X509_REQ_get_attr_by_NID | ||
84 | .Fa "const X509_REQ *req" | ||
85 | .Fa "int nid" | ||
86 | .Fa "int start_after" | ||
87 | .Fc | ||
88 | .Sh DESCRIPTION | ||
89 | These functions support associating an array of X.501 Attributes | ||
90 | with a PKCS#10 certification request. | ||
91 | .Pp | ||
92 | .Fn X509_REQ_add1_attr | ||
93 | appends a deep copy of the | ||
94 | .Fa attr , | ||
95 | allocating a new array if necessary. | ||
96 | .Pp | ||
97 | .Fn X509_REQ_add1_attr_by_OBJ , | ||
98 | .Fn X509_REQ_add1_attr_by_NID , | ||
99 | and | ||
100 | .Fn X509_REQ_add1_attr_by_txt | ||
101 | create a new X.501 Attribute object using | ||
102 | .Xr X509_ATTRIBUTE_create_by_OBJ 3 , | ||
103 | .Xr X509_ATTRIBUTE_create_by_NID 3 , | ||
104 | or | ||
105 | .Xr X509_ATTRIBUTE_create_by_txt 3 , | ||
106 | respectively, | ||
107 | allocating a new array if necessary. | ||
108 | .Pp | ||
109 | .Fn X509_REQ_delete_attr | ||
110 | deletes the attribute with the zero-based | ||
111 | .Fa index . | ||
112 | .Pp | ||
113 | .Fn X509_REQ_get_attr | ||
114 | returns the attribute with the zero-based | ||
115 | .Fa index . | ||
116 | .Pp | ||
117 | .Fn X509_REQ_get_attr_count | ||
118 | returns the number of attributes currently associated with | ||
119 | .Fa req . | ||
120 | .Pp | ||
121 | .Fn X509_REQ_get_attr_by_OBJ | ||
122 | and | ||
123 | .Fn X509_REQ_get_attr_by_NID | ||
124 | search for an attribute of the type | ||
125 | .Fa obj | ||
126 | or | ||
127 | .Fa nid . | ||
128 | .Sh RETURN VALUES | ||
129 | .Fn X509_REQ_add1_attr , | ||
130 | .Fn X509_REQ_add1_attr_by_OBJ , | ||
131 | .Fn X509_REQ_add1_attr_by_NID , | ||
132 | and | ||
133 | .Fn X509_REQ_add1_attr_by_txt | ||
134 | return 1 for success or 0 for failure. | ||
135 | .Pp | ||
136 | .Fn X509_REQ_delete_attr | ||
137 | and | ||
138 | .Fn X509_REQ_get_attr | ||
139 | return the deleted or requested attribute or | ||
140 | .Dv NULL | ||
141 | if the requested index is negative or greater than or equal to | ||
142 | the current number of attributes associated with | ||
143 | .Fa req . | ||
144 | .Pp | ||
145 | .Fn X509_REQ_get_attr_count | ||
146 | returns the current number of attributes. | ||
147 | .Pp | ||
148 | .Fn X509_REQ_get_attr_by_OBJ | ||
149 | and | ||
150 | .Fn X509_REQ_get_attr_by_NID | ||
151 | return the index of the first attribute that has an index greater than | ||
152 | .Fa start_after | ||
153 | and a type matching | ||
154 | .Fa obj | ||
155 | or | ||
156 | .Fa nid , | ||
157 | respectively, or \-1 on failure. | ||
158 | In addition, | ||
159 | .Fn X509_REQ_get_attr_by_NID | ||
160 | returns \-2 if | ||
161 | .Xr OBJ_nid2obj 3 | ||
162 | fails on the requested | ||
163 | .Fa nid . | ||
164 | .Sh SEE ALSO | ||
165 | .Xr OBJ_nid2obj 3 , | ||
166 | .Xr X509_ATTRIBUTE_create_by_OBJ 3 , | ||
167 | .Xr X509_ATTRIBUTE_new 3 , | ||
168 | .Xr X509_REQ_new 3 | ||
169 | .Sh HISTORY | ||
170 | These functions first appeared in OpenSSL 0.9.5 | ||
171 | and have been available since | ||
172 | .Ox 2.7 . | ||