1 #[cfg(target_os = "macos")] 2 use core_foundation_sys::array::CFArrayRef; 3 use core_foundation_sys::base::{CFAllocatorRef, CFTypeID, OSStatus}; 4 use core_foundation_sys::data::CFDataRef; 5 #[cfg(target_os = "macos")] 6 use core_foundation_sys::dictionary::CFDictionaryRef; 7 #[cfg(target_os = "macos")] 8 use core_foundation_sys::error::CFErrorRef; 9 use core_foundation_sys::string::CFStringRef; 10 11 use crate::base::SecCertificateRef; 12 #[cfg(target_os = "macos")] 13 use crate::base::SecKeyRef; 14 15 extern "C" { 16 #[cfg(target_os = "macos")] 17 pub static kSecPropertyKeyType: CFStringRef; 18 #[cfg(target_os = "macos")] 19 pub static kSecPropertyKeyLabel: CFStringRef; 20 #[cfg(target_os = "macos")] 21 pub static kSecPropertyKeyLocalizedLabel: CFStringRef; 22 #[cfg(target_os = "macos")] 23 pub static kSecPropertyKeyValue: CFStringRef; 24 25 #[cfg(target_os = "macos")] 26 pub static kSecPropertyTypeWarning: CFStringRef; 27 #[cfg(target_os = "macos")] 28 pub static kSecPropertyTypeSuccess: CFStringRef; 29 #[cfg(target_os = "macos")] 30 pub static kSecPropertyTypeSection: CFStringRef; 31 #[cfg(target_os = "macos")] 32 pub static kSecPropertyTypeData: CFStringRef; 33 #[cfg(target_os = "macos")] 34 pub static kSecPropertyTypeString: CFStringRef; 35 #[cfg(target_os = "macos")] 36 pub static kSecPropertyTypeURL: CFStringRef; 37 #[cfg(target_os = "macos")] 38 pub static kSecPropertyTypeDate: CFStringRef; 39 SecCertificateGetTypeID() -> CFTypeID40 pub fn SecCertificateGetTypeID() -> CFTypeID; SecCertificateCreateWithData( allocator: CFAllocatorRef, data: CFDataRef, ) -> SecCertificateRef41 pub fn SecCertificateCreateWithData( 42 allocator: CFAllocatorRef, 43 data: CFDataRef, 44 ) -> SecCertificateRef; SecCertificateCopyData(certificate: SecCertificateRef) -> CFDataRef45 pub fn SecCertificateCopyData(certificate: SecCertificateRef) -> CFDataRef; SecCertificateCopySubjectSummary(certificate: SecCertificateRef) -> CFStringRef46 pub fn SecCertificateCopySubjectSummary(certificate: SecCertificateRef) -> CFStringRef; SecCertificateCopyCommonName( certificate: SecCertificateRef, common_name: *mut CFStringRef, ) -> OSStatus47 pub fn SecCertificateCopyCommonName( 48 certificate: SecCertificateRef, 49 common_name: *mut CFStringRef, 50 ) -> OSStatus; 51 #[cfg(target_os = "macos")] SecCertificateCopyPublicKey( certificate: SecCertificateRef, key: *mut SecKeyRef, ) -> OSStatus52 pub fn SecCertificateCopyPublicKey( 53 certificate: SecCertificateRef, 54 key: *mut SecKeyRef, 55 ) -> OSStatus; 56 #[cfg(target_os = "macos")] SecCertificateCopyValues( certificate: SecCertificateRef, keys: CFArrayRef, error: *mut CFErrorRef, ) -> CFDictionaryRef57 pub fn SecCertificateCopyValues( 58 certificate: SecCertificateRef, 59 keys: CFArrayRef, 60 error: *mut CFErrorRef, 61 ) -> CFDictionaryRef; 62 } 63