Page MenuHome GnuPG

Kleopatra: "Cancel" in the password dialog of "Print secret key" has no effect
Testing, LowPublic

Description

If I hit "Cancel" in the pinentry window the behavior is the same as hitting "OK" -> the second pinentry window comes up.
After hitting "Cancel" again an error window comes up:


Which is not the same as the one when hitting "OK" on empty passwords:

The message seems to depend on the input given to the first pinentry window.

I would expect that the second pinentry window would be skipped when choosing "Cancel".
Additionally I'd expect a more userfriendly error messages in both cases.

Event Timeline

ikloecker added a subscriber: ikloecker.

The command needs to be ported away from running gpg --export-secret-key via QProcess to using QGpgME::ExportJob. I'll give this a low priority.

TobiasFella moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
TobiasFella changed the task status from Open to Testing.Aug 8 2024, 10:55 AM
ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Oct 1 2024, 3:55 PM
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Tue, Nov 5, 9:41 PM

This has also been reported at https://bugs.kde.org/show_bug.cgi?id=477798 (although there a crash occurs). Porting the command to gpgme didn't help, but the remaining problems are in gpg and/or gpgme.

gpg doesn't properly report the cancelation via a status log and therefore gpgme has no idea that the operation was canceled. -> subtask T7373: gpg --export-secret-keys exits with General error if the password prompt was canceled

And the General error that gpg emits via a failure status log seems to ignored by gpgme so that the error handling in Kleopatra cannot handle this error. -> subtask T7374: gpgme: The export operation seems to ignore failures reported by gpg

ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Wed, Nov 6, 2:57 PM

Canceling the password prompt is now handled correctly, i.e. the operation is aborted without further feedback.

Backported for VSD 3.3

ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Fri, Nov 8, 2:09 PM