Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #1388: Cancel queued key sessions on cleanup #1396

Merged
merged 1 commit into from
Aug 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Client/U2FExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ class U2FExtensions: NSObject {
}
fido2RegHandles.remove(at: index)
fido2RegisterRequest.removeValue(forKey: handle)
YubiKitManager.shared.keySession.cancelCommands()
}

// FIDO2 Authentication
Expand Down Expand Up @@ -728,6 +729,7 @@ class U2FExtensions: NSObject {
}
fido2AuthHandles.remove(at: index)
fido2AuthRequest.removeValue(forKey: handle)
YubiKitManager.shared.keySession.cancelCommands()
}

// FIDO Registration
Expand Down Expand Up @@ -841,6 +843,7 @@ class U2FExtensions: NSObject {
fidoRegHandles.remove(at: index)
fidoRegisterRequest.removeValue(forKey: handle)
requestId.removeValue(forKey: handle)
YubiKitManager.shared.keySession.cancelCommands()
}

// FIDO Authetication
Expand Down Expand Up @@ -972,6 +975,7 @@ class U2FExtensions: NSObject {
fidoSignHandles.remove(at: index)
fidoSignRequests.removeValue(forKey: handle)
requestId.removeValue(forKey: handle)
YubiKitManager.shared.keySession.cancelCommands()
}

private func handleSessionStateChange() {
Expand Down