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

Commit

Permalink
Fix #1388: Cancel queued key sessions on cleanup (#1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
jumde authored and jhreis committed Aug 20, 2019
1 parent f44d41e commit c2f744f
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit c2f744f

Please # to comment.