rust-security-framework icon indicating copy to clipboard operation
rust-security-framework copied to clipboard

kSecAttrAccessControl Ignored by SecItemAdd

Open Zack-Xb opened this issue 1 year ago • 0 comments

Hi, I have been trying to add access control to the function to_dictionary for struct ItemAddOptions to protect keychain entries with biometry and application password. I have also added some options in the search function, but they seem to have no effect. Note I have forked the repository and I am using a locally defined path so these changes are being used.

Has anyone gotten access control to work to protect their keychain entries?

For example the above is where I add the option in to_dictionary line 599 item.rs.

 if let Some(access_control) = &self.access_control {
            dict.add(
                &unsafe { kSecAttrAccessControl }.to_void(),
                &access_control.to_void(),
            );
        }
    ```

Zack-Xb avatar Jul 08 '23 20:07 Zack-Xb