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