pub struct SecACL { /* private fields */ }SecBase only.Expand description
Contains information about an access control list (ACL) entry.
See also Apple’s documentation
Implementations§
Source§impl SecACL
impl SecACL
Sourcepub unsafe fn create_from_simple_contents(
access: &SecAccess,
application_list: Option<&CFArray>,
description: &CFString,
prompt_selector: NonNull<CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR>,
new_acl: NonNull<*mut SecACL>,
) -> i32
👎Deprecated: CSSM is not supportedAvailable on crate features SecACL and cssmapple and cssmconfig only.
pub unsafe fn create_from_simple_contents( access: &SecAccess, application_list: Option<&CFArray>, description: &CFString, prompt_selector: NonNull<CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR>, new_acl: NonNull<*mut SecACL>, ) -> i32
SecACL and cssmapple and cssmconfig only.Creates a new access control list entry from the application list, description, and prompt selector provided and adds it to an item’s access.
Parameter access: An access reference.
Parameter applicationList: An array of SecTrustedApplication instances that will be allowed access without prompting.
Parameter description: The human readable name that will be used to refer to this item when the user is prompted.
Parameter promptSelector: A pointer to a CSSM prompt selector.
Parameter newAcl: A pointer to an access control list entry. On return, this points to the reference of the new access control list entry.
Returns: A result code. See “Security Error Codes” (SecBase.h).
This function is deprecated in 10.7 and later; use SecACLCreateWithSimpleContents instead.
§Safety
application_listgeneric must be of the correct type.prompt_selectormust be a valid pointer.new_aclmust be a valid pointer.
Sourcepub unsafe fn create_with_simple_contents(
access: &SecAccess,
application_list: Option<&CFArray>,
description: &CFString,
prompt_selector: SecKeychainPromptSelector,
new_acl: NonNull<*mut SecACL>,
) -> i32
👎Deprecated: SecKeychain is deprecatedAvailable on crate features SecACL and cssmconfig only.
pub unsafe fn create_with_simple_contents( access: &SecAccess, application_list: Option<&CFArray>, description: &CFString, prompt_selector: SecKeychainPromptSelector, new_acl: NonNull<*mut SecACL>, ) -> i32
SecACL and cssmconfig only.Creates a new access control list entry from the application list, description, and prompt selector provided and adds it to an item’s access.
Parameter access: An access reference.
Parameter applicationList: An array of SecTrustedApplication instances that will be allowed access without prompting.
Parameter description: The human readable name that will be used to refer to this item when the user is prompted.
Parameter promptSelector: A SecKeychainPromptSelector selector.
Parameter newAcl: A pointer to an access control list entry. On return, this points to the reference of the new access control list entry.
Returns: A result code. See “Security Error Codes” (SecBase.h).
§Safety
application_listgeneric must be of the correct type.new_aclmust be a valid pointer.
Sourcepub unsafe fn remove(&self) -> i32
👎Deprecated: SecKeychain is deprecatedAvailable on crate feature SecACL only.
pub unsafe fn remove(&self) -> i32
SecACL only.Removes the access control list entry specified.
Parameter aclRef: The reference to the access control list entry to remove.
Returns: A result code. See “Security Error Codes” (SecBase.h).
Sourcepub unsafe fn copy_simple_contents(
&self,
application_list: NonNull<*const CFArray>,
description: NonNull<*const CFString>,
prompt_selector: NonNull<CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR>,
) -> i32
👎Deprecated: CSSM is not supportedAvailable on crate features SecACL and cssmapple and cssmconfig only.
pub unsafe fn copy_simple_contents( &self, application_list: NonNull<*const CFArray>, description: NonNull<*const CFString>, prompt_selector: NonNull<CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR>, ) -> i32
SecACL and cssmapple and cssmconfig only.Returns the application list, description, and CSSM prompt selector for a given access control list entry.
Parameter acl: An access control list entry reference.
Parameter applicationList: On return, An array of SecTrustedApplication instances that will be allowed access without prompting, for the given access control list entry. The caller needs to call CFRelease on this array when it’s no longer needed.
Parameter description: On return, the human readable name that will be used to refer to this item when the user is prompted, for the given access control list entry. The caller needs to call CFRelease on this string when it’s no longer needed.
Parameter promptSelector: A pointer to a CSSM prompt selector. On return, this points to the CSSM prompt selector for the given access control list entry.
Returns: A result code. See “Security Error Codes” (SecBase.h).
This function is deprecated in 10.7 and later; use SecACLCopyContents instead.
§Safety
application_listmust be a valid pointer.descriptionmust be a valid pointer.prompt_selectormust be a valid pointer.
Sourcepub unsafe fn copy_contents(
&self,
application_list: NonNull<*const CFArray>,
description: NonNull<*const CFString>,
prompt_selector: NonNull<SecKeychainPromptSelector>,
) -> i32
👎Deprecated: SecKeychain is deprecatedAvailable on crate features SecACL and cssmconfig only.
pub unsafe fn copy_contents( &self, application_list: NonNull<*const CFArray>, description: NonNull<*const CFString>, prompt_selector: NonNull<SecKeychainPromptSelector>, ) -> i32
SecACL and cssmconfig only.Returns the application list, description, and prompt selector for a given access control list entry.
Parameter acl: An access control list entry reference.
Parameter applicationList: On return, An array of SecTrustedApplication instances that will be allowed access without prompting, for the given access control list entry. The caller needs to call CFRelease on this array when it’s no longer needed.
Parameter description: On return, the human readable name that will be used to refer to this item when the user is prompted, for the given access control list entry. The caller needs to call CFRelease on this string when it’s no longer needed.
Parameter promptSelector: A pointer to a SecKeychainPromptSelector. On return, this points to the SecKeychainPromptSelector for the given access control list entry.
Returns: A result code. See “Security Error Codes” (SecBase.h).
§Safety
application_listmust be a valid pointer.descriptionmust be a valid pointer.prompt_selectormust be a valid pointer.
Sourcepub unsafe fn set_simple_contents(
&self,
application_list: Option<&CFArray>,
description: &CFString,
prompt_selector: NonNull<CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR>,
) -> i32
👎Deprecated: CSSM is not supportedAvailable on crate features SecACL and cssmapple and cssmconfig only.
pub unsafe fn set_simple_contents( &self, application_list: Option<&CFArray>, description: &CFString, prompt_selector: NonNull<CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR>, ) -> i32
SecACL and cssmapple and cssmconfig only.Sets the application list, description, and CSSM prompt selector for a given access control list entry.
Parameter acl: A reference to the access control list entry to edit.
Parameter applicationList: An application list reference.
Parameter description: The human readable name that will be used to refer to this item when the user is prompted.
Parameter promptSelector: A pointer to a CSSM prompt selector.
Returns: A result code. See “Security Error Codes” (SecBase.h).
This function is deprecated in 10.7 and later; use SecACLSetContents instead.
§Safety
application_listgeneric must be of the correct type.prompt_selectormust be a valid pointer.
Sourcepub unsafe fn set_contents(
&self,
application_list: Option<&CFArray>,
description: &CFString,
prompt_selector: SecKeychainPromptSelector,
) -> i32
👎Deprecated: SecKeychain is deprecatedAvailable on crate features SecACL and cssmconfig only.
pub unsafe fn set_contents( &self, application_list: Option<&CFArray>, description: &CFString, prompt_selector: SecKeychainPromptSelector, ) -> i32
SecACL and cssmconfig only.Sets the application list, description, and prompt selector for a given access control list entry.
Parameter acl: A reference to the access control list entry to edit.
Parameter applicationList: An application list reference.
Parameter description: The human readable name that will be used to refer to this item when the user is prompted.
Parameter promptSelector: A SecKeychainPromptSelector selector.
Returns: A result code. See “Security Error Codes” (SecBase.h).
§Safety
application_list generic must be of the correct type.
👎Deprecated: CSSM is not supportedAvailable on crate features SecACL and cssmconfig and cssmtype only.
SecACL and cssmconfig and cssmtype only.Retrieve the CSSM authorization tags of a given access control list entry.
Parameter acl: An access control list entry reference.
Parameter tags: On return, this points to the first item in an array of CSSM authorization tags.
Parameter tagCount: On return, this points to the number of tags in the CSSM authorization tag array.
Returns: A result code. See “Security Error Codes” (SecBase.h).
This function is deprecated in 10.7 and later; use SecACLCopyAuthorizations instead.
§Safety
tagsmust be a valid pointer.tag_countmust be a valid pointer.
👎Deprecated: SecKeychain is deprecatedAvailable on crate feature SecACL only.
SecACL only.Retrieve the authorization tags of a given access control list entry.
Parameter acl: An access control list entry reference.
Returns: On return, a CFArrayRef of the authorizations for this ACL.
👎Deprecated: CSSM is not supportedAvailable on crate features SecACL and cssmconfig and cssmtype only.
SecACL and cssmconfig and cssmtype only.Sets the CSSM authorization tags of a given access control list entry.
Parameter acl: An access control list entry reference.
Parameter tags: A pointer to the first item in an array of CSSM authorization tags.
Parameter tagCount: The number of tags in the CSSM authorization tag array.
Returns: A result code. See “Security Error Codes” (SecBase.h).
This function is deprecated in 10.7 and later; use SecACLUpdateAuthorizations instead.
§Safety
tags must be a valid pointer.
👎Deprecated: SecKeychain is deprecatedAvailable on crate feature SecACL only.
SecACL only.Sets the authorization tags of a given access control list entry.
Parameter acl: An access control list entry reference.
Parameter authorizations: A pointer to an array of authorization tags.
Returns: A result code. See “Security Error Codes” (SecBase.h).
§Safety
authorizations generic must be of the correct type.
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 ConcreteType for SecACL
Available on crate feature SecACL only.
impl ConcreteType for SecACL
SecACL only.Source§impl RefEncode for SecACL
impl RefEncode for SecACL
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for SecACL
impl Type for SecACL
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