I am creating a private/public key pair using the SecKeyGeneratePair method.
To be able to do that I create a parameter dictionary with kSecPrivateKeyAttrs and kSecPublicKeyAttrs.
In the kSecPrivateKeyAttrs and kSecPublicKeyAttrs (both a dictionary) I add kSecAttrAccessControl to set the protection level of the key (eg. kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly).
var publicKey, privateKey: SecKey?
let status = SecKeyGeneratePair(params as CFDictionary, &publicKey, &privateKey)
The generation of the keys succeeds but it seams that adding the kSecAttrAccessControl only affects the private key.
Is this documented somewhere?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…