Page MenuHome GnuPG

Improve error message if no reset code (PUK) is set
Open, NormalPublic


If I take a smart card where no PUK (PW2) is set and execute the following, the info returned is correct:

gpg --card-edit 
gpg: OpenPGP Karte Nr. D276000124010304000500009D400000 erkannt
gpg: Der Rückstellcode ist nicht vorhanden

But if I click "Unblock Card" in Kleopatra, I get "wrong PIN":

Kleopatra is not at fault, Ingo said:

The part after the colon is the error code GPG_ERR_BAD_PIN supplied by the backend converted to text.
GPG_ERR_BAD_PUK does not exist in gpg-error.

Event Timeline

gniibe added a subscriber: gniibe.

Having GPG_ERR_BAD_PUK makes sense. So, I added a tag for gpg-error.

Should we also differentiate between wrong PUK and no PUK set?

FWIW, some cards don't have PUKs but two PINs which are able to unblock reciprocal.

werner moved this task from Backlog to WiP on the gnupg22 board.

Not easy do decide whether something is a PIN or a PUK and we will need to check a lot of places. So, not now.