Let pinentry or gnupg handle bad smartcard pins
Open, NormalPublic

Assigned To
None
Authored By
timegrid
Jul 15 2026, 11:24 AM

Description

Currently, if a smartcard user tries to e.g. encrypt/sign a file and enters a bad PIN, the pinentry process is cancelled and the error displayed in Kleopatra:

To be able to retry, the whole encrypt/sign process has to be started again (choosing the file, etc), which is tedious.
Pinentry should handle the retries on bad PIN instead, which would also meet the user's expectation.


Split from T6425: improve pinentry behavior and texts in smart card context

Details

Version
gpg4win-5.1.0-beta658 @ win11

Event Timeline

timegrid triaged this task as Normal priority.Jul 15 2026, 11:24 AM
timegrid created this task.
timegrid created this object with edit policy "Contributor (Project)".

I don't think that Kleopatra can influence that gpg/gpgsm/gpg-agent shows a second pinentry if on the first try a wrong passphrase was entered. Therefore I think the "retry" has to be implemented in GnuPG.

Independently of this, explicit canceling of the pinentry shouldn't abort the sign/encrypt operation in Kleopatra.

So, this ticket is actually two.

ikloecker raised the priority of this task from Normal to Needs Triage.Wed, Sep 2, 9:33 AM
ikloecker edited projects, added gnupg26; removed gpd5x, kleopatra.

I have created T8433: Kleopatra: Allow easy retry of sign/encrypt files operation if password request failed or was aborted for improving Kleopatra. This leaves the problem that entering a bad smartcard PIN (or password) aborts a sign operation without repeating the PIN/password request. I think this needs to be addressed in GnuPG. -> I re-tag this ticket and request another triage.

I guess it's fine to decide not to change GnuPG. Once Kleopatra allows for an easy retry of a sign/encrypt operation a change in GnuPG will be unnecessary for users of Kleopatra.

ikloecker renamed this task from Kleopatra: Let pinentry handle bad smartcard pins to Let pinentry or gnupg handle bad smartcard pins.Wed, Sep 2, 9:34 AM
gniibe mentioned this in Unknown Object (Maniphest Task).Mon, Sep 7, 3:53 AM
werner triaged this task as Normal priority.Mon, Sep 7, 4:53 PM