Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
switch ACL too .touchIDAny
Browse files Browse the repository at this point in the history
  • Loading branch information
btoews committed Aug 22, 2017
1 parent 48686c0 commit e6121ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SoftU2FTool/Keychain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class Keychain {

if inSEP {
if #available(OSX 10.12.1, *) {
acl = SecAccessControlCreateWithFlags(nil, kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly, [.privateKeyUsage, .touchIDCurrentSet], &err)
acl = SecAccessControlCreateWithFlags(nil, kSecAttrAccessibleWhenUnlocked, [.privateKeyUsage, .touchIDAny], &err)
} else {
print("Cannot generate keys in SEP on macOS<10.12.1")
return nil
Expand All @@ -231,7 +231,8 @@ class Keychain {
(kSecPrivateKeyAttrs, makeCFDictionary(
(kSecAttrAccessControl, acl!),
(kSecAttrLabel, attrLabel),
(kSecAttrIsPermanent, kCFBooleanTrue)
(kSecAttrIsPermanent, kCFBooleanTrue),
(kSecAttrSynchronizable, kCFBooleanFalse)
))
)
} else {
Expand Down

0 comments on commit e6121ad

Please sign in to comment.