pub struct SecPolicySearch { /* private fields */ }SecPolicySearch only.Expand description
A reference to an opaque policy search structure.
See also Apple’s documentation
Implementations§
Source§impl SecPolicySearch
impl SecPolicySearch
Sourcepub unsafe fn create(
cert_type: CSSM_CERT_TYPE,
policy_oid: NonNull<SecAsn1Oid>,
value: *const SecAsn1Item,
search_ref: NonNull<*mut SecPolicySearch>,
) -> i32
👎DeprecatedAvailable on crate features SecAsn1Types and cssmconfig and cssmtype only.
pub unsafe fn create( cert_type: CSSM_CERT_TYPE, policy_oid: NonNull<SecAsn1Oid>, value: *const SecAsn1Item, search_ref: NonNull<*mut SecPolicySearch>, ) -> i32
SecAsn1Types and cssmconfig and cssmtype only.Creates a search reference for finding a policy by specifying its object identifier.
Parameter certType: The type of certificates a policy uses.
Parameter policyOID: A pointer to a BER-encoded policy object identifier that uniquely specifies the policy.
Parameter value: Unused. Pass NULL for this value. Use SecPolicySetValue to set per policy data.
Parameter searchRef: On return, a pointer to a policy search reference. The policy search reference is used for subsequent calls to the SecCopyNextPolicy function to obtain the remaining trust policies. You are responsible for releasing the search reference by calling the CFRelease function when finished with it.
Returns: A result code. See “Security Error Codes” (SecBase.h).
This function is deprecated in 10.7. To create a SecPolicyRef, use one of the SecPolicyCreate functions in SecPolicy.h.
§Safety
policy_oidmust be a valid pointer.valuemust be a valid pointer or null.search_refmust be a valid pointer.
Sourcepub unsafe fn copy_next(&self, policy_ref: NonNull<*mut SecPolicy>) -> i32
👎DeprecatedAvailable on crate feature SecBase only.
pub unsafe fn copy_next(&self, policy_ref: NonNull<*mut SecPolicy>) -> i32
SecBase only.Finds the next policy matching the given search criteria
Parameter searchRef: A reference to the current policy search criteria. You create the policy search reference by a calling the SecPolicySearchCreate function. You are responsible for releasing the policy by calling the CFRelease function when finished with it.
Parameter policyRef: On return, a pointer to a policy reference.
Returns: A result code. When there are no more policies that match the parameters specified to SecPolicySearchCreate, errSecPolicyNotFound is returned. See “Security Error Codes” (SecBase.h).
This function is deprecated in 10.7. To create a SecPolicyRef, use one of the SecPolicyCreate functions in SecPolicy.h.
§Safety
policy_ref must be a valid pointer.
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 CFNumbers, small CFStrings 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 SecPolicySearch
impl AsRef<AnyObject> for SecPolicySearch
Source§impl AsRef<CFType> for SecPolicySearch
impl AsRef<CFType> for SecPolicySearch
Source§impl AsRef<SecPolicySearch> for SecPolicySearch
impl AsRef<SecPolicySearch> for SecPolicySearch
Source§impl Borrow<AnyObject> for SecPolicySearch
impl Borrow<AnyObject> for SecPolicySearch
Source§impl Borrow<CFType> for SecPolicySearch
impl Borrow<CFType> for SecPolicySearch
Source§impl ConcreteType for SecPolicySearch
impl ConcreteType for SecPolicySearch
Source§impl Debug for SecPolicySearch
impl Debug for SecPolicySearch
Source§impl Deref for SecPolicySearch
impl Deref for SecPolicySearch
Source§impl Hash for SecPolicySearch
impl Hash for SecPolicySearch
Source§impl Message for SecPolicySearch
impl Message for SecPolicySearch
Source§impl PartialEq for SecPolicySearch
impl PartialEq for SecPolicySearch
Source§impl RefEncode for SecPolicySearch
impl RefEncode for SecPolicySearch
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for SecPolicySearch
impl Type for SecPolicySearch
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