Function SecKeyGetCredentials

Source
pub unsafe extern "C-unwind" fn SecKeyGetCredentials(
    key_ref: &SecKey,
    operation: CSSM_ACL_AUTHORIZATION_TAG,
    credential_type: SecCredentialType,
    out_credentials: NonNull<*const CSSM_ACCESS_CREDENTIALS>,
) -> i32
👎Deprecated
Available on crate features SecAsn1Types and SecBase and cssmconfig and cssmtype and SecKey only.
Expand description

For a given key, return a pointer to a CSSM_ACCESS_CREDENTIALS structure which will allow the key to be used.

Parameter keyRef: The key for which a credential is requested.

Parameter operation: The type of operation to be performed with this key. See “Authorization tag type” for defined operations (cssmtype.h).

Parameter credentialType: The type of credential requested.

Parameter outCredentials: On return, a pointer to a CSSM_ACCESS_CREDENTIALS structure. This pointer remains valid until the key reference is released. The caller should not attempt to modify or free this data.

Returns: A result code. See “Security Error Codes” (SecBase.h).