objc2_security/generated/
cssmkrapi.rs1use core::ffi::*;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[cfg(feature = "cssmconfig")]
11pub type CSSM_KRSP_HANDLE = uint32;
12
13#[cfg(feature = "cssmconfig")]
15#[repr(C)]
16#[derive(Clone, Copy, Debug, PartialEq)]
17pub struct cssm_kr_name {
18 pub Type: uint8,
19 pub Length: uint8,
20 pub Name: *mut c_char,
21}
22
23#[cfg(all(feature = "cssmconfig", feature = "objc2"))]
24unsafe impl Encode for cssm_kr_name {
25 const ENCODING: Encoding = Encoding::Struct(
26 "cssm_kr_name",
27 &[
28 <uint8>::ENCODING,
29 <uint8>::ENCODING,
30 <*mut c_char>::ENCODING,
31 ],
32 );
33}
34
35#[cfg(all(feature = "cssmconfig", feature = "objc2"))]
36unsafe impl RefEncode for cssm_kr_name {
37 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40#[deprecated]
42#[cfg(feature = "cssmconfig")]
43pub type CSSM_KR_NAME = cssm_kr_name;
44
45#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
47#[deprecated]
48#[repr(C)]
49#[derive(Clone, Copy, Debug, PartialEq)]
50pub struct cssm_kr_profile {
51 pub UserName: CSSM_KR_NAME,
52 pub UserCertificate: CSSM_CERTGROUP_PTR,
53 pub KRSCertChain: CSSM_CERTGROUP_PTR,
54 pub LE_KRANum: uint8,
55 pub LE_KRACertChainList: CSSM_CERTGROUP_PTR,
56 pub ENT_KRANum: uint8,
57 pub ENT_KRACertChainList: CSSM_CERTGROUP_PTR,
58 pub INDIV_KRANum: uint8,
59 pub INDIV_KRACertChainList: CSSM_CERTGROUP_PTR,
60 pub INDIV_AuthenticationInfo: CSSM_DATA_PTR,
61 pub KRSPFlags: uint32,
62 pub KRSPExtensions: CSSM_DATA_PTR,
63}
64
65#[cfg(all(
66 feature = "SecAsn1Types",
67 feature = "cssmconfig",
68 feature = "cssmtype",
69 feature = "objc2"
70))]
71unsafe impl Encode for cssm_kr_profile {
72 const ENCODING: Encoding = Encoding::Struct(
73 "cssm_kr_profile",
74 &[
75 <CSSM_KR_NAME>::ENCODING,
76 <CSSM_CERTGROUP_PTR>::ENCODING,
77 <CSSM_CERTGROUP_PTR>::ENCODING,
78 <uint8>::ENCODING,
79 <CSSM_CERTGROUP_PTR>::ENCODING,
80 <uint8>::ENCODING,
81 <CSSM_CERTGROUP_PTR>::ENCODING,
82 <uint8>::ENCODING,
83 <CSSM_CERTGROUP_PTR>::ENCODING,
84 <CSSM_DATA_PTR>::ENCODING,
85 <uint32>::ENCODING,
86 <CSSM_DATA_PTR>::ENCODING,
87 ],
88 );
89}
90
91#[cfg(all(
92 feature = "SecAsn1Types",
93 feature = "cssmconfig",
94 feature = "cssmtype",
95 feature = "objc2"
96))]
97unsafe impl RefEncode for cssm_kr_profile {
98 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
99}
100
101#[deprecated]
103#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
104pub type CSSM_KR_PROFILE = cssm_kr_profile;
105
106#[deprecated]
108#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
109pub type CSSM_KR_PROFILE_PTR = *mut cssm_kr_profile;
110
111#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
113#[deprecated]
114#[repr(C)]
115#[derive(Clone, Copy, Debug, PartialEq)]
116pub struct cssm_kr_wrappedproductinfo {
117 pub StandardVersion: CSSM_VERSION,
118 pub StandardDescription: CSSM_STRING,
119 pub ProductVersion: CSSM_VERSION,
120 pub ProductDescription: CSSM_STRING,
121 pub ProductVendor: CSSM_STRING,
122 pub ProductFlags: uint32,
123}
124
125#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
126unsafe impl Encode for cssm_kr_wrappedproductinfo {
127 const ENCODING: Encoding = Encoding::Struct(
128 "cssm_kr_wrappedproductinfo",
129 &[
130 <CSSM_VERSION>::ENCODING,
131 <CSSM_STRING>::ENCODING,
132 <CSSM_VERSION>::ENCODING,
133 <CSSM_STRING>::ENCODING,
134 <CSSM_STRING>::ENCODING,
135 <uint32>::ENCODING,
136 ],
137 );
138}
139
140#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
141unsafe impl RefEncode for cssm_kr_wrappedproductinfo {
142 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
143}
144
145#[deprecated]
147#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
148pub type CSSM_KR_WRAPPEDPRODUCT_INFO = cssm_kr_wrappedproductinfo;
149
150#[deprecated]
152#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
153pub type CSSM_KR_WRAPPEDPRODUCT_INFO_PTR = *mut cssm_kr_wrappedproductinfo;
154
155#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
157#[deprecated]
158#[repr(C)]
159#[derive(Clone, Copy, Debug, PartialEq)]
160pub struct cssm_krsubservice {
161 pub SubServiceId: uint32,
162 pub Description: *mut c_char,
163 pub WrappedProduct: CSSM_KR_WRAPPEDPRODUCT_INFO,
164}
165
166#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
167unsafe impl Encode for cssm_krsubservice {
168 const ENCODING: Encoding = Encoding::Struct(
169 "cssm_krsubservice",
170 &[
171 <uint32>::ENCODING,
172 <*mut c_char>::ENCODING,
173 <CSSM_KR_WRAPPEDPRODUCT_INFO>::ENCODING,
174 ],
175 );
176}
177
178#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
179unsafe impl RefEncode for cssm_krsubservice {
180 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
181}
182
183#[deprecated]
185#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
186pub type CSSM_KRSUBSERVICE = cssm_krsubservice;
187
188#[deprecated]
190#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
191pub type CSSM_KRSUBSERVICE_PTR = *mut cssm_krsubservice;
192
193#[cfg(feature = "cssmconfig")]
195pub type CSSM_KR_POLICY_TYPE = uint32;
196
197#[cfg(feature = "cssmconfig")]
199pub type CSSM_KR_POLICY_FLAGS = uint32;
200
201#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
203#[deprecated]
204#[repr(C)]
205#[derive(Clone, Copy, Debug, PartialEq)]
206pub struct cssm_kr_policy_list_item {
207 pub next: *mut kr_policy_list_item,
208 pub AlgorithmId: CSSM_ALGORITHMS,
209 pub Mode: CSSM_ENCRYPT_MODE,
210 pub MaxKeyLength: uint32,
211 pub MaxRounds: uint32,
212 pub WorkFactor: uint8,
213 pub PolicyFlags: CSSM_KR_POLICY_FLAGS,
214 pub AlgClass: CSSM_CONTEXT_TYPE,
215}
216
217#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
218unsafe impl Encode for cssm_kr_policy_list_item {
219 const ENCODING: Encoding = Encoding::Struct(
220 "cssm_kr_policy_list_item",
221 &[
222 <*mut kr_policy_list_item>::ENCODING,
223 <CSSM_ALGORITHMS>::ENCODING,
224 <CSSM_ENCRYPT_MODE>::ENCODING,
225 <uint32>::ENCODING,
226 <uint32>::ENCODING,
227 <uint8>::ENCODING,
228 <CSSM_KR_POLICY_FLAGS>::ENCODING,
229 <CSSM_CONTEXT_TYPE>::ENCODING,
230 ],
231 );
232}
233
234#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
235unsafe impl RefEncode for cssm_kr_policy_list_item {
236 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
237}
238
239#[deprecated]
241#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
242pub type CSSM_KR_POLICY_LIST_ITEM = cssm_kr_policy_list_item;
243
244#[deprecated]
246#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
247pub type CSSM_KR_POLICY_LIST_ITEM_PTR = *mut cssm_kr_policy_list_item;
248
249#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
251#[deprecated]
252#[repr(C)]
253#[derive(Clone, Copy, Debug, PartialEq)]
254pub struct cssm_kr_policy_info {
255 pub krbNotAllowed: CSSM_BOOL,
256 pub numberOfEntries: uint32,
257 pub policyEntry: *mut CSSM_KR_POLICY_LIST_ITEM,
258}
259
260#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
261unsafe impl Encode for cssm_kr_policy_info {
262 const ENCODING: Encoding = Encoding::Struct(
263 "cssm_kr_policy_info",
264 &[
265 <CSSM_BOOL>::ENCODING,
266 <uint32>::ENCODING,
267 <*mut CSSM_KR_POLICY_LIST_ITEM>::ENCODING,
268 ],
269 );
270}
271
272#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
273unsafe impl RefEncode for cssm_kr_policy_info {
274 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
275}
276
277#[deprecated]
279#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
280pub type CSSM_KR_POLICY_INFO = cssm_kr_policy_info;
281
282#[deprecated]
284#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
285pub type CSSM_KR_POLICY_INFO_PTR = *mut cssm_kr_policy_info;