apple_security_sys/
keychain_item.rs1use crate::base::{SecKeychainAttributeList, SecKeychainItemRef};
2use core_foundation_sys::base::{CFTypeID, CFTypeRef, OSStatus};
3use core_foundation_sys::dictionary::CFDictionaryRef;
4use std::os::raw::c_void;
5
6extern "C" {
7
8 pub fn SecKeychainItemGetTypeID() -> CFTypeID;
10
11 pub fn SecItemAdd(attributes: CFDictionaryRef, result: *mut CFTypeRef) -> OSStatus;
13
14 pub fn SecItemCopyMatching(query: CFDictionaryRef, result: *mut CFTypeRef) -> OSStatus;
16
17 pub fn SecItemUpdate(query: CFDictionaryRef, attributesToUpdate: CFDictionaryRef) -> OSStatus;
19
20 pub fn SecItemDelete(query: CFDictionaryRef) -> OSStatus;
22
23 pub fn SecKeychainItemModifyAttributesAndData(
25 itemRef: SecKeychainItemRef,
26 attrList: *const SecKeychainAttributeList,
27 length: u32,
28 data: *const c_void,
29 ) -> OSStatus;
30
31 pub fn SecKeychainItemFreeContent(
32 attrList: *mut SecKeychainAttributeList,
33 data: *mut c_void,
34 ) -> OSStatus;
35
36 pub fn SecKeychainItemDelete(itemRef: SecKeychainItemRef) -> OSStatus;
37}