Bug 365791

Summary: Error when deleting private key with GnuPG 2.1
Product: [Applications] kgpg Reporter: Andrius Štikonas <andrius>
Component: generalAssignee: Rolf Eike Beer <kde>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 16.08
Sentry Crash Report:

Description Andrius Štikonas 2016-07-17 18:18:12 UTC
Error status (TS_MSG_SEQUENCE) is returned when deleting private key.

Compared to GnuPG 2.0, the new version requires additional new line input before printing [GNUPG:] GOT_IT


Reproducible: Always




gpg --delete-secret-and-public-key --status-fd=1 --command-fd=0 B47458AF3DF75D87
gpg (GnuPG) 2.1.12; Copyright (C) 2016 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


sec  rsa2048/3DF75D87 2016-07-17 testtest <test@test.com>

[GNUPG:] GET_BOOL delete_key.secret.okay
y                             
[GNUPG:] GOT_IT
[GNUPG:] PINENTRY_LAUNCHED 26194
[GNUPG:] PINENTRY_LAUNCHED 26199
pub  rsa2048/3DF75D87 2016-07-17 testtest <test@test.com>

[GNUPG:] GET_BOOL delete_key.okay

[GNUPG:] GOT_IT
Comment 1 Rolf Eike Beer 2016-07-25 18:17:17 UTC
Git commit fd934f1763f33e862dc5385a4f77072e80336faa by Rolf Eike Beer.
Committed on 25/07/2016 at 18:12.
Pushed by dakon into branch 'Applications/16.08'.

ignore PINENTRY_LAUNCHED messages from GnuPG

Those seem new in GnuPG 2.1 but are of no interest for KGpg (yet).

M  +2    -0    transactions/kgpgtransaction.cpp

http://commits.kde.org/kgpg/fd934f1763f33e862dc5385a4f77072e80336faa
Comment 2 Rolf Eike Beer 2016-07-25 18:17:17 UTC
Git commit b4905e609e8dd44f27c5f8ec3b4ef08d7235426a by Rolf Eike Beer.
Committed on 25/07/2016 at 18:15.
Pushed by dakon into branch 'Applications/16.08'.

do not fail deleting a key if KEY_CONSIDERED message is seen

These are new in GnuPG 2.1. For extra sanity check that the given key
fingerprint is actually in the list of keys that are about to be deleted.

M  +18   -1    transactions/kgpgdelkey.cpp

http://commits.kde.org/kgpg/b4905e609e8dd44f27c5f8ec3b4ef08d7235426a