objc2_security/generated/
SecAsn1Types.rs1use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7
8use crate::*;
9
10#[repr(C)]
12#[derive(Clone, Copy, Debug, PartialEq)]
13pub struct cssm_data {
14 pub Length: usize,
15 pub Data: *mut u8,
16}
17
18#[cfg(feature = "objc2")]
19unsafe impl Encode for cssm_data {
20 const ENCODING: Encoding =
21 Encoding::Struct("cssm_data", &[<usize>::ENCODING, <*mut u8>::ENCODING]);
22}
23
24#[cfg(feature = "objc2")]
25unsafe impl RefEncode for cssm_data {
26 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
27}
28
29#[deprecated = "SecAsn1 is not supported"]
31pub type SecAsn1Item = cssm_data;
32
33#[deprecated = "SecAsn1 is not supported"]
35pub type SecAsn1Oid = cssm_data;
36
37#[deprecated = "SecAsn1 is not supported"]
39#[repr(C)]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub struct SecAsn1AlgId {
42 pub algorithm: SecAsn1Oid,
43 pub parameters: SecAsn1Item,
44}
45
46#[cfg(feature = "objc2")]
47unsafe impl Encode for SecAsn1AlgId {
48 const ENCODING: Encoding =
49 Encoding::Struct("?", &[<SecAsn1Oid>::ENCODING, <SecAsn1Item>::ENCODING]);
50}
51
52#[cfg(feature = "objc2")]
53unsafe impl RefEncode for SecAsn1AlgId {
54 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
55}
56
57#[deprecated = "SecAsn1 is not supported"]
59#[repr(C)]
60#[derive(Clone, Copy, Debug, PartialEq)]
61pub struct SecAsn1PubKeyInfo {
62 pub algorithm: SecAsn1AlgId,
63 pub subjectPublicKey: SecAsn1Item,
64}
65
66#[cfg(feature = "objc2")]
67unsafe impl Encode for SecAsn1PubKeyInfo {
68 const ENCODING: Encoding =
69 Encoding::Struct("?", &[<SecAsn1AlgId>::ENCODING, <SecAsn1Item>::ENCODING]);
70}
71
72#[cfg(feature = "objc2")]
73unsafe impl RefEncode for SecAsn1PubKeyInfo {
74 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
75}
76
77#[repr(C)]
79#[derive(Clone, Copy, Debug, PartialEq)]
80pub struct SecAsn1Template_struct {
81 pub kind: u32,
82 pub offset: u32,
83 pub sub: NonNull<c_void>,
84 pub size: u32,
85}
86
87#[cfg(feature = "objc2")]
88unsafe impl Encode for SecAsn1Template_struct {
89 const ENCODING: Encoding = Encoding::Struct(
90 "SecAsn1Template_struct",
91 &[
92 <u32>::ENCODING,
93 <u32>::ENCODING,
94 <NonNull<c_void>>::ENCODING,
95 <u32>::ENCODING,
96 ],
97 );
98}
99
100#[cfg(feature = "objc2")]
101unsafe impl RefEncode for SecAsn1Template_struct {
102 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
103}
104
105#[deprecated = "SecAsn1 is not supported"]
107pub type SecAsn1Template = SecAsn1Template_struct;
108
109#[deprecated = "SecAsn1 is not supported"]
111pub type SecAsn1TemplateChooser = core::ffi::c_void;
112
113#[deprecated = "SecAsn1 is not supported"]
115pub type SecAsn1TemplateChooserPtr = *mut SecAsn1TemplateChooser;