1use core::ffi::*;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
11#[deprecated]
12#[repr(C)]
13#[allow(unpredictable_function_pointer_comparisons)]
14#[derive(Clone, Copy, Debug, PartialEq)]
15pub struct cssm_spi_cl_funcs {
16 pub CertCreateTemplate: Option<
17 unsafe extern "C-unwind" fn(
18 CSSM_CL_HANDLE,
19 uint32,
20 *const CSSM_FIELD,
21 CSSM_DATA_PTR,
22 ) -> CSSM_RETURN,
23 >,
24 pub CertGetAllTemplateFields: Option<
25 unsafe extern "C-unwind" fn(
26 CSSM_CL_HANDLE,
27 *const SecAsn1Item,
28 *mut uint32,
29 *mut CSSM_FIELD_PTR,
30 ) -> CSSM_RETURN,
31 >,
32 pub CertSign: Option<
33 unsafe extern "C-unwind" fn(
34 CSSM_CL_HANDLE,
35 CSSM_CC_HANDLE,
36 *const SecAsn1Item,
37 *const CSSM_FIELD,
38 uint32,
39 CSSM_DATA_PTR,
40 ) -> CSSM_RETURN,
41 >,
42 pub CertVerify: Option<
43 unsafe extern "C-unwind" fn(
44 CSSM_CL_HANDLE,
45 CSSM_CC_HANDLE,
46 *const SecAsn1Item,
47 *const SecAsn1Item,
48 *const CSSM_FIELD,
49 uint32,
50 ) -> CSSM_RETURN,
51 >,
52 pub CertVerifyWithKey: Option<
53 unsafe extern "C-unwind" fn(
54 CSSM_CL_HANDLE,
55 CSSM_CC_HANDLE,
56 *const SecAsn1Item,
57 ) -> CSSM_RETURN,
58 >,
59 pub CertGetFirstFieldValue: Option<
60 unsafe extern "C-unwind" fn(
61 CSSM_CL_HANDLE,
62 *const SecAsn1Item,
63 *const SecAsn1Oid,
64 CSSM_HANDLE_PTR,
65 *mut uint32,
66 *mut CSSM_DATA_PTR,
67 ) -> CSSM_RETURN,
68 >,
69 pub CertGetNextFieldValue: Option<
70 unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, CSSM_HANDLE, *mut CSSM_DATA_PTR) -> CSSM_RETURN,
71 >,
72 pub CertAbortQuery:
73 Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, CSSM_HANDLE) -> CSSM_RETURN>,
74 pub CertGetKeyInfo: Option<
75 unsafe extern "C-unwind" fn(
76 CSSM_CL_HANDLE,
77 *const SecAsn1Item,
78 *mut CSSM_KEY_PTR,
79 ) -> CSSM_RETURN,
80 >,
81 pub CertGetAllFields: Option<
82 unsafe extern "C-unwind" fn(
83 CSSM_CL_HANDLE,
84 *const SecAsn1Item,
85 *mut uint32,
86 *mut CSSM_FIELD_PTR,
87 ) -> CSSM_RETURN,
88 >,
89 pub FreeFields: Option<
90 unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, uint32, *mut CSSM_FIELD_PTR) -> CSSM_RETURN,
91 >,
92 pub FreeFieldValue: Option<
93 unsafe extern "C-unwind" fn(
94 CSSM_CL_HANDLE,
95 *const SecAsn1Oid,
96 CSSM_DATA_PTR,
97 ) -> CSSM_RETURN,
98 >,
99 pub CertCache: Option<
100 unsafe extern "C-unwind" fn(
101 CSSM_CL_HANDLE,
102 *const SecAsn1Item,
103 CSSM_HANDLE_PTR,
104 ) -> CSSM_RETURN,
105 >,
106 pub CertGetFirstCachedFieldValue: Option<
107 unsafe extern "C-unwind" fn(
108 CSSM_CL_HANDLE,
109 CSSM_HANDLE,
110 *const SecAsn1Oid,
111 CSSM_HANDLE_PTR,
112 *mut uint32,
113 *mut CSSM_DATA_PTR,
114 ) -> CSSM_RETURN,
115 >,
116 pub CertGetNextCachedFieldValue: Option<
117 unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, CSSM_HANDLE, *mut CSSM_DATA_PTR) -> CSSM_RETURN,
118 >,
119 pub CertAbortCache:
120 Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, CSSM_HANDLE) -> CSSM_RETURN>,
121 pub CertGroupToSignedBundle: Option<
122 unsafe extern "C-unwind" fn(
123 CSSM_CL_HANDLE,
124 CSSM_CC_HANDLE,
125 *const CSSM_CERTGROUP,
126 *const CSSM_CERT_BUNDLE_HEADER,
127 CSSM_DATA_PTR,
128 ) -> CSSM_RETURN,
129 >,
130 pub CertGroupFromVerifiedBundle: Option<
131 unsafe extern "C-unwind" fn(
132 CSSM_CL_HANDLE,
133 CSSM_CC_HANDLE,
134 *const CSSM_CERT_BUNDLE,
135 *const SecAsn1Item,
136 *mut CSSM_CERTGROUP_PTR,
137 ) -> CSSM_RETURN,
138 >,
139 pub CertDescribeFormat: Option<
140 unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, *mut uint32, *mut CSSM_OID_PTR) -> CSSM_RETURN,
141 >,
142 pub CrlCreateTemplate: Option<
143 unsafe extern "C-unwind" fn(
144 CSSM_CL_HANDLE,
145 uint32,
146 *const CSSM_FIELD,
147 CSSM_DATA_PTR,
148 ) -> CSSM_RETURN,
149 >,
150 pub CrlSetFields: Option<
151 unsafe extern "C-unwind" fn(
152 CSSM_CL_HANDLE,
153 uint32,
154 *const CSSM_FIELD,
155 *const SecAsn1Item,
156 CSSM_DATA_PTR,
157 ) -> CSSM_RETURN,
158 >,
159 pub CrlAddCert: Option<
160 unsafe extern "C-unwind" fn(
161 CSSM_CL_HANDLE,
162 CSSM_CC_HANDLE,
163 *const SecAsn1Item,
164 uint32,
165 *const CSSM_FIELD,
166 *const SecAsn1Item,
167 CSSM_DATA_PTR,
168 ) -> CSSM_RETURN,
169 >,
170 pub CrlRemoveCert: Option<
171 unsafe extern "C-unwind" fn(
172 CSSM_CL_HANDLE,
173 *const SecAsn1Item,
174 *const SecAsn1Item,
175 CSSM_DATA_PTR,
176 ) -> CSSM_RETURN,
177 >,
178 pub CrlSign: Option<
179 unsafe extern "C-unwind" fn(
180 CSSM_CL_HANDLE,
181 CSSM_CC_HANDLE,
182 *const SecAsn1Item,
183 *const CSSM_FIELD,
184 uint32,
185 CSSM_DATA_PTR,
186 ) -> CSSM_RETURN,
187 >,
188 pub CrlVerify: Option<
189 unsafe extern "C-unwind" fn(
190 CSSM_CL_HANDLE,
191 CSSM_CC_HANDLE,
192 *const SecAsn1Item,
193 *const SecAsn1Item,
194 *const CSSM_FIELD,
195 uint32,
196 ) -> CSSM_RETURN,
197 >,
198 pub CrlVerifyWithKey: Option<
199 unsafe extern "C-unwind" fn(
200 CSSM_CL_HANDLE,
201 CSSM_CC_HANDLE,
202 *const SecAsn1Item,
203 ) -> CSSM_RETURN,
204 >,
205 pub IsCertInCrl: Option<
206 unsafe extern "C-unwind" fn(
207 CSSM_CL_HANDLE,
208 *const SecAsn1Item,
209 *const SecAsn1Item,
210 *mut CSSM_BOOL,
211 ) -> CSSM_RETURN,
212 >,
213 pub CrlGetFirstFieldValue: Option<
214 unsafe extern "C-unwind" fn(
215 CSSM_CL_HANDLE,
216 *const SecAsn1Item,
217 *const SecAsn1Oid,
218 CSSM_HANDLE_PTR,
219 *mut uint32,
220 *mut CSSM_DATA_PTR,
221 ) -> CSSM_RETURN,
222 >,
223 pub CrlGetNextFieldValue: Option<
224 unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, CSSM_HANDLE, *mut CSSM_DATA_PTR) -> CSSM_RETURN,
225 >,
226 pub CrlAbortQuery:
227 Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, CSSM_HANDLE) -> CSSM_RETURN>,
228 pub CrlGetAllFields: Option<
229 unsafe extern "C-unwind" fn(
230 CSSM_CL_HANDLE,
231 *const SecAsn1Item,
232 *mut uint32,
233 *mut CSSM_FIELD_PTR,
234 ) -> CSSM_RETURN,
235 >,
236 pub CrlCache: Option<
237 unsafe extern "C-unwind" fn(
238 CSSM_CL_HANDLE,
239 *const SecAsn1Item,
240 CSSM_HANDLE_PTR,
241 ) -> CSSM_RETURN,
242 >,
243 pub IsCertInCachedCrl: Option<
244 unsafe extern "C-unwind" fn(
245 CSSM_CL_HANDLE,
246 *const SecAsn1Item,
247 CSSM_HANDLE,
248 *mut CSSM_BOOL,
249 CSSM_DATA_PTR,
250 ) -> CSSM_RETURN,
251 >,
252 pub CrlGetFirstCachedFieldValue: Option<
253 unsafe extern "C-unwind" fn(
254 CSSM_CL_HANDLE,
255 CSSM_HANDLE,
256 *const SecAsn1Item,
257 *const SecAsn1Oid,
258 CSSM_HANDLE_PTR,
259 *mut uint32,
260 *mut CSSM_DATA_PTR,
261 ) -> CSSM_RETURN,
262 >,
263 pub CrlGetNextCachedFieldValue: Option<
264 unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, CSSM_HANDLE, *mut CSSM_DATA_PTR) -> CSSM_RETURN,
265 >,
266 pub CrlGetAllCachedRecordFields: Option<
267 unsafe extern "C-unwind" fn(
268 CSSM_CL_HANDLE,
269 CSSM_HANDLE,
270 *const SecAsn1Item,
271 *mut uint32,
272 *mut CSSM_FIELD_PTR,
273 ) -> CSSM_RETURN,
274 >,
275 pub CrlAbortCache:
276 Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, CSSM_HANDLE) -> CSSM_RETURN>,
277 pub CrlDescribeFormat: Option<
278 unsafe extern "C-unwind" fn(CSSM_CL_HANDLE, *mut uint32, *mut CSSM_OID_PTR) -> CSSM_RETURN,
279 >,
280 pub PassThrough: Option<
281 unsafe extern "C-unwind" fn(
282 CSSM_CL_HANDLE,
283 CSSM_CC_HANDLE,
284 uint32,
285 *const c_void,
286 *mut *mut c_void,
287 ) -> CSSM_RETURN,
288 >,
289}
290
291#[cfg(all(
292 feature = "SecAsn1Types",
293 feature = "cssmconfig",
294 feature = "cssmtype",
295 feature = "objc2"
296))]
297unsafe impl Encode for cssm_spi_cl_funcs {
298 const ENCODING: Encoding = Encoding::Struct("cssm_spi_cl_funcs", &[
299 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,uint32,*const CSSM_FIELD,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
300 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,*mut uint32,*mut CSSM_FIELD_PTR,) -> CSSM_RETURN>>::ENCODING,
301 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,*const SecAsn1Item,*const CSSM_FIELD,uint32,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
302 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,*const SecAsn1Item,*const SecAsn1Item,*const CSSM_FIELD,uint32,) -> CSSM_RETURN>>::ENCODING,
303 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,*const SecAsn1Item,) -> CSSM_RETURN>>::ENCODING,
304 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,*const SecAsn1Oid,CSSM_HANDLE_PTR,*mut uint32,*mut CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
305 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,*mut CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
306 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,) -> CSSM_RETURN>>::ENCODING,
307 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,*mut CSSM_KEY_PTR,) -> CSSM_RETURN>>::ENCODING,
308 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,*mut uint32,*mut CSSM_FIELD_PTR,) -> CSSM_RETURN>>::ENCODING,
309 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,uint32,*mut CSSM_FIELD_PTR,) -> CSSM_RETURN>>::ENCODING,
310 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Oid,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
311 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,CSSM_HANDLE_PTR,) -> CSSM_RETURN>>::ENCODING,
312 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,*const SecAsn1Oid,CSSM_HANDLE_PTR,*mut uint32,*mut CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
313 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,*mut CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
314 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,) -> CSSM_RETURN>>::ENCODING,
315 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,*const CSSM_CERTGROUP,*const CSSM_CERT_BUNDLE_HEADER,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
316 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,*const CSSM_CERT_BUNDLE,*const SecAsn1Item,*mut CSSM_CERTGROUP_PTR,) -> CSSM_RETURN>>::ENCODING,
317 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*mut uint32,*mut CSSM_OID_PTR,) -> CSSM_RETURN>>::ENCODING,
318 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,uint32,*const CSSM_FIELD,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
319 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,uint32,*const CSSM_FIELD,*const SecAsn1Item,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
320 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,*const SecAsn1Item,uint32,*const CSSM_FIELD,*const SecAsn1Item,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
321 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,*const SecAsn1Item,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
322 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,*const SecAsn1Item,*const CSSM_FIELD,uint32,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
323 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,*const SecAsn1Item,*const SecAsn1Item,*const CSSM_FIELD,uint32,) -> CSSM_RETURN>>::ENCODING,
324 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,*const SecAsn1Item,) -> CSSM_RETURN>>::ENCODING,
325 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,*const SecAsn1Item,*mut CSSM_BOOL,) -> CSSM_RETURN>>::ENCODING,
326 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,*const SecAsn1Oid,CSSM_HANDLE_PTR,*mut uint32,*mut CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
327 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,*mut CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
328 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,) -> CSSM_RETURN>>::ENCODING,
329 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,*mut uint32,*mut CSSM_FIELD_PTR,) -> CSSM_RETURN>>::ENCODING,
330 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,CSSM_HANDLE_PTR,) -> CSSM_RETURN>>::ENCODING,
331 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*const SecAsn1Item,CSSM_HANDLE,*mut CSSM_BOOL,CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
332 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,*const SecAsn1Item,*const SecAsn1Oid,CSSM_HANDLE_PTR,*mut uint32,*mut CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
333 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,*mut CSSM_DATA_PTR,) -> CSSM_RETURN>>::ENCODING,
334 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,*const SecAsn1Item,*mut uint32,*mut CSSM_FIELD_PTR,) -> CSSM_RETURN>>::ENCODING,
335 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_HANDLE,) -> CSSM_RETURN>>::ENCODING,
336 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,*mut uint32,*mut CSSM_OID_PTR,) -> CSSM_RETURN>>::ENCODING,
337 <Option<unsafe extern "C-unwind" fn(CSSM_CL_HANDLE,CSSM_CC_HANDLE,uint32,*const c_void,*mut *mut c_void,) -> CSSM_RETURN>>::ENCODING,
338 ]);
339}
340
341#[cfg(all(
342 feature = "SecAsn1Types",
343 feature = "cssmconfig",
344 feature = "cssmtype",
345 feature = "objc2"
346))]
347unsafe impl RefEncode for cssm_spi_cl_funcs {
348 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
349}
350
351#[deprecated]
353#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
354pub type CSSM_SPI_CL_FUNCS = cssm_spi_cl_funcs;
355
356#[deprecated]
358#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
359pub type CSSM_SPI_CL_FUNCS_PTR = *mut cssm_spi_cl_funcs;