Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] DeleteSlot / DeleteSlotConfiguration throws fault when not failing #182

Open
1 task done
virot opened this issue Dec 25, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@virot
Copy link

virot commented Dec 25, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When calling DeleteSlot(Slot slot), it removes the configuration, but also returns an exception.
System.InvalidOperationException: YubiKey Operation Failed [Warning, state of non-volatile memory is unchanged.] at Yubico.YubiKey.Otp.Operations.DeleteSlotConfiguration.ExecuteOperation() at Yubico.YubiKey.Otp.Operations.OperationBase1.Execute()
at Yubico.YubiKey.Otp.OtpSession.DeleteSlot(Slot slot)`

This is a bit similar to #48, but no COM code involved. I have reduced the issue to a small amount of code..
https://github.com/virot/YubiKeyTests/blob/main/OTP_Remove_throws/Program.cs

If I enable the SDK Debugging code I see the following:
info: Yubico.YubiKey.Oath.OathSession[0] Connecting to Otp info: Yubico.YubiKey.Oath.OathSession[0] Connected to Otp info: Yubico.Core.Devices.Hid.IHidConnection[0] Reading the OTP status. info: Yubico.Core.Devices.Hid.WindowsHidDevice[0] Updating last used for HID:1050:0407 Usage:Keyboard \\?\HID#VID_1050&PID_0407&MI_00#8&57ad29&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\KBD to 01:27:46.8005131 Configuration state of ShortPress: False warn: Yubico.YubiKey.Oath.OathSession[0] Exception caught when disposing Session: System.NotSupportedException, A YubiOTP APDU was received with instruction number 164. This instruction is not supported.

So it seems that it is doing what should be done, removing the configuration then it throws a fault.

Expected Behavior

It should remove the configuration and dont throw a fault.

Steps To Reproduce

  • Clone / download
  • Build
  • Run with a YubiKey (I have seen this complete on a FW 5.4.3, but then start to fail time after time.)

Version

1.12.1

Version

5.7.1

Anything else?

Works on 5.4.3
image

Fails on 5.7.1
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant