1use core::ffi::*;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[cfg(feature = "cssmconfig")]
11pub type CSSM_BER_TAG = uint8;
12
13#[deprecated]
15#[cfg(feature = "SecAsn1Types")]
16pub type CSSM_X509_ALGORITHM_IDENTIFIER_PTR = *mut SecAsn1AlgId;
17
18#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
20#[deprecated]
21#[repr(C)]
22#[derive(Clone, Copy, Debug, PartialEq)]
23pub struct cssm_x509_type_value_pair {
24 pub r#type: SecAsn1Oid,
25 pub valueType: CSSM_BER_TAG,
26 pub value: SecAsn1Item,
27}
28
29#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
30unsafe impl Encode for cssm_x509_type_value_pair {
31 const ENCODING: Encoding = Encoding::Struct(
32 "cssm_x509_type_value_pair",
33 &[
34 <SecAsn1Oid>::ENCODING,
35 <CSSM_BER_TAG>::ENCODING,
36 <SecAsn1Item>::ENCODING,
37 ],
38 );
39}
40
41#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
42unsafe impl RefEncode for cssm_x509_type_value_pair {
43 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
44}
45
46#[deprecated]
48#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
49pub type CSSM_X509_TYPE_VALUE_PAIR = cssm_x509_type_value_pair;
50
51#[deprecated]
53#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
54pub type CSSM_X509_TYPE_VALUE_PAIR_PTR = *mut cssm_x509_type_value_pair;
55
56#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
58#[deprecated]
59#[repr(C)]
60#[derive(Clone, Copy, Debug, PartialEq)]
61pub struct cssm_x509_rdn {
62 pub numberOfPairs: uint32,
63 pub AttributeTypeAndValue: CSSM_X509_TYPE_VALUE_PAIR_PTR,
64}
65
66#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
67unsafe impl Encode for cssm_x509_rdn {
68 const ENCODING: Encoding = Encoding::Struct(
69 "cssm_x509_rdn",
70 &[
71 <uint32>::ENCODING,
72 <CSSM_X509_TYPE_VALUE_PAIR_PTR>::ENCODING,
73 ],
74 );
75}
76
77#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
78unsafe impl RefEncode for cssm_x509_rdn {
79 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
80}
81
82#[deprecated]
84#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
85pub type CSSM_X509_RDN = cssm_x509_rdn;
86
87#[deprecated]
89#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
90pub type CSSM_X509_RDN_PTR = *mut cssm_x509_rdn;
91
92#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
94#[deprecated]
95#[repr(C)]
96#[derive(Clone, Copy, Debug, PartialEq)]
97pub struct cssm_x509_name {
98 pub numberOfRDNs: uint32,
99 pub RelativeDistinguishedName: CSSM_X509_RDN_PTR,
100}
101
102#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
103unsafe impl Encode for cssm_x509_name {
104 const ENCODING: Encoding = Encoding::Struct(
105 "cssm_x509_name",
106 &[<uint32>::ENCODING, <CSSM_X509_RDN_PTR>::ENCODING],
107 );
108}
109
110#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
111unsafe impl RefEncode for cssm_x509_name {
112 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
113}
114
115#[deprecated]
117#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
118pub type CSSM_X509_NAME = cssm_x509_name;
119
120#[deprecated]
122#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
123pub type CSSM_X509_NAME_PTR = *mut cssm_x509_name;
124
125#[deprecated]
127#[cfg(feature = "SecAsn1Types")]
128pub type CSSM_X509_SUBJECT_PUBLIC_KEY_INFO_PTR = *mut SecAsn1PubKeyInfo;
129
130#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
132#[deprecated]
133#[repr(C)]
134#[derive(Clone, Copy, Debug, PartialEq)]
135pub struct cssm_x509_time {
136 pub timeType: CSSM_BER_TAG,
137 pub time: SecAsn1Item,
138}
139
140#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
141unsafe impl Encode for cssm_x509_time {
142 const ENCODING: Encoding = Encoding::Struct(
143 "cssm_x509_time",
144 &[<CSSM_BER_TAG>::ENCODING, <SecAsn1Item>::ENCODING],
145 );
146}
147
148#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
149unsafe impl RefEncode for cssm_x509_time {
150 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
151}
152
153#[deprecated]
155#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
156pub type CSSM_X509_TIME = cssm_x509_time;
157
158#[deprecated]
160#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
161pub type CSSM_X509_TIME_PTR = *mut cssm_x509_time;
162
163#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
165#[deprecated]
166#[repr(C)]
167#[derive(Clone, Copy, Debug, PartialEq)]
168pub struct x509_validity {
169 pub notBefore: CSSM_X509_TIME,
170 pub notAfter: CSSM_X509_TIME,
171}
172
173#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
174unsafe impl Encode for x509_validity {
175 const ENCODING: Encoding = Encoding::Struct(
176 "x509_validity",
177 &[<CSSM_X509_TIME>::ENCODING, <CSSM_X509_TIME>::ENCODING],
178 );
179}
180
181#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
182unsafe impl RefEncode for x509_validity {
183 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
184}
185
186#[deprecated]
188#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
189pub type CSSM_X509_VALIDITY = x509_validity;
190
191#[deprecated]
193#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
194pub type CSSM_X509_VALIDITY_PTR = *mut x509_validity;
195
196#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
198pub type CSSM_X509_OPTION = CSSM_BOOL;
199
200#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
202#[deprecated]
203#[repr(C)]
204#[derive(Clone, Copy, Debug, PartialEq)]
205pub struct cssm_x509ext_basicConstraints {
206 pub cA: CSSM_BOOL,
207 pub pathLenConstraintPresent: CSSM_X509_OPTION,
208 pub pathLenConstraint: uint32,
209}
210
211#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
212unsafe impl Encode for cssm_x509ext_basicConstraints {
213 const ENCODING: Encoding = Encoding::Struct(
214 "cssm_x509ext_basicConstraints",
215 &[
216 <CSSM_BOOL>::ENCODING,
217 <CSSM_X509_OPTION>::ENCODING,
218 <uint32>::ENCODING,
219 ],
220 );
221}
222
223#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
224unsafe impl RefEncode for cssm_x509ext_basicConstraints {
225 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
226}
227
228#[deprecated]
230#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
231pub type CSSM_X509EXT_BASICCONSTRAINTS = cssm_x509ext_basicConstraints;
232
233#[deprecated]
235#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
236pub type CSSM_X509EXT_BASICCONSTRAINTS_PTR = *mut cssm_x509ext_basicConstraints;
237
238#[repr(transparent)]
240#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
241pub struct extension_data_format(pub c_uint);
242impl extension_data_format {
243 pub const CSSM_X509_DATAFORMAT_ENCODED: Self = Self(0);
244 pub const CSSM_X509_DATAFORMAT_PARSED: Self = Self(1);
245 pub const CSSM_X509_DATAFORMAT_PAIR: Self = Self(2);
246}
247
248#[cfg(feature = "objc2")]
249unsafe impl Encode for extension_data_format {
250 const ENCODING: Encoding = c_uint::ENCODING;
251}
252
253#[cfg(feature = "objc2")]
254unsafe impl RefEncode for extension_data_format {
255 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
256}
257
258pub type CSSM_X509EXT_DATA_FORMAT = extension_data_format;
260
261#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
263#[deprecated]
264#[repr(C)]
265#[derive(Clone, Copy, Debug, PartialEq)]
266pub struct cssm_x509_extensionTagAndValue {
267 pub r#type: CSSM_BER_TAG,
268 pub value: SecAsn1Item,
269}
270
271#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
272unsafe impl Encode for cssm_x509_extensionTagAndValue {
273 const ENCODING: Encoding = Encoding::Struct(
274 "cssm_x509_extensionTagAndValue",
275 &[<CSSM_BER_TAG>::ENCODING, <SecAsn1Item>::ENCODING],
276 );
277}
278
279#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
280unsafe impl RefEncode for cssm_x509_extensionTagAndValue {
281 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
282}
283
284#[deprecated]
286#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
287pub type CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue;
288
289#[deprecated]
291#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
292pub type CSSM_X509EXT_TAGandVALUE_PTR = *mut cssm_x509_extensionTagAndValue;
293
294#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
296#[deprecated]
297#[repr(C)]
298#[derive(Clone, Copy, Debug, PartialEq)]
299pub struct cssm_x509ext_pair {
300 pub tagAndValue: CSSM_X509EXT_TAGandVALUE,
301 pub parsedValue: *mut c_void,
302}
303
304#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
305unsafe impl Encode for cssm_x509ext_pair {
306 const ENCODING: Encoding = Encoding::Struct(
307 "cssm_x509ext_pair",
308 &[
309 <CSSM_X509EXT_TAGandVALUE>::ENCODING,
310 <*mut c_void>::ENCODING,
311 ],
312 );
313}
314
315#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
316unsafe impl RefEncode for cssm_x509ext_pair {
317 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
318}
319
320#[deprecated]
322#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
323pub type CSSM_X509EXT_PAIR = cssm_x509ext_pair;
324
325#[deprecated]
327#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
328pub type CSSM_X509EXT_PAIR_PTR = *mut cssm_x509ext_pair;
329
330#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
332#[deprecated]
333#[repr(C)]
334#[derive(Clone, Copy)]
335pub union cssm_x509ext_value {
336 pub tagAndValue: *mut CSSM_X509EXT_TAGandVALUE,
337 pub parsedValue: *mut c_void,
338 pub valuePair: *mut CSSM_X509EXT_PAIR,
339}
340
341#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
342unsafe impl Encode for cssm_x509ext_value {
343 const ENCODING: Encoding = Encoding::Union(
344 "cssm_x509ext_value",
345 &[
346 <*mut CSSM_X509EXT_TAGandVALUE>::ENCODING,
347 <*mut c_void>::ENCODING,
348 <*mut CSSM_X509EXT_PAIR>::ENCODING,
349 ],
350 );
351}
352
353#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
354unsafe impl RefEncode for cssm_x509ext_value {
355 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
356}
357
358#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
360#[deprecated]
361#[repr(C)]
362#[derive(Clone, Copy)]
363pub struct cssm_x509_extension {
364 pub extnId: SecAsn1Oid,
365 pub critical: CSSM_BOOL,
366 pub format: CSSM_X509EXT_DATA_FORMAT,
367 pub value: cssm_x509ext_value,
368 pub BERvalue: SecAsn1Item,
369}
370
371#[cfg(all(
372 feature = "SecAsn1Types",
373 feature = "cssmconfig",
374 feature = "cssmtype",
375 feature = "objc2"
376))]
377unsafe impl Encode for cssm_x509_extension {
378 const ENCODING: Encoding = Encoding::Struct(
379 "cssm_x509_extension",
380 &[
381 <SecAsn1Oid>::ENCODING,
382 <CSSM_BOOL>::ENCODING,
383 <CSSM_X509EXT_DATA_FORMAT>::ENCODING,
384 <cssm_x509ext_value>::ENCODING,
385 <SecAsn1Item>::ENCODING,
386 ],
387 );
388}
389
390#[cfg(all(
391 feature = "SecAsn1Types",
392 feature = "cssmconfig",
393 feature = "cssmtype",
394 feature = "objc2"
395))]
396unsafe impl RefEncode for cssm_x509_extension {
397 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
398}
399
400#[deprecated]
402#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
403pub type CSSM_X509_EXTENSION = cssm_x509_extension;
404
405#[deprecated]
407#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
408pub type CSSM_X509_EXTENSION_PTR = *mut cssm_x509_extension;
409
410#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
412#[deprecated]
413#[repr(C)]
414#[derive(Clone, Copy, Debug, PartialEq)]
415pub struct cssm_x509_extensions {
416 pub numberOfExtensions: uint32,
417 pub extensions: CSSM_X509_EXTENSION_PTR,
418}
419
420#[cfg(all(
421 feature = "SecAsn1Types",
422 feature = "cssmconfig",
423 feature = "cssmtype",
424 feature = "objc2"
425))]
426unsafe impl Encode for cssm_x509_extensions {
427 const ENCODING: Encoding = Encoding::Struct(
428 "cssm_x509_extensions",
429 &[<uint32>::ENCODING, <CSSM_X509_EXTENSION_PTR>::ENCODING],
430 );
431}
432
433#[cfg(all(
434 feature = "SecAsn1Types",
435 feature = "cssmconfig",
436 feature = "cssmtype",
437 feature = "objc2"
438))]
439unsafe impl RefEncode for cssm_x509_extensions {
440 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
441}
442
443#[deprecated]
445#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
446pub type CSSM_X509_EXTENSIONS = cssm_x509_extensions;
447
448#[deprecated]
450#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
451pub type CSSM_X509_EXTENSIONS_PTR = *mut cssm_x509_extensions;
452
453#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
455#[deprecated]
456#[repr(C)]
457#[derive(Clone, Copy, Debug, PartialEq)]
458pub struct cssm_x509_tbs_certificate {
459 pub version: SecAsn1Item,
460 pub serialNumber: SecAsn1Item,
461 pub signature: SecAsn1AlgId,
462 pub issuer: CSSM_X509_NAME,
463 pub validity: CSSM_X509_VALIDITY,
464 pub subject: CSSM_X509_NAME,
465 pub subjectPublicKeyInfo: SecAsn1PubKeyInfo,
466 pub issuerUniqueIdentifier: SecAsn1Item,
467 pub subjectUniqueIdentifier: SecAsn1Item,
468 pub extensions: CSSM_X509_EXTENSIONS,
469}
470
471#[cfg(all(
472 feature = "SecAsn1Types",
473 feature = "cssmconfig",
474 feature = "cssmtype",
475 feature = "objc2"
476))]
477unsafe impl Encode for cssm_x509_tbs_certificate {
478 const ENCODING: Encoding = Encoding::Struct(
479 "cssm_x509_tbs_certificate",
480 &[
481 <SecAsn1Item>::ENCODING,
482 <SecAsn1Item>::ENCODING,
483 <SecAsn1AlgId>::ENCODING,
484 <CSSM_X509_NAME>::ENCODING,
485 <CSSM_X509_VALIDITY>::ENCODING,
486 <CSSM_X509_NAME>::ENCODING,
487 <SecAsn1PubKeyInfo>::ENCODING,
488 <SecAsn1Item>::ENCODING,
489 <SecAsn1Item>::ENCODING,
490 <CSSM_X509_EXTENSIONS>::ENCODING,
491 ],
492 );
493}
494
495#[cfg(all(
496 feature = "SecAsn1Types",
497 feature = "cssmconfig",
498 feature = "cssmtype",
499 feature = "objc2"
500))]
501unsafe impl RefEncode for cssm_x509_tbs_certificate {
502 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
503}
504
505#[deprecated]
507#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
508pub type CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate;
509
510#[deprecated]
512#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
513pub type CSSM_X509_TBS_CERTIFICATE_PTR = *mut cssm_x509_tbs_certificate;
514
515#[cfg(feature = "SecAsn1Types")]
517#[deprecated]
518#[repr(C)]
519#[derive(Clone, Copy, Debug, PartialEq)]
520pub struct cssm_x509_signature {
521 pub algorithmIdentifier: SecAsn1AlgId,
522 pub encrypted: SecAsn1Item,
523}
524
525#[cfg(all(feature = "SecAsn1Types", feature = "objc2"))]
526unsafe impl Encode for cssm_x509_signature {
527 const ENCODING: Encoding = Encoding::Struct(
528 "cssm_x509_signature",
529 &[<SecAsn1AlgId>::ENCODING, <SecAsn1Item>::ENCODING],
530 );
531}
532
533#[cfg(all(feature = "SecAsn1Types", feature = "objc2"))]
534unsafe impl RefEncode for cssm_x509_signature {
535 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
536}
537
538#[deprecated]
540#[cfg(feature = "SecAsn1Types")]
541pub type CSSM_X509_SIGNATURE = cssm_x509_signature;
542
543#[deprecated]
545#[cfg(feature = "SecAsn1Types")]
546pub type CSSM_X509_SIGNATURE_PTR = *mut cssm_x509_signature;
547
548#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
550#[deprecated]
551#[repr(C)]
552#[derive(Clone, Copy, Debug, PartialEq)]
553pub struct cssm_x509_signed_certificate {
554 pub certificate: CSSM_X509_TBS_CERTIFICATE,
555 pub signature: CSSM_X509_SIGNATURE,
556}
557
558#[cfg(all(
559 feature = "SecAsn1Types",
560 feature = "cssmconfig",
561 feature = "cssmtype",
562 feature = "objc2"
563))]
564unsafe impl Encode for cssm_x509_signed_certificate {
565 const ENCODING: Encoding = Encoding::Struct(
566 "cssm_x509_signed_certificate",
567 &[
568 <CSSM_X509_TBS_CERTIFICATE>::ENCODING,
569 <CSSM_X509_SIGNATURE>::ENCODING,
570 ],
571 );
572}
573
574#[cfg(all(
575 feature = "SecAsn1Types",
576 feature = "cssmconfig",
577 feature = "cssmtype",
578 feature = "objc2"
579))]
580unsafe impl RefEncode for cssm_x509_signed_certificate {
581 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
582}
583
584#[deprecated]
586#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
587pub type CSSM_X509_SIGNED_CERTIFICATE = cssm_x509_signed_certificate;
588
589#[deprecated]
591#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
592pub type CSSM_X509_SIGNED_CERTIFICATE_PTR = *mut cssm_x509_signed_certificate;
593
594#[cfg(feature = "SecAsn1Types")]
596#[deprecated]
597#[repr(C)]
598#[derive(Clone, Copy, Debug, PartialEq)]
599pub struct cssm_x509ext_policyQualifierInfo {
600 pub policyQualifierId: SecAsn1Oid,
601 pub value: SecAsn1Item,
602}
603
604#[cfg(all(feature = "SecAsn1Types", feature = "objc2"))]
605unsafe impl Encode for cssm_x509ext_policyQualifierInfo {
606 const ENCODING: Encoding = Encoding::Struct(
607 "cssm_x509ext_policyQualifierInfo",
608 &[<SecAsn1Oid>::ENCODING, <SecAsn1Item>::ENCODING],
609 );
610}
611
612#[cfg(all(feature = "SecAsn1Types", feature = "objc2"))]
613unsafe impl RefEncode for cssm_x509ext_policyQualifierInfo {
614 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
615}
616
617#[deprecated]
619#[cfg(feature = "SecAsn1Types")]
620pub type CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo;
621
622#[deprecated]
624#[cfg(feature = "SecAsn1Types")]
625pub type CSSM_X509EXT_POLICYQUALIFIERINFO_PTR = *mut cssm_x509ext_policyQualifierInfo;
626
627#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
629#[deprecated]
630#[repr(C)]
631#[derive(Clone, Copy, Debug, PartialEq)]
632pub struct cssm_x509ext_policyQualifiers {
633 pub numberOfPolicyQualifiers: uint32,
634 pub policyQualifier: *mut CSSM_X509EXT_POLICYQUALIFIERINFO,
635}
636
637#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
638unsafe impl Encode for cssm_x509ext_policyQualifiers {
639 const ENCODING: Encoding = Encoding::Struct(
640 "cssm_x509ext_policyQualifiers",
641 &[
642 <uint32>::ENCODING,
643 <*mut CSSM_X509EXT_POLICYQUALIFIERINFO>::ENCODING,
644 ],
645 );
646}
647
648#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
649unsafe impl RefEncode for cssm_x509ext_policyQualifiers {
650 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
651}
652
653#[deprecated]
655#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
656pub type CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers;
657
658#[deprecated]
660#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
661pub type CSSM_X509EXT_POLICYQUALIFIERS_PTR = *mut cssm_x509ext_policyQualifiers;
662
663#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
665#[deprecated]
666#[repr(C)]
667#[derive(Clone, Copy, Debug, PartialEq)]
668pub struct cssm_x509ext_policyInfo {
669 pub policyIdentifier: SecAsn1Oid,
670 pub policyQualifiers: CSSM_X509EXT_POLICYQUALIFIERS,
671}
672
673#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
674unsafe impl Encode for cssm_x509ext_policyInfo {
675 const ENCODING: Encoding = Encoding::Struct(
676 "cssm_x509ext_policyInfo",
677 &[
678 <SecAsn1Oid>::ENCODING,
679 <CSSM_X509EXT_POLICYQUALIFIERS>::ENCODING,
680 ],
681 );
682}
683
684#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "objc2"))]
685unsafe impl RefEncode for cssm_x509ext_policyInfo {
686 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
687}
688
689#[deprecated]
691#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
692pub type CSSM_X509EXT_POLICYINFO = cssm_x509ext_policyInfo;
693
694#[deprecated]
696#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig"))]
697pub type CSSM_X509EXT_POLICYINFO_PTR = *mut cssm_x509ext_policyInfo;
698
699#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
701#[deprecated]
702#[repr(C)]
703#[derive(Clone, Copy, Debug, PartialEq)]
704pub struct cssm_x509_revoked_cert_entry {
705 pub certificateSerialNumber: SecAsn1Item,
706 pub revocationDate: CSSM_X509_TIME,
707 pub extensions: CSSM_X509_EXTENSIONS,
708}
709
710#[cfg(all(
711 feature = "SecAsn1Types",
712 feature = "cssmconfig",
713 feature = "cssmtype",
714 feature = "objc2"
715))]
716unsafe impl Encode for cssm_x509_revoked_cert_entry {
717 const ENCODING: Encoding = Encoding::Struct(
718 "cssm_x509_revoked_cert_entry",
719 &[
720 <SecAsn1Item>::ENCODING,
721 <CSSM_X509_TIME>::ENCODING,
722 <CSSM_X509_EXTENSIONS>::ENCODING,
723 ],
724 );
725}
726
727#[cfg(all(
728 feature = "SecAsn1Types",
729 feature = "cssmconfig",
730 feature = "cssmtype",
731 feature = "objc2"
732))]
733unsafe impl RefEncode for cssm_x509_revoked_cert_entry {
734 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
735}
736
737#[deprecated]
739#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
740pub type CSSM_X509_REVOKED_CERT_ENTRY = cssm_x509_revoked_cert_entry;
741
742#[deprecated]
744#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
745pub type CSSM_X509_REVOKED_CERT_ENTRY_PTR = *mut cssm_x509_revoked_cert_entry;
746
747#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
749#[deprecated]
750#[repr(C)]
751#[derive(Clone, Copy, Debug, PartialEq)]
752pub struct cssm_x509_revoked_cert_list {
753 pub numberOfRevokedCertEntries: uint32,
754 pub revokedCertEntry: CSSM_X509_REVOKED_CERT_ENTRY_PTR,
755}
756
757#[cfg(all(
758 feature = "SecAsn1Types",
759 feature = "cssmconfig",
760 feature = "cssmtype",
761 feature = "objc2"
762))]
763unsafe impl Encode for cssm_x509_revoked_cert_list {
764 const ENCODING: Encoding = Encoding::Struct(
765 "cssm_x509_revoked_cert_list",
766 &[
767 <uint32>::ENCODING,
768 <CSSM_X509_REVOKED_CERT_ENTRY_PTR>::ENCODING,
769 ],
770 );
771}
772
773#[cfg(all(
774 feature = "SecAsn1Types",
775 feature = "cssmconfig",
776 feature = "cssmtype",
777 feature = "objc2"
778))]
779unsafe impl RefEncode for cssm_x509_revoked_cert_list {
780 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
781}
782
783#[deprecated]
785#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
786pub type CSSM_X509_REVOKED_CERT_LIST = cssm_x509_revoked_cert_list;
787
788#[deprecated]
790#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
791pub type CSSM_X509_REVOKED_CERT_LIST_PTR = *mut cssm_x509_revoked_cert_list;
792
793#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
795#[deprecated]
796#[repr(C)]
797#[derive(Clone, Copy, Debug, PartialEq)]
798pub struct cssm_x509_tbs_certlist {
799 pub version: SecAsn1Item,
800 pub signature: SecAsn1AlgId,
801 pub issuer: CSSM_X509_NAME,
802 pub thisUpdate: CSSM_X509_TIME,
803 pub nextUpdate: CSSM_X509_TIME,
804 pub revokedCertificates: CSSM_X509_REVOKED_CERT_LIST_PTR,
805 pub extensions: CSSM_X509_EXTENSIONS,
806}
807
808#[cfg(all(
809 feature = "SecAsn1Types",
810 feature = "cssmconfig",
811 feature = "cssmtype",
812 feature = "objc2"
813))]
814unsafe impl Encode for cssm_x509_tbs_certlist {
815 const ENCODING: Encoding = Encoding::Struct(
816 "cssm_x509_tbs_certlist",
817 &[
818 <SecAsn1Item>::ENCODING,
819 <SecAsn1AlgId>::ENCODING,
820 <CSSM_X509_NAME>::ENCODING,
821 <CSSM_X509_TIME>::ENCODING,
822 <CSSM_X509_TIME>::ENCODING,
823 <CSSM_X509_REVOKED_CERT_LIST_PTR>::ENCODING,
824 <CSSM_X509_EXTENSIONS>::ENCODING,
825 ],
826 );
827}
828
829#[cfg(all(
830 feature = "SecAsn1Types",
831 feature = "cssmconfig",
832 feature = "cssmtype",
833 feature = "objc2"
834))]
835unsafe impl RefEncode for cssm_x509_tbs_certlist {
836 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
837}
838
839#[deprecated]
841#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
842pub type CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist;
843
844#[deprecated]
846#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
847pub type CSSM_X509_TBS_CERTLIST_PTR = *mut cssm_x509_tbs_certlist;
848
849#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
851#[deprecated]
852#[repr(C)]
853#[derive(Clone, Copy, Debug, PartialEq)]
854pub struct cssm_x509_signed_crl {
855 pub tbsCertList: CSSM_X509_TBS_CERTLIST,
856 pub signature: CSSM_X509_SIGNATURE,
857}
858
859#[cfg(all(
860 feature = "SecAsn1Types",
861 feature = "cssmconfig",
862 feature = "cssmtype",
863 feature = "objc2"
864))]
865unsafe impl Encode for cssm_x509_signed_crl {
866 const ENCODING: Encoding = Encoding::Struct(
867 "cssm_x509_signed_crl",
868 &[
869 <CSSM_X509_TBS_CERTLIST>::ENCODING,
870 <CSSM_X509_SIGNATURE>::ENCODING,
871 ],
872 );
873}
874
875#[cfg(all(
876 feature = "SecAsn1Types",
877 feature = "cssmconfig",
878 feature = "cssmtype",
879 feature = "objc2"
880))]
881unsafe impl RefEncode for cssm_x509_signed_crl {
882 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
883}
884
885#[deprecated]
887#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
888pub type CSSM_X509_SIGNED_CRL = cssm_x509_signed_crl;
889
890#[deprecated]
892#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
893pub type CSSM_X509_SIGNED_CRL_PTR = *mut cssm_x509_signed_crl;