From 4b15efe9231f2946eaef2a042ce315a6c9e7066a Mon Sep 17 00:00:00 2001 From: Ryan Fowler Date: Wed, 12 Jul 2023 06:02:59 -0700 Subject: [PATCH] Add kSecAttrAccessible value constants --- security-framework-sys/src/access_control.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/security-framework-sys/src/access_control.rs b/security-framework-sys/src/access_control.rs index 07c21e4a..9089ab64 100644 --- a/security-framework-sys/src/access_control.rs +++ b/security-framework-sys/src/access_control.rs @@ -1,6 +1,7 @@ use core_foundation_sys::base::CFOptionFlags; use core_foundation_sys::base::{CFAllocatorRef, CFTypeID, CFTypeRef}; use core_foundation_sys::error::CFErrorRef; +use core_foundation_sys::string::CFStringRef; use crate::base::SecAccessControlRef; @@ -23,6 +24,15 @@ mod access_control_flags { pub use access_control_flags::*; +extern "C" { + pub static kSecAttrAccessibleWhenUnlocked: CFStringRef; + pub static kSecAttrAccessibleAfterFirstUnlock: CFStringRef; + pub static kSecAttrAccessibleAlways: CFStringRef; + pub static kSecAttrAccessibleWhenUnlockedThisDeviceOnly: CFStringRef; + pub static kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly: CFStringRef; + pub static kSecAttrAccessibleAlwaysThisDeviceOnly: CFStringRef; +} + extern "C" { pub fn SecAccessControlGetTypeID() -> CFTypeID;