Skip to content

kSecAttrAccessControl Ignored by SecItemAdd #186

@Zack-Xb

Description

@Zack-Xb

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(),
            );
        }
    ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions