Fix YubiKey feature detection logics
This commit is contained in:
parent
0d1f06b16c
commit
3054e8e6f4
4 changed files with 3 additions and 6 deletions
|
|
@ -35,9 +35,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UNUserNotificationCenter.current().delegate = NotificationCenterDispatcher.shared
|
UNUserNotificationCenter.current().delegate = NotificationCenterDispatcher.shared
|
||||||
#if !targetEnvironment(simulator)
|
|
||||||
_ = passKit.YubiKeyConnection.shared
|
|
||||||
#endif
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
||||||
}
|
}
|
||||||
|
|
||||||
private func decryptThenShowPassword() {
|
private func decryptThenShowPassword() {
|
||||||
if Defaults.isYubiKeyEnabled {
|
if Defaults.isYubiKeyEnabled, YubiKitDeviceCapabilities.supportsISO7816NFCTags {
|
||||||
decryptThenShowPasswordYubiKey()
|
decryptThenShowPasswordYubiKey()
|
||||||
} else {
|
} else {
|
||||||
decryptThenShowPasswordLocalKey()
|
decryptThenShowPasswordLocalKey()
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if YubiKitDeviceCapabilities.supportsMFIAccessoryKey {
|
if YubiKitDeviceCapabilities.supportsISO7816NFCTags {
|
||||||
optionMenu.addAction(
|
optionMenu.addAction(
|
||||||
UIAlertAction(title: Defaults.isYubiKeyEnabled ? "✓ YubiKey" : "YubiKey", style: .default) { _ in
|
UIAlertAction(title: Defaults.isYubiKeyEnabled ? "✓ YubiKey" : "YubiKey", style: .default) { _ in
|
||||||
Defaults.isYubiKeyEnabled.toggle()
|
Defaults.isYubiKeyEnabled.toggle()
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ public class YubiKeyConnection: NSObject {
|
||||||
|
|
||||||
override init() {
|
override init() {
|
||||||
super.init()
|
super.init()
|
||||||
if YubiKitDeviceCapabilities.supportsMFIAccessoryKey {
|
if YubiKitDeviceCapabilities.supportsISO7816NFCTags {
|
||||||
YubiKitManager.shared.delegate = self
|
YubiKitManager.shared.delegate = self
|
||||||
YubiKitManager.shared.startAccessoryConnection()
|
YubiKitManager.shared.startAccessoryConnection()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue