1use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7use objc2_core_foundation::*;
8
9use crate::*;
10
11#[repr(transparent)]
26#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
27pub struct SecItemClass(pub FourCharCode);
28impl SecItemClass {
29 #[doc(alias = "kSecInternetPasswordItemClass")]
30 pub const InternetPasswordItemClass: Self = Self(0x696e6574);
31 #[doc(alias = "kSecGenericPasswordItemClass")]
32 pub const GenericPasswordItemClass: Self = Self(0x67656e70);
33 #[doc(alias = "kSecAppleSharePasswordItemClass")]
34 #[deprecated]
35 pub const AppleSharePasswordItemClass: Self = Self(0x61736870);
36 #[doc(alias = "kSecCertificateItemClass")]
37 pub const CertificateItemClass: Self = Self(0x80001000);
38 #[doc(alias = "kSecPublicKeyItemClass")]
39 pub const PublicKeyItemClass: Self = Self(0x0000000F);
40 #[doc(alias = "kSecPrivateKeyItemClass")]
41 pub const PrivateKeyItemClass: Self = Self(0x00000010);
42 #[doc(alias = "kSecSymmetricKeyItemClass")]
43 pub const SymmetricKeyItemClass: Self = Self(0x00000011);
44}
45
46#[cfg(feature = "objc2")]
47unsafe impl Encode for SecItemClass {
48 const ENCODING: Encoding = FourCharCode::ENCODING;
49}
50
51#[cfg(feature = "objc2")]
52unsafe impl RefEncode for SecItemClass {
53 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
54}
55
56#[repr(transparent)]
91#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
92pub struct SecItemAttr(pub FourCharCode);
93impl SecItemAttr {
94 #[doc(alias = "kSecCreationDateItemAttr")]
95 pub const CreationDateItemAttr: Self = Self(0x63646174);
96 #[doc(alias = "kSecModDateItemAttr")]
97 pub const ModDateItemAttr: Self = Self(0x6d646174);
98 #[doc(alias = "kSecDescriptionItemAttr")]
99 pub const DescriptionItemAttr: Self = Self(0x64657363);
100 #[doc(alias = "kSecCommentItemAttr")]
101 pub const CommentItemAttr: Self = Self(0x69636d74);
102 #[doc(alias = "kSecCreatorItemAttr")]
103 pub const CreatorItemAttr: Self = Self(0x63727472);
104 #[doc(alias = "kSecTypeItemAttr")]
105 pub const TypeItemAttr: Self = Self(0x74797065);
106 #[doc(alias = "kSecScriptCodeItemAttr")]
107 pub const ScriptCodeItemAttr: Self = Self(0x73637270);
108 #[doc(alias = "kSecLabelItemAttr")]
109 pub const LabelItemAttr: Self = Self(0x6c61626c);
110 #[doc(alias = "kSecInvisibleItemAttr")]
111 pub const InvisibleItemAttr: Self = Self(0x696e7669);
112 #[doc(alias = "kSecNegativeItemAttr")]
113 pub const NegativeItemAttr: Self = Self(0x6e656761);
114 #[doc(alias = "kSecCustomIconItemAttr")]
115 pub const CustomIconItemAttr: Self = Self(0x63757369);
116 #[doc(alias = "kSecAccountItemAttr")]
117 pub const AccountItemAttr: Self = Self(0x61636374);
118 #[doc(alias = "kSecServiceItemAttr")]
119 pub const ServiceItemAttr: Self = Self(0x73766365);
120 #[doc(alias = "kSecGenericItemAttr")]
121 pub const GenericItemAttr: Self = Self(0x67656e61);
122 #[doc(alias = "kSecSecurityDomainItemAttr")]
123 pub const SecurityDomainItemAttr: Self = Self(0x73646d6e);
124 #[doc(alias = "kSecServerItemAttr")]
125 pub const ServerItemAttr: Self = Self(0x73727672);
126 #[doc(alias = "kSecAuthenticationTypeItemAttr")]
127 pub const AuthenticationTypeItemAttr: Self = Self(0x61747970);
128 #[doc(alias = "kSecPortItemAttr")]
129 pub const PortItemAttr: Self = Self(0x706f7274);
130 #[doc(alias = "kSecPathItemAttr")]
131 pub const PathItemAttr: Self = Self(0x70617468);
132 #[doc(alias = "kSecVolumeItemAttr")]
133 pub const VolumeItemAttr: Self = Self(0x766c6d65);
134 #[doc(alias = "kSecAddressItemAttr")]
135 pub const AddressItemAttr: Self = Self(0x61646472);
136 #[doc(alias = "kSecSignatureItemAttr")]
137 pub const SignatureItemAttr: Self = Self(0x73736967);
138 #[doc(alias = "kSecProtocolItemAttr")]
139 pub const ProtocolItemAttr: Self = Self(0x7074636c);
140 #[doc(alias = "kSecCertificateType")]
141 pub const CertificateType: Self = Self(0x63747970);
142 #[doc(alias = "kSecCertificateEncoding")]
143 pub const CertificateEncoding: Self = Self(0x63656e63);
144 #[doc(alias = "kSecCrlType")]
145 pub const CrlType: Self = Self(0x63727470);
146 #[doc(alias = "kSecCrlEncoding")]
147 pub const CrlEncoding: Self = Self(0x63726e63);
148 #[doc(alias = "kSecAlias")]
149 pub const Alias: Self = Self(0x616c6973);
150}
151
152#[cfg(feature = "objc2")]
153unsafe impl Encode for SecItemAttr {
154 const ENCODING: Encoding = FourCharCode::ENCODING;
155}
156
157#[cfg(feature = "objc2")]
158unsafe impl RefEncode for SecItemAttr {
159 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
160}
161
162#[cfg(feature = "SecBase")]
163unsafe impl ConcreteType for SecKeychainItem {
164 #[doc(alias = "SecKeychainItemGetTypeID")]
168 #[inline]
169 fn type_id() -> CFTypeID {
170 extern "C-unwind" {
171 fn SecKeychainItemGetTypeID() -> CFTypeID;
172 }
173 unsafe { SecKeychainItemGetTypeID() }
174 }
175}
176
177#[cfg(feature = "SecBase")]
178impl SecKeychainItem {
179 #[doc(alias = "SecKeychainItemModifyAttributesAndData")]
198 #[cfg(feature = "SecBase")]
199 #[deprecated = "SecKeychain is deprecated"]
200 #[inline]
201 pub unsafe fn modify_attributes_and_data(
202 &self,
203 attr_list: *const SecKeychainAttributeList,
204 length: u32,
205 data: *const c_void,
206 ) -> OSStatus {
207 extern "C-unwind" {
208 fn SecKeychainItemModifyAttributesAndData(
209 item_ref: &SecKeychainItem,
210 attr_list: *const SecKeychainAttributeList,
211 length: u32,
212 data: *const c_void,
213 ) -> OSStatus;
214 }
215 unsafe { SecKeychainItemModifyAttributesAndData(self, attr_list, length, data) }
216 }
217
218 #[doc(alias = "SecKeychainItemCreateFromContent")]
242 #[cfg(feature = "SecBase")]
243 #[deprecated = "SecKeychain is deprecated"]
244 #[inline]
245 pub unsafe fn create_from_content(
246 item_class: SecItemClass,
247 attr_list: NonNull<SecKeychainAttributeList>,
248 length: u32,
249 data: *const c_void,
250 keychain_ref: Option<&SecKeychain>,
251 initial_access: Option<&SecAccess>,
252 item_ref: *mut *mut SecKeychainItem,
253 ) -> OSStatus {
254 extern "C-unwind" {
255 fn SecKeychainItemCreateFromContent(
256 item_class: SecItemClass,
257 attr_list: NonNull<SecKeychainAttributeList>,
258 length: u32,
259 data: *const c_void,
260 keychain_ref: Option<&SecKeychain>,
261 initial_access: Option<&SecAccess>,
262 item_ref: *mut *mut SecKeychainItem,
263 ) -> OSStatus;
264 }
265 unsafe {
266 SecKeychainItemCreateFromContent(
267 item_class,
268 attr_list,
269 length,
270 data,
271 keychain_ref,
272 initial_access,
273 item_ref,
274 )
275 }
276 }
277
278 #[doc(alias = "SecKeychainItemModifyContent")]
295 #[cfg(feature = "SecBase")]
296 #[deprecated = "SecKeychain is deprecated"]
297 #[inline]
298 pub unsafe fn modify_content(
299 &self,
300 attr_list: *const SecKeychainAttributeList,
301 length: u32,
302 data: *const c_void,
303 ) -> OSStatus {
304 extern "C-unwind" {
305 fn SecKeychainItemModifyContent(
306 item_ref: &SecKeychainItem,
307 attr_list: *const SecKeychainAttributeList,
308 length: u32,
309 data: *const c_void,
310 ) -> OSStatus;
311 }
312 unsafe { SecKeychainItemModifyContent(self, attr_list, length, data) }
313 }
314
315 #[doc(alias = "SecKeychainItemCopyContent")]
336 #[cfg(feature = "SecBase")]
337 #[deprecated = "SecKeychain is deprecated"]
338 #[inline]
339 pub unsafe fn copy_content(
340 &self,
341 item_class: *mut SecItemClass,
342 attr_list: *mut SecKeychainAttributeList,
343 length: *mut u32,
344 out_data: *mut *mut c_void,
345 ) -> OSStatus {
346 extern "C-unwind" {
347 fn SecKeychainItemCopyContent(
348 item_ref: &SecKeychainItem,
349 item_class: *mut SecItemClass,
350 attr_list: *mut SecKeychainAttributeList,
351 length: *mut u32,
352 out_data: *mut *mut c_void,
353 ) -> OSStatus;
354 }
355 unsafe { SecKeychainItemCopyContent(self, item_class, attr_list, length, out_data) }
356 }
357
358 #[doc(alias = "SecKeychainItemFreeContent")]
369 #[cfg(feature = "SecBase")]
370 #[deprecated = "SecKeychain is deprecated"]
371 #[inline]
372 pub unsafe fn free_content(
373 attr_list: *mut SecKeychainAttributeList,
374 data: *mut c_void,
375 ) -> OSStatus {
376 extern "C-unwind" {
377 fn SecKeychainItemFreeContent(
378 attr_list: *mut SecKeychainAttributeList,
379 data: *mut c_void,
380 ) -> OSStatus;
381 }
382 unsafe { SecKeychainItemFreeContent(attr_list, data) }
383 }
384
385 #[doc(alias = "SecKeychainItemCopyAttributesAndData")]
409 #[cfg(feature = "SecBase")]
410 #[deprecated = "SecKeychain is deprecated"]
411 #[inline]
412 pub unsafe fn copy_attributes_and_data(
413 &self,
414 info: *mut SecKeychainAttributeInfo,
415 item_class: *mut SecItemClass,
416 attr_list: *mut *mut SecKeychainAttributeList,
417 length: *mut u32,
418 out_data: *mut *mut c_void,
419 ) -> OSStatus {
420 extern "C-unwind" {
421 fn SecKeychainItemCopyAttributesAndData(
422 item_ref: &SecKeychainItem,
423 info: *mut SecKeychainAttributeInfo,
424 item_class: *mut SecItemClass,
425 attr_list: *mut *mut SecKeychainAttributeList,
426 length: *mut u32,
427 out_data: *mut *mut c_void,
428 ) -> OSStatus;
429 }
430 unsafe {
431 SecKeychainItemCopyAttributesAndData(
432 self, info, item_class, attr_list, length, out_data,
433 )
434 }
435 }
436
437 #[doc(alias = "SecKeychainItemFreeAttributesAndData")]
450 #[cfg(feature = "SecBase")]
451 #[deprecated = "SecKeychain is deprecated"]
452 #[inline]
453 pub unsafe fn free_attributes_and_data(
454 attr_list: *mut SecKeychainAttributeList,
455 data: *mut c_void,
456 ) -> OSStatus {
457 extern "C-unwind" {
458 fn SecKeychainItemFreeAttributesAndData(
459 attr_list: *mut SecKeychainAttributeList,
460 data: *mut c_void,
461 ) -> OSStatus;
462 }
463 unsafe { SecKeychainItemFreeAttributesAndData(attr_list, data) }
464 }
465
466 #[doc(alias = "SecKeychainItemDelete")]
474 #[cfg(feature = "SecBase")]
475 #[deprecated = "SecKeychain is deprecated"]
476 #[inline]
477 pub unsafe fn delete(&self) -> OSStatus {
478 extern "C-unwind" {
479 fn SecKeychainItemDelete(item_ref: &SecKeychainItem) -> OSStatus;
480 }
481 unsafe { SecKeychainItemDelete(self) }
482 }
483
484 #[doc(alias = "SecKeychainItemCopyKeychain")]
496 #[cfg(feature = "SecBase")]
497 #[deprecated = "SecKeychain is deprecated"]
498 #[inline]
499 pub unsafe fn copy_keychain(&self, keychain_ref: NonNull<*mut SecKeychain>) -> OSStatus {
500 extern "C-unwind" {
501 fn SecKeychainItemCopyKeychain(
502 item_ref: &SecKeychainItem,
503 keychain_ref: NonNull<*mut SecKeychain>,
504 ) -> OSStatus;
505 }
506 unsafe { SecKeychainItemCopyKeychain(self, keychain_ref) }
507 }
508
509 #[doc(alias = "SecKeychainItemCreateCopy")]
525 #[cfg(feature = "SecBase")]
526 #[deprecated = "SecKeychain is deprecated"]
527 #[inline]
528 pub unsafe fn create_copy(
529 &self,
530 dest_keychain_ref: Option<&SecKeychain>,
531 initial_access: Option<&SecAccess>,
532 item_copy: NonNull<*mut SecKeychainItem>,
533 ) -> OSStatus {
534 extern "C-unwind" {
535 fn SecKeychainItemCreateCopy(
536 item_ref: &SecKeychainItem,
537 dest_keychain_ref: Option<&SecKeychain>,
538 initial_access: Option<&SecAccess>,
539 item_copy: NonNull<*mut SecKeychainItem>,
540 ) -> OSStatus;
541 }
542 unsafe { SecKeychainItemCreateCopy(self, dest_keychain_ref, initial_access, item_copy) }
543 }
544
545 #[doc(alias = "SecKeychainItemCreatePersistentReference")]
557 #[cfg(feature = "SecBase")]
558 #[deprecated = "SecKeychain is deprecated"]
559 #[inline]
560 pub unsafe fn create_persistent_reference(
561 &self,
562 persistent_item_ref: NonNull<*const CFData>,
563 ) -> OSStatus {
564 extern "C-unwind" {
565 fn SecKeychainItemCreatePersistentReference(
566 item_ref: &SecKeychainItem,
567 persistent_item_ref: NonNull<*const CFData>,
568 ) -> OSStatus;
569 }
570 unsafe { SecKeychainItemCreatePersistentReference(self, persistent_item_ref) }
571 }
572
573 #[doc(alias = "SecKeychainItemCopyFromPersistentReference")]
585 #[cfg(feature = "SecBase")]
586 #[deprecated = "SecKeychain is deprecated"]
587 #[inline]
588 pub unsafe fn copy_from_persistent_reference(
589 persistent_item_ref: &CFData,
590 item_ref: NonNull<*mut SecKeychainItem>,
591 ) -> OSStatus {
592 extern "C-unwind" {
593 fn SecKeychainItemCopyFromPersistentReference(
594 persistent_item_ref: &CFData,
595 item_ref: NonNull<*mut SecKeychainItem>,
596 ) -> OSStatus;
597 }
598 unsafe { SecKeychainItemCopyFromPersistentReference(persistent_item_ref, item_ref) }
599 }
600
601 #[doc(alias = "SecKeychainItemGetDLDBHandle")]
615 #[cfg(all(feature = "SecBase", feature = "cssmconfig", feature = "cssmtype"))]
616 #[deprecated = "CSSM is not supported"]
617 #[inline]
618 pub unsafe fn dldb_handle(&self, dldb_handle: NonNull<CSSM_DL_DB_HANDLE>) -> OSStatus {
619 extern "C-unwind" {
620 fn SecKeychainItemGetDLDBHandle(
621 key_item_ref: &SecKeychainItem,
622 dldb_handle: NonNull<CSSM_DL_DB_HANDLE>,
623 ) -> OSStatus;
624 }
625 unsafe { SecKeychainItemGetDLDBHandle(self, dldb_handle) }
626 }
627
628 #[doc(alias = "SecKeychainItemGetUniqueRecordID")]
642 #[cfg(all(
643 feature = "SecAsn1Types",
644 feature = "SecBase",
645 feature = "cssmconfig",
646 feature = "cssmtype"
647 ))]
648 #[deprecated = "CSSM is not supported"]
649 #[inline]
650 pub unsafe fn unique_record_id(
651 &self,
652 unique_record_id: NonNull<*const CSSM_DB_UNIQUE_RECORD>,
653 ) -> OSStatus {
654 extern "C-unwind" {
655 fn SecKeychainItemGetUniqueRecordID(
656 item_ref: &SecKeychainItem,
657 unique_record_id: NonNull<*const CSSM_DB_UNIQUE_RECORD>,
658 ) -> OSStatus;
659 }
660 unsafe { SecKeychainItemGetUniqueRecordID(self, unique_record_id) }
661 }
662
663 #[doc(alias = "SecKeychainItemCopyAccess")]
675 #[cfg(feature = "SecBase")]
676 #[deprecated = "SecKeychain is deprecated"]
677 #[inline]
678 pub unsafe fn copy_access(&self, access: NonNull<*mut SecAccess>) -> OSStatus {
679 extern "C-unwind" {
680 fn SecKeychainItemCopyAccess(
681 item_ref: &SecKeychainItem,
682 access: NonNull<*mut SecAccess>,
683 ) -> OSStatus;
684 }
685 unsafe { SecKeychainItemCopyAccess(self, access) }
686 }
687
688 #[doc(alias = "SecKeychainItemSetAccess")]
696 #[cfg(feature = "SecBase")]
697 #[deprecated = "SecKeychain is deprecated"]
698 #[inline]
699 pub unsafe fn set_access(&self, access: &SecAccess) -> OSStatus {
700 extern "C-unwind" {
701 fn SecKeychainItemSetAccess(item_ref: &SecKeychainItem, access: &SecAccess)
702 -> OSStatus;
703 }
704 unsafe { SecKeychainItemSetAccess(self, access) }
705 }
706}
707
708extern "C-unwind" {
709 #[cfg(feature = "SecBase")]
710 #[deprecated = "renamed to `SecKeychainItem::modify_attributes_and_data`"]
711 pub fn SecKeychainItemModifyAttributesAndData(
712 item_ref: &SecKeychainItem,
713 attr_list: *const SecKeychainAttributeList,
714 length: u32,
715 data: *const c_void,
716 ) -> OSStatus;
717}
718
719extern "C-unwind" {
720 #[cfg(feature = "SecBase")]
721 #[deprecated = "renamed to `SecKeychainItem::create_from_content`"]
722 pub fn SecKeychainItemCreateFromContent(
723 item_class: SecItemClass,
724 attr_list: NonNull<SecKeychainAttributeList>,
725 length: u32,
726 data: *const c_void,
727 keychain_ref: Option<&SecKeychain>,
728 initial_access: Option<&SecAccess>,
729 item_ref: *mut *mut SecKeychainItem,
730 ) -> OSStatus;
731}
732
733extern "C-unwind" {
734 #[cfg(feature = "SecBase")]
735 #[deprecated = "renamed to `SecKeychainItem::modify_content`"]
736 pub fn SecKeychainItemModifyContent(
737 item_ref: &SecKeychainItem,
738 attr_list: *const SecKeychainAttributeList,
739 length: u32,
740 data: *const c_void,
741 ) -> OSStatus;
742}
743
744extern "C-unwind" {
745 #[cfg(feature = "SecBase")]
746 #[deprecated = "renamed to `SecKeychainItem::copy_content`"]
747 pub fn SecKeychainItemCopyContent(
748 item_ref: &SecKeychainItem,
749 item_class: *mut SecItemClass,
750 attr_list: *mut SecKeychainAttributeList,
751 length: *mut u32,
752 out_data: *mut *mut c_void,
753 ) -> OSStatus;
754}
755
756extern "C-unwind" {
757 #[cfg(feature = "SecBase")]
758 #[deprecated = "renamed to `SecKeychainItem::free_content`"]
759 pub fn SecKeychainItemFreeContent(
760 attr_list: *mut SecKeychainAttributeList,
761 data: *mut c_void,
762 ) -> OSStatus;
763}
764
765extern "C-unwind" {
766 #[cfg(feature = "SecBase")]
767 #[deprecated = "renamed to `SecKeychainItem::copy_attributes_and_data`"]
768 pub fn SecKeychainItemCopyAttributesAndData(
769 item_ref: &SecKeychainItem,
770 info: *mut SecKeychainAttributeInfo,
771 item_class: *mut SecItemClass,
772 attr_list: *mut *mut SecKeychainAttributeList,
773 length: *mut u32,
774 out_data: *mut *mut c_void,
775 ) -> OSStatus;
776}
777
778extern "C-unwind" {
779 #[cfg(feature = "SecBase")]
780 #[deprecated = "renamed to `SecKeychainItem::free_attributes_and_data`"]
781 pub fn SecKeychainItemFreeAttributesAndData(
782 attr_list: *mut SecKeychainAttributeList,
783 data: *mut c_void,
784 ) -> OSStatus;
785}
786
787extern "C-unwind" {
788 #[cfg(feature = "SecBase")]
789 #[deprecated = "renamed to `SecKeychainItem::delete`"]
790 pub fn SecKeychainItemDelete(item_ref: &SecKeychainItem) -> OSStatus;
791}
792
793extern "C-unwind" {
794 #[cfg(feature = "SecBase")]
795 #[deprecated = "renamed to `SecKeychainItem::copy_keychain`"]
796 pub fn SecKeychainItemCopyKeychain(
797 item_ref: &SecKeychainItem,
798 keychain_ref: NonNull<*mut SecKeychain>,
799 ) -> OSStatus;
800}
801
802extern "C-unwind" {
803 #[cfg(feature = "SecBase")]
804 #[deprecated = "renamed to `SecKeychainItem::create_copy`"]
805 pub fn SecKeychainItemCreateCopy(
806 item_ref: &SecKeychainItem,
807 dest_keychain_ref: Option<&SecKeychain>,
808 initial_access: Option<&SecAccess>,
809 item_copy: NonNull<*mut SecKeychainItem>,
810 ) -> OSStatus;
811}
812
813extern "C-unwind" {
814 #[cfg(feature = "SecBase")]
815 #[deprecated = "renamed to `SecKeychainItem::create_persistent_reference`"]
816 pub fn SecKeychainItemCreatePersistentReference(
817 item_ref: &SecKeychainItem,
818 persistent_item_ref: NonNull<*const CFData>,
819 ) -> OSStatus;
820}
821
822extern "C-unwind" {
823 #[cfg(feature = "SecBase")]
824 #[deprecated = "renamed to `SecKeychainItem::copy_from_persistent_reference`"]
825 pub fn SecKeychainItemCopyFromPersistentReference(
826 persistent_item_ref: &CFData,
827 item_ref: NonNull<*mut SecKeychainItem>,
828 ) -> OSStatus;
829}
830
831extern "C-unwind" {
832 #[cfg(all(feature = "SecBase", feature = "cssmconfig", feature = "cssmtype"))]
833 #[deprecated = "renamed to `SecKeychainItem::dldb_handle`"]
834 pub fn SecKeychainItemGetDLDBHandle(
835 key_item_ref: &SecKeychainItem,
836 dldb_handle: NonNull<CSSM_DL_DB_HANDLE>,
837 ) -> OSStatus;
838}
839
840extern "C-unwind" {
841 #[cfg(all(
842 feature = "SecAsn1Types",
843 feature = "SecBase",
844 feature = "cssmconfig",
845 feature = "cssmtype"
846 ))]
847 #[deprecated = "renamed to `SecKeychainItem::unique_record_id`"]
848 pub fn SecKeychainItemGetUniqueRecordID(
849 item_ref: &SecKeychainItem,
850 unique_record_id: NonNull<*const CSSM_DB_UNIQUE_RECORD>,
851 ) -> OSStatus;
852}
853
854extern "C-unwind" {
855 #[cfg(feature = "SecBase")]
856 #[deprecated = "renamed to `SecKeychainItem::copy_access`"]
857 pub fn SecKeychainItemCopyAccess(
858 item_ref: &SecKeychainItem,
859 access: NonNull<*mut SecAccess>,
860 ) -> OSStatus;
861}
862
863extern "C-unwind" {
864 #[cfg(feature = "SecBase")]
865 #[deprecated = "renamed to `SecKeychainItem::set_access`"]
866 pub fn SecKeychainItemSetAccess(item_ref: &SecKeychainItem, access: &SecAccess) -> OSStatus;
867}