From 484b5e4acd7b334565b3d0f08ad62ba33e95d5da Mon Sep 17 00:00:00 2001 From: Julius Zint Date: Tue, 22 Sep 2020 21:14:09 +0200 Subject: [PATCH] Added a flag to support unlocking the database with the apple watch as well as TouchID --- MacPass/MPPasswordInputController.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MacPass/MPPasswordInputController.m b/MacPass/MPPasswordInputController.m index ffe12b9e..6fc90b59 100644 --- a/MacPass/MPPasswordInputController.m +++ b/MacPass/MPPasswordInputController.m @@ -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);