mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-18 14:49:22 +00:00
Added a flag to support unlocking the database with the apple watch as well as TouchID
This commit is contained in:
@@ -175,9 +175,13 @@ static NSMutableDictionary* touchIDSecuredPasswords;
|
||||
NSData* privateKeyTag = [@"com.hicknhacksoftware.macpass.privatekey" dataUsingEncoding:NSUTF8StringEncoding];
|
||||
SecAccessControlRef access = NULL;
|
||||
if (@available(macOS 10.13.4, *)) {
|
||||
SecAccessControlCreateFlags flags = kSecAccessControlBiometryCurrentSet;
|
||||
if (@available(macOS 10.15, *)) {
|
||||
flags |= kSecAccessControlWatch | kSecAccessControlOr;
|
||||
}
|
||||
access = SecAccessControlCreateWithFlags(kCFAllocatorDefault,
|
||||
kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
|
||||
kSecAccessControlBiometryCurrentSet,
|
||||
flags,
|
||||
&error);
|
||||
if(access == NULL) {
|
||||
NSError *err = CFBridgingRelease(error);
|
||||
|
||||
Reference in New Issue
Block a user