You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Please explain what you did when the bug appeared, and if and how you have been
able to reproduce it.]
$ ykman piv access change-pin
Enter the current PIN: 123456
Enter the new PIN: 12345678
Repeat for confirmation: 12345678
Expected result
[What did you expect to happen when you did the above?]
Change PIN without errors.
Actual results and logs
[What actually happened?]
ERROR: An unexpected error has occuredTraceback (most recent call last):
File "/home/bestiak/.local/lib/python3.11/site-packages/ykman/_cli/main.py", line 364, in main
cli(obj={})
File "/usr/lib/python3.11/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/ykman/_cli/piv.py", line 310, in change_pin
pivman_change_pin(session, pin, new_pin)
File "/home/bestiak/.local/lib/python3.11/site-packages/ykman/piv.py", line 324, in pivman_change_pin
session.change_pin(old_pin, new_pin)
File "/home/bestiak/.local/lib/python3.11/site-packages/yubikit/piv.py", line 582, in change_pin
self._change_reference(INS_CHANGE_REFERENCE, PIN_P2, old_pin, new_pin)
File "/home/bestiak/.local/lib/python3.11/site-packages/yubikit/piv.py", line 826, in _change_reference
self.protocol.send_apdu(
File "/home/bestiak/.local/lib/python3.11/site-packages/yubikit/core/smartcard.py", line 198, in send_apdu
response, sw = self.connection.send_and_receive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/ykman/pcsc/init.py", line 122, in send_and_receive
data, sw1, sw2 = self.connection.transmit(list(apdu))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/smartcard/CardConnectionDecorator.py", line 86, in transmit
return self.component.transmit(bytes, protocol)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/smartcard/CardConnection.py", line 159, in transmit
data, sw1, sw2 = self.doTransmit(bytes, protocol)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/smartcard/pcsc/PCSCCardConnection.py", line 247, in doTransmit
raise CardConnectionException(
smartcard.Exceptions.CardConnectionException: Failed to transmit with protocol T1. Card was reset.
Other info
[Anything else you would like to add?]
The error does not happen when passing the PIN and new PIN values as options.
Error when changing the PIV PIN interactively.
Steps to reproduce
[Please explain what you did when the bug appeared, and if and how you have been
able to reproduce it.]
$ ykman piv access change-pin
Enter the current PIN: 123456
Enter the new PIN: 12345678
Repeat for confirmation: 12345678
Expected result
[What did you expect to happen when you did the above?]
Change PIN without errors.
Actual results and logs
[What actually happened?]
ERROR: An unexpected error has occuredTraceback (most recent call last):
File "/home/bestiak/.local/lib/python3.11/site-packages/ykman/_cli/main.py", line 364, in main
cli(obj={})
File "/usr/lib/python3.11/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/ykman/_cli/piv.py", line 310, in change_pin
pivman_change_pin(session, pin, new_pin)
File "/home/bestiak/.local/lib/python3.11/site-packages/ykman/piv.py", line 324, in pivman_change_pin
session.change_pin(old_pin, new_pin)
File "/home/bestiak/.local/lib/python3.11/site-packages/yubikit/piv.py", line 582, in change_pin
self._change_reference(INS_CHANGE_REFERENCE, PIN_P2, old_pin, new_pin)
File "/home/bestiak/.local/lib/python3.11/site-packages/yubikit/piv.py", line 826, in _change_reference
self.protocol.send_apdu(
File "/home/bestiak/.local/lib/python3.11/site-packages/yubikit/core/smartcard.py", line 198, in send_apdu
response, sw = self.connection.send_and_receive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/ykman/pcsc/init.py", line 122, in send_and_receive
data, sw1, sw2 = self.connection.transmit(list(apdu))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/smartcard/CardConnectionDecorator.py", line 86, in transmit
return self.component.transmit(bytes, protocol)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/smartcard/CardConnection.py", line 159, in transmit
data, sw1, sw2 = self.doTransmit(bytes, protocol)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bestiak/.local/lib/python3.11/site-packages/smartcard/pcsc/PCSCCardConnection.py", line 247, in doTransmit
raise CardConnectionException(
smartcard.Exceptions.CardConnectionException: Failed to transmit with protocol T1. Card was reset.
Other info
[Anything else you would like to add?]
The error does not happen when passing the PIN and new PIN values as options.
$ ykman piv access change-pin --pin 123456 --new-pin 12345678
New PIN set.
The text was updated successfully, but these errors were encountered: