Skip to content

KeyEntity and Identity items should not use kSecReturnData #9

@macblazer

Description

@macblazer

According to Apple's documentation for returning keychain items:

"""
Don’t use kSecReturnData for cryptographic key or identity items, as the key material may not be extractable. Instead, call SecKeyCopyExternalRepresentation(::), and check the error parameter if it returns nil.
"""

Probably we can hide this implementation detail within Haversack when running a KeyQuery that has kSecReturnData in it.

Be sure to test with keys that are not extractable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions