#[repr(C)]pub struct SecIdentitySearch { /* private fields */ }
SecIdentitySearch
only.Expand description
Contains information about an identity search.
See also Apple’s documentation
Implementations§
Source§impl SecIdentitySearch
impl SecIdentitySearch
Sourcepub unsafe fn create(
keychain_or_array: Option<&CFType>,
key_usage: CSSM_KEYUSE,
search_ref: *mut *mut SecIdentitySearch,
) -> i32
👎DeprecatedAvailable on crate features cssmconfig
and cssmtype
only.
pub unsafe fn create( keychain_or_array: Option<&CFType>, key_usage: CSSM_KEYUSE, search_ref: *mut *mut SecIdentitySearch, ) -> i32
cssmconfig
and cssmtype
only.Creates a search reference for finding identities.
Parameter keychainOrArray
: An reference to an array of keychains to search, a single keychain, or NULL to search the user’s default keychain search list.
Parameter keyUsage
: A CSSM_KEYUSE value, as defined in cssmtype.h. This value narrows the search to return only those identities which match the specified key usage. Pass a value of 0 to ignore key usage and return all available identities. Note that passing CSSM_KEYUSE_ANY limits the results to only those identities that can be used for every operation.
Parameter searchRef
: On return, an identity search reference. You must release the identity search reference by calling the CFRelease function.
Returns: A result code. See “Security Error Codes” (SecBase.h).
You can set values for key usage, and one or more keychains, to control the search for identities. You can use the returned search reference to obtain the remaining identities in subsequent calls to the SecIentitySearchCopyNext function. You must release the identity search reference by calling the CFRelease function. This function is deprecated in Mac OS X 10.7 and later; to find identities which match a given key usage or other attributes, please use the SecItemCopyMatching API (see SecItem.h).
Sourcepub unsafe fn copy_next(
self: &SecIdentitySearch,
identity: *mut *mut SecIdentity,
) -> i32
👎DeprecatedAvailable on crate feature SecBase
only.
pub unsafe fn copy_next( self: &SecIdentitySearch, identity: *mut *mut SecIdentity, ) -> i32
SecBase
only.Finds the next identity matching the given search criteria, as previously specified by a call to SecIdentitySearchCreate or SecIdentitySearchCreateWithAttributes.
Parameter searchRef
: A reference to the current identity search. You create the identity search reference by calling either SecIdentitySearchCreate or SecIdentitySearchCreateWithAttributes.
Parameter identity
: On return, an identity reference for the next found identity, if any. You must call the CFRelease function when finished with the identity reference.
Returns: A result code. When there are no more identities found that match the search criteria, errSecItemNotFound is returned. See “Security Error Codes” (SecBase.h).
This function is deprecated in Mac OS X 10.7 and later; to find identities which match specified attributes, please use the SecItemCopyMatching API (see SecItem.h).
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Available on crate feature SecCustomTransform
only.
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
SecCustomTransform
only.Attempt to downcast the type to that of type T
.
This is the reference-variant. Use CFRetained::downcast
if you
want to convert a retained type. See also ConcreteType
for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
Available on crate feature SecCustomTransform
only.
pub fn retain_count(&self) -> usize
SecCustomTransform
only.Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumber
s, small CFString
s etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX
in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for SecIdentitySearch
impl AsRef<AnyObject> for SecIdentitySearch
Source§impl AsRef<CFType> for SecIdentitySearch
impl AsRef<CFType> for SecIdentitySearch
Source§impl AsRef<SecIdentitySearch> for SecIdentitySearch
impl AsRef<SecIdentitySearch> for SecIdentitySearch
Source§impl Borrow<AnyObject> for SecIdentitySearch
impl Borrow<AnyObject> for SecIdentitySearch
Source§impl Borrow<CFType> for SecIdentitySearch
impl Borrow<CFType> for SecIdentitySearch
Source§impl ConcreteType for SecIdentitySearch
impl ConcreteType for SecIdentitySearch
Source§impl Debug for SecIdentitySearch
impl Debug for SecIdentitySearch
Source§impl Deref for SecIdentitySearch
impl Deref for SecIdentitySearch
Source§impl Hash for SecIdentitySearch
impl Hash for SecIdentitySearch
Source§impl Message for SecIdentitySearch
impl Message for SecIdentitySearch
Source§impl PartialEq for SecIdentitySearch
impl PartialEq for SecIdentitySearch
Source§impl RefEncode for SecIdentitySearch
impl RefEncode for SecIdentitySearch
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for SecIdentitySearch
impl Type for SecIdentitySearch
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation
crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation
crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation
crate. Read more