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

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,