Skip to content

Commit

Permalink
Added a flag to support unlocking the database with the apple watch a…
Browse files Browse the repository at this point in the history
…s well as TouchID
  • Loading branch information
Julius Zint committed Feb 14, 2021
1 parent 8255893 commit 484b5e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MacPass/MPPasswordInputController.m
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,13 @@ - (void) _touchIdCreateAndAddRSAKeyPair {
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);
Expand Down

0 comments on commit 484b5e4

Please sign in to comment.