Possible GPGME bug

Adam Schreiber sadam at clemson.edu
Wed Oct 31 20:37:52 CET 2007


In fixing a bug in Seahorse, I found that our feature to revoke a sub
key was no longer working.  It uses the gpgme_op_edit API.  I checked
the challenge and responses of gpg --edit-key manually and found that
they matched those our state machine expected.  The responses of
gpgme_op_edit are different.  I will paste the relevant output of
running each below.  I am running gpg 1.4.7 and GPGME 1.1.4.

Cheers,

Adam Schreiber

----------------8<---------------------------------------------------------------------------------
gpg --status-fd=2 --command-fd=0 --edit-key fake1
gpg (GnuPG) 1.4.7; Copyright (C) 2006 Free Software Foundation, Inc.

[GNUPG:] GET_LINE keyedit.prompt
key 2
[GNUPG:] GOT_IT
[GNUPG:] GET_LINE keyedit.prompt
revkey
[GNUPG:] GOT_IT
[GNUPG:] GET_BOOL keyedit.revoke.subkey.okay
yes
[GNUPG:] GOT_IT
[GNUPG:] GET_LINE ask_revocation_reason.code
3
[GNUPG:] GOT_IT
Enter an optional description; end it with an empty line:
[GNUPG:] GET_LINE ask_revocation_reason.text
test key
[GNUPG:] GOT_IT
[GNUPG:] GET_LINE ask_revocation_reason.text

[GNUPG:] GOT_IT
Reason for revocation: Key is no longer used
test key
[GNUPG:] GET_BOOL ask_revocation_reason.okay
yes
[GNUPG:] GOT_IT
[GNUPG:] USERID_HINT 0116FD16FA676606 fake1
[GNUPG:] NEED_PASSPHRASE 0116FD16FA676606 0116FD16FA676606 17 0

You need a passphrase to unlock the secret key for
user: "fake1"
[GNUPG:] GET_LINE keyedit.prompt
quit
[GNUPG:] GOT_IT
[GNUPG:] GET_BOOL keyedit.save.okay

-----------8<------------------------------------------------------------------------------------------------
[edit key] state: 0 / status: 49 / args: keyedit.prompt
[edit key] state: 1 / status: 49 / args: keyedit.prompt
[edit key] state: 2 / status: 48 / args: keyedit.revoke.subkey.okay
[edit key] state: 3 / status: 49 / args: ask_revocation_reason.code
[edit key] state: 4 / status: 49 / args: ask_revocation_reason.text
[edit key] state: 5 / status: 48 / args: ask_revocation_reason.okay
[edit key] state: 3 / status: 49 / args: ask_revocation_reason.code
[edit key] state: 4 / status: 49 / args: ask_revocation_reason.code



More information about the Gnupg-devel mailing list