Restrict key types smart card will load

This commit is contained in:
Max Goedjen 2020-03-08 21:16:43 -07:00
parent a0bd55d1bf
commit 6c012e9d24
No known key found for this signature in database
GPG Key ID: E58C21DD77B9B8E8

View File

@ -90,6 +90,8 @@ extension SmartCard.Store {
guard let tokenID = tokenID else { return } guard let tokenID = tokenID else { return }
let attributes = [ let attributes = [
kSecClass: kSecClassKey, kSecClass: kSecClassKey,
kSecAttrKeyType: kSecAttrKeyTypeEC,
kSecAttrKeySizeInBits: 256,
kSecAttrTokenID: tokenID, kSecAttrTokenID: tokenID,
kSecReturnRef: true, kSecReturnRef: true,
kSecMatchLimit: kSecMatchLimitAll, kSecMatchLimit: kSecMatchLimitAll,