Mew
Mew copied to clipboard
Issue with protocol for gpg
Hi, I started recently to have problems when signing messages in mew. Not sure exactly what caused the change but I had to change my gpg and gpg-agent prefs to have mew happy. Furthermore mew is not able to parse the messages of my gpg.
gpg (GnuPG) 2.2.17
libgcrypt 1.8.5
Copyright (C) 2019 Free Software Foundation, Inc.
It seems that gpg answers do not follow what mew expect. After some investigation, I discovered how to setup debuging for gpg in mew and get the following information in the mew-debug buffer:
<PGP filter1>
[GNUPG:] KEY_CONSIDERED 027F76FFE5E74CFBCA473FDCC6C140BC32FC9604 2
[GNUPG:] BEGIN_SIGNING H10
[GNUPG:] USERID_HINT C6C140BC32FC9604 Dagnat Fabien <[email protected]>
[GNUPG:] NEED_PASSPHRASE C6C140BC32FC9604 C6C140BC32FC9604 1 0
[GNUPG:] INQUIRE_MAXLEN 100
[GNUPG:] GET_HIDDEN passphrase.enter
Clearly no case of mew-pgp.el
function mew-pgp-process-filter1
matches this message. To make it work I had to patch mew-pgp-msg-enter-pass
(defconst mew-pgp-msg-enter-pass
'("Enter pass phrase: "
"Enter pass phrase: "
"Enter pass phrase: "
"Enter passphrase: "
"passphrase.enter"))
I'm reluctant to submit a patch because I'm pretty sure it is not the right way of solving the problem, it is not sufficient, I have not found any description of the protocol external tools should follow when invoking gpg and I know too little in elisp... Perhaps, if someone provides help, I would be able to propose a real patch.
Fabien