I can't get the Thunderbird Enigmail OpenPGP extension using gnupg2 to work under KDE in Linux, Mageia 4.
Trying to send a signed email fails before displaying the passphrase prompt with the message:
Send operation aborted. Key <key-id> not found or not valid. The (sub)key might have expired</key-id>
With gnupg2 installed and Enigmail enabled in Thunderbird and OpenPGP preferences set to find /usr/bin/gpg2, all of the pieces appear to be in place. KDE starts the gpg-agent daemon and sets the environment variable GPG_AGENT_INFO and ~/.gnupg/gpg-agent-info to point to its socket, ~/.gnupg/gpg.conf specifies only the default gpg key and keyserver, ~/.gnupg/gpg-agent.conf contains "pinentry-program /usr/bin/pinentry-qt no-grab default-cache-ttl 1800" and /usr/bin/pinentry-qt is a symlink to /usr/bin/pinentry-qt4.
The default key exists in ~/.gnupg and is valid and not expired; I can view it with the command "gpg2 --list-keys" and it works if I uninstall gpg2 and fall back to using gpg.
After the error occurs, the OpenPGP Console shows:
You need to install a graphical version of pinentry, such as pinentry-qt or pinentry-gtk. And you need to ensure that pinentry is a symlink to the graphical version of pinentry-xxx.
If these two are already set up correctly, then your ~/.gnupg/gpg-agent.conf contains a reference to a wrong pinentry tool.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
$ls-al/usr/bin/pinentry*
-rwxr-xr-x1rootroot1939Jan142011/usr/bin/pinentry*
-rwxr-xr-x1rootroot50472Oct1902:57/usr/bin/pinentry-curses*
lrwxrwxrwx1rootroot12Feb709:39/usr/bin/pinentry-qt->pinentry-qt4*
-rwxr-xr-x1rootroot158160Oct1902:57/usr/bin/pinentry-qt4*
$cat~/.gnupg/gpg-agent.conf
pinentry-program/usr/bin/pinentry-qtno-grabdefault-cache-ttl1800###+++--- GPGConf ---+++###
default-cache-ttl600
max-cache-ttl6000###+++--- GPGConf ---+++### Sun 09 Feb 2014 04:31:22 PM PST# GPGConf edited this configuration file.# It will disable options before this marked block, but it will# never change anything below these lines.
Are you seriously suggesting that gpg-agent doesn't honor the gpg-agent.conf pinentry-program directive to call /usr/bin/pinentry-qt instead of pinentry? Are you really sure of this?
If so, that's a bug in gnupg2, and someone like you should file a bug report.
I hesitate to uninstall pinentry, since apparently a lot of KDE depends on it and uninstalling it would remove all of those KDE packages too. I'd also rather not just hack this by renaming pinentry and substituting a symlink to pinentry-qt4, as some programs might use pinentry and that could break those.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's the default, the same as running "gpgconf --list-components".
$gpgconf--list-optionsgpg
Monitor:1:0:Optionscontrollingthediagnosticoutput:0:0::::
verbose:4:0:verbose:0:0::::
quiet:0:0:besomewhatmorequiet:0:0::::
Configuration:1:0:Optionscontrollingtheconfiguration:0:0::::
default-key:0:0:useNAMEasdefaultsecretkey:1:1:NAME:::"490D242Cencrypt-to:0:0:encrypt to user ID NAME as well:1:1:NAME:::"490D242C
group:4:1:setupemailaliases:37:1:SPEC:::
Debug:1:1:Optionsusefulfordebugging:0:0::::
debug-level:18:1:setthedebuggingleveltoLEVEL:1:1:LEVEL:"none::log-file:0:1:write server mode logs to FILE:32:1:FILE:::Keyserver:1:0:Configuration for Keyservers:0:0::::keyserver:0:0:use keyserver at URL:1:1:URL:::"hkp%3a//pgp.mit.edu
auto-key-locate:0:1:useMECHANISMStolocatekeysbymailaddress:1:1:MECHANISMS:::
The entries default-key and encrypt-to are set to my primary key-id, and keyserver is set to "pgp.mit.edu", as specified in my ~/.gnupg/gpg.conf file.
$gpgconf--list-optionsgpg-agent
Monitor:1:0:Optionscontrollingthediagnosticoutput:0:0::::
verbose:12:0:verbose:0:0::::
quiet:8:0:besomewhatmorequiet:0:0::::
Configuration:1:0:Optionscontrollingtheconfiguration:0:0::::
disable-scdaemon:8:1:donotusetheSCdaemon:0:0::::
enable-ssh-support:0:0:enablesshsupport:0:0::::
Debug:1:1:Optionsusefulfordebugging:0:0::::
debug-level:26:1:setthedebuggingleveltoLEVEL:1:1:LEVEL:"none::log-file:8:1:write server mode logs to FILE:32:1:FILE:::Security:1:0:Options controlling the security:0:0::::default-cache-ttl:24:0:expire cached PINs after N seconds:3:3:N:600::600default-cache-ttl-ssh:24:1:expire SSH keys after N seconds:3:3:N:1800::max-cache-ttl:24:2:set maximum PIN cache lifetime to N seconds:3:3:N:7200::6000max-cache-ttl-ssh:24:2:set maximum SSH key lifetime to N seconds:3:3:N:7200::ignore-cache-for-signing:8:0:do not use the PIN cache when signing:0:0::::no-allow-mark-trusted:8:1:disallow clients to mark keys as "trusted":0:0::::no-grab:8:2:do not grab keyboard and mouse:0:0::::Passphrase policy:1:1:Options enforcing a passphrase policy:0:0::::enforce-passphrase-constraints:8:2:do not allow to bypass the passphrase policy:0:0::::min-passphrase-len:24:1:set minimal required length for new passphrases to N:3:3:N:8::min-passphrase-nonalpha:24:2:require at least N non-alpha characters for a new passphrase:3:3:N:1::check-passphrase-pattern:24:2:check new passphrases against pattern in FILE:32:1:FILE:::max-passphrase-days:24:2:expire the passphrase after N days:3:3:N:0::enable-passphrase-history:8:2:do not allow the reuse of old passphrases:0:0::::
There's no pinentry-program entry in the gpg-agent parameters maintained by gpgconf, although that's one thing you'd think gnupg2 would want to record.
Below is my entire enigdbug.txt file. I would have attached the file instead, but "add attachments" apparently doesn't work here at Sourceforge in forums.
$catenigdbug.txt2014-02-1217:34:46.980[DEBUG]enigmail.js:Loggingdebugoutputto/home/ram/enigdbug.txt2014-02-1217:34:46.980[DEBUG]enigmail.js:Enigmailversion1.62014-02-1217:34:46.980[DEBUG]enigmail.js:OS/CPU=Linuxx86_642014-02-1217:34:46.980[DEBUG]enigmail.js:Platform=X112014-02-1217:34:46.981[DEBUG]enigmail.js:Enigmail.initialize:Ec.envList=DISPLAY=:0,HOME=/home/ram,LANG=en_US.UTF-8,LANGUAGE=en_US.UTF-8:en_US:en,LC_COLLATE=en_US.UTF-8,LC_CTYPE=en_US.UTF-8,LC_MESSAGES=en_US.UTF-8,LC_MONETARY=en_US.UTF-8,LC_NUMERIC=en_US.UTF-8,LC_TIME=en_US.UTF-8,LOGNAME=ram,NLSPATH=/usr/share/locale/%l/%N,PATH=/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib64/qt4/bin:/home/ram/bin,PWD=/home/ram,SHELL=/bin/bash,TMP=/tmp,TMPDIR=/tmp,USER=ram2014-02-1217:34:46.981[DEBUG]gpgAgentHandler.jsm:resetGpgAgent2014-02-1217:34:46.981[CONSOLE]EnigmailAgentPath=/usr/bin/gpg22014-02-1217:34:46.981[DEBUG]enigmail.js:Enigmail.setAgentPath:callingsubprocesswith'/usr/bin/gpg2'2014-02-1217:34:47.048[CONSOLE]enigmail>/usr/bin/gpg2--version--version--batch--no-tty--charsetutf-8--display-charsetutf-82014-02-1217:34:47.049[CONSOLE]gpg(GnuPG)2.0.22libgcrypt1.5.3Copyright(C)2013FreeSoftwareFoundation,Inc.LicenseGPLv3+:GNUGPLversion3orlater<http://gnu.org/licenses/gpl.html>Thisisfreesoftware:youarefreetochangeandredistributeit.ThereisNOWARRANTY,totheextentpermittedbylaw.Home:~/.gnupgSupportedalgorithms:Pubkey:RSA,ELG,DSA,?,?Cipher:IDEA,3DES,CAST5,BLOWFISH,AES,AES192,AES256,TWOFISH,CAMELLIA128,CAMELLIA192,CAMELLIA256Hash:MD5,SHA1,RIPEMD160,SHA256,SHA384,SHA512,SHA224Compression:Uncompressed,ZIP,ZLIB,BZIP22014-02-1217:34:47.049[DEBUG]enigmail.js:detectedGnuPGversion'2.0.22'2014-02-1217:34:47.049[DEBUG]enigmail.js:Enigmail.setAgentPath:gpgconffound:yes2014-02-1217:34:47.049[DEBUG]enigmail.js:detectGpgAgent2014-02-1217:34:47.049[DEBUG]enigmail.js:detectGpgAgent:GPG_AGENT_INFOvariableavailable2014-02-1217:34:47.049[DEBUG]enigmail.js:detectGpgAgent:GPG_AGENT_INFO='/tmp/gpg-GvDCox/S.gpg-agent:1932:1'2014-02-1217:34:47.049[DEBUG]enigmail.js:SettinguseAgenttotrueforgpg2>=2.0.162014-02-1217:34:47.049[DEBUG]enigmailCommon.jsm:stillActive:2014-02-1217:34:47.050[DEBUG]enigmail.js:Enigmail.initialize:END2014-02-1217:34:47.050[DEBUG]enigmailCommon.js:getService:1.62014-02-1217:34:47.050[DEBUG]enigmailCommon.jsm:getVersion2014-02-1217:34:47.050[DEBUG]enigmailCommon.jsm:installedversion:1.62014-02-1217:34:47.050[DEBUG]pref-enigmail.jsdisplayPrefs2014-02-1217:34:47.050[DEBUG]pref-enigmail.jsdisplayPrefs:keepSettingsForReply=true2014-02-1217:34:47.051[DEBUG]pref-enigmail.jsdisplayPrefs:agentAdditionalParam=2014-02-1217:34:47.051[DEBUG]pref-enigmail.jsdisplayPrefs:recipientsSelection=32014-02-1217:34:47.052[DEBUG]pref-enigmail.jsdisplayPrefs:alwaysTrustSend=true2014-02-1217:34:47.052[DEBUG]pref-enigmail.jsdisplayPrefs:allowEmptySubject=false2014-02-1217:34:47.052[DEBUG]pref-enigmail.jsdisplayPrefs:doubleDashSeparator=true2014-02-1217:34:47.052[DEBUG]pref-enigmail.jsdisplayPrefs:useGpgAgent=false2014-02-1217:34:47.052[DEBUG]pref-enigmail.jsdisplayPrefs:hushMailSupport=false2014-02-1217:34:47.052[DEBUG]pref-enigmail.jsdisplayPrefs:keyserver=pgp.mit.edu2014-02-1217:34:47.053[DEBUG]pref-enigmail.jsdisplayPrefs:logDirectory=/home/ram2014-02-1217:34:47.053[DEBUG]pref-enigmail.jsdisplayPrefs:advancedUser=true2014-02-1217:34:47.053[DEBUG]pref-enigmail.jsdisplayPrefs:noPassphrase=false2014-02-1217:34:47.053[DEBUG]pref-enigmail.jsdisplayPrefs:confirmBeforeSend=true2014-02-1217:34:47.053[DEBUG]pref-enigmail.jsdisplayPrefs:useDefaultComment=false2014-02-1217:34:47.053[DEBUG]pref-enigmail.jsdisplayPrefs:autoKeyRetrieve=pgp.mit.edu2014-02-1217:34:47.053[DEBUG]pref-enigmail.jsdisplayPrefs:encryptToSelf=true2014-02-1217:34:47.054[DEBUG]pref-enigmail.jsdisplayPrefs:agentPath=/usr/bin/gpg22014-02-1217:34:47.054[DEBUG]pref-enigmail.jsdisplayPrefs:wrapHtmlBeforeSend=true2014-02-1217:34:47.054[DEBUG]gpgAgentHandler.jsm:isAgentTypeGpgAgent:2014-02-1217:34:47.140[DEBUG]gpgAgentHandler.jsm:isAgentTypeGpgAgent:pid=19322014-02-1217:34:47.140[DEBUG]gpgAgentHandler.jsm:isCmdGpgAgent:2014-02-1217:34:47.140[DEBUG]gpgAgentHandler.jsm:resolvePath:filePath=ps2014-02-1217:34:47.140[DEBUG]gpgAgentHandler.jsm:resolvePath:checkingfor/usr/bin/ps2014-02-1217:34:47.197[DEBUG]gpgAgentHandler.jsm:isCmdGpgAgent:gotdata:'COMMANDgpg-agent'2014-02-1217:34:47.197[DEBUG]gpgAgentHandler.jsm:isCmdGpgAgent:2014-02-1217:34:47.197[DEBUG]gpgAgentHandler.jsm:resolvePath:filePath=ps2014-02-1217:34:47.198[DEBUG]gpgAgentHandler.jsm:resolvePath:checkingfor/usr/bin/ps2014-02-1217:34:47.260[DEBUG]gpgAgentHandler.jsm:isCmdGpgAgent:gotdata:'COMMANDgpg-agent'2014-02-1217:34:47.260[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:2014-02-1217:34:47.321[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:Monitor:1:0:Optionscontrollingthediagnosticoutput:0:0::::2014-02-1217:34:47.321[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:verbose:12:0:verbose:0:0::::2014-02-1217:34:47.322[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:quiet:8:0:besomewhatmorequiet:0:0::::2014-02-1217:34:47.322[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:Configuration:1:0:Optionscontrollingtheconfiguration:0:0::::2014-02-1217:34:47.322[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:disable-scdaemon:8:1:donotusetheSCdaemon:0:0::::2014-02-1217:34:47.322[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:enable-ssh-support:0:0:enablesshsupport:0:0::::2014-02-1217:34:47.322[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:Debug:1:1:Optionsusefulfordebugging:0:0::::2014-02-1217:34:47.322[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:debug-level:26:1:setthedebuggingleveltoLEVEL:1:1:LEVEL:"none::2014-02-1217:34:47.322[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:log-file:8:1:writeservermodelogstoFILE:32:1:FILE:::2014-02-1217:34:47.322[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:Security:1:0:Optionscontrollingthesecurity:0:0::::2014-02-1217:34:47.322[DEBUG]gpgAgentHandler.jsm:getAgentMaxIdle:line:default-cache-ttl:24:0:expirecachedPINsafterNseconds:3:3:N:600::6002014-02-1217:34:47.323[DEBUG]enigmail.js:SettinguseAgenttotrueforgpg2>=2.0.162014-02-1217:34:47.323[DEBUG]commonFuncs.jsm:collapseAdvanced:2014-02-1217:34:47.323[DEBUG]commonFuncs.jsm:collapseAdvanced:2014-02-1217:34:47.324[DEBUG]enigmailCommon.js:EnigDisplayRadioPref:recipientsSelection,32014-02-1217:48:08.851[DEBUG]enigmailMessengerOverlay.js:setAttachmentReveal2014-02-1217:48:08.855[DEBUG]enigmailMessengerOverlay.js:setAttachmentReveal2014-02-1217:48:11.769[DEBUG]enigmailMsgComposeOverlay.js:_enigmail_composeWindowInit2014-02-1217:48:11.780[DEBUG]enigmailMsgComposeOverlay.js:gotloadevent2014-02-1217:48:11.780[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.composeStartup2014-02-1217:48:11.780[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.setIdentityDefaults2014-02-1217:48:11.780[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:11.780[DEBUG]enigmailCommon.jsm:getSignMsg:identity.key=id12014-02-1217:48:11.780[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.setSendDefaultOptions2014-02-1217:48:11.780[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=encrypt2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:encrypt=02014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=signPlain2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:signPlain=true2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=pgpMimeMode2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:pgpMimeMode=false2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=attachPgpKey2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:attachPgpKey=false2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.updateStatusBar:2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:11.781[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.msgComposeReset2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.setIdentityDefaults2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:11.782[DEBUG]enigmailCommon.jsm:getSignMsg:identity.key=id12014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.setSendDefaultOptions2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=encrypt2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:encrypt=02014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=signPlain2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:signPlain=true2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=pgpMimeMode2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:pgpMimeMode=false2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=attachPgpKey2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:attachPgpKey=false2014-02-1217:48:11.782[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.updateStatusBar:2014-02-1217:48:11.783[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:11.783[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.composeOpen2014-02-1217:48:11.783[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.updateStatusBar:2014-02-1217:48:11.783[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:11.974[DEBUG]enigmailMsgComposeOverlay.js:ECSL.NotifyComposeFieldsReady2014-02-1217:48:12.041[DEBUG]enigmailMsgComposeOverlay.js:ECSL.ComposeBodyReady2014-02-1217:48:12.041[DEBUG]enigmailMsgComposeOverlay.js:EDSL.NotifyDocumentStateChanged:isEmpty=true,isEditable=true2014-02-1217:48:12.090[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.fireSendFlags2014-02-1217:48:12.091[DEBUG]enigmailCommon.jsm:dispatchEventf=_sendFlagWrapper2014-02-1217:48:12.103[DEBUG]enigmailCommon.jsm:dispatchEventrunningmainEvent2014-02-1217:48:12.105[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.focusChange:Enigmail.msg.determineSendFlags2014-02-1217:48:12.105[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:12.105[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.updateStatusBar:2014-02-1217:48:12.105[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:29.941[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.fireSendFlags2014-02-1217:48:29.941[DEBUG]enigmailCommon.jsm:dispatchEventf=_sendFlagWrapper2014-02-1217:48:29.942[DEBUG]enigmailCommon.jsm:dispatchEventrunningmainEvent2014-02-1217:48:29.942[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.focusChange:Enigmail.msg.determineSendFlags2014-02-1217:48:29.942[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:29.943[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.updateStatusBar:2014-02-1217:48:29.943[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:38.506[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.fireSendFlags2014-02-1217:48:38.506[DEBUG]enigmailCommon.jsm:dispatchEventf=_sendFlagWrapper2014-02-1217:48:38.507[DEBUG]enigmailCommon.jsm:dispatchEventrunningmainEvent2014-02-1217:48:38.507[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.focusChange:Enigmail.msg.determineSendFlags2014-02-1217:48:38.507[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:38.508[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.updateStatusBar:2014-02-1217:48:38.508[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:49.979[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.sendMessageListener2014-02-1217:48:49.980[DEBUG]enigmailCommon.jsm:getVersion2014-02-1217:48:49.980[DEBUG]enigmailCommon.jsm:installedversion:1.62014-02-1217:48:49.980[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.modifyCompFields:otherRandomHeaders=X-Enigmail-Version:1.62014-02-1217:48:49.980[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.encryptMsg:msgType=0,Enigmail.msg.sendMode=12014-02-1217:48:49.980[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.encryptMsg:currentId=[nsIMsgIdentity:id1],ramunro@speakeasy.net2014-02-1217:48:49.980[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:49.981[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.encryptMsg:gMsgCompose=[xpconnectwrappednsIMsgCompose]2014-02-1217:48:49.981[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.keySelection2014-02-1217:48:49.981[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=signPlain2014-02-1217:48:49.981[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:signPlain=true2014-02-1217:48:49.981[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.keySelection:recipientsSelection=3/toAddr=spamtrap@speakeasy.net2014-02-1217:48:49.981[DEBUG]enigmailMsgComposeOverlay.js:hasAttachments=false2014-02-1217:48:49.984[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorGetContentAs2014-02-1217:48:49.984[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.replaceEditorText:2014-02-1217:48:49.986[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorInsertText2014-02-1217:48:49.988[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorInsertText2014-02-1217:48:49.989[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorGetContentAs2014-02-1217:48:49.989[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorGetCharset2014-02-1217:48:49.989[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.encryptMsg:charset=ISO-8859-12014-02-1217:48:49.989[DEBUG]enigmail.js:Enigmail.encryptMessage:13bytesfrom0x490D242Ctospamtrap@speakeasy.net(97)2014-02-1217:48:49.989[DEBUG]enigmailCommon.jsm:encryptMessageStart:uiFlags=1,from0x490D242Ctospamtrap@speakeasy.net,hashAlgorithm=null(00000061)2014-02-1217:48:49.989[DEBUG]enigmailCommon.jsm:getEncryptCommand:hashAlgorithm=null2014-02-1217:48:49.990enigmailCommon.jsm:execStart:command=/usr/bin/gpg2--charsetutf-8--display-charsetutf-8--batch--no-tty--status-fd2--comment"Using GnuPG with Thunderbird - http://www.enigmail.net/"-t--clearsign-u0x490D242C,needPassphrase=1,domWindow=[objectChromeWindow],listener=[objectObject]2014-02-1217:48:49.990[DEBUG]enigmail.js:SettinguseAgenttotrueforgpg2>=2.0.162014-02-1217:48:49.990[DEBUG]enigmailCommon.jsm:getPassphrase:2014-02-1217:48:49.990[DEBUG]enigmail.js:SettinguseAgenttotrueforgpg2>=2.0.162014-02-1217:48:49.990[CONSOLE]enigmail>/usr/bin/gpg2--charsetutf-8--display-charsetutf-8--batch--no-tty--status-fd2--comment"Using GnuPG with Thunderbird - http://www.enigmail.net/"-t--clearsign-u0x490D242C--use-agent2014-02-1217:48:50.063[DEBUG]enigmail.js:SettinguseAgenttotrueforgpg2>=2.0.162014-02-1217:48:50.068[ERROR]subprocess.jsm:goterrorfromstdinWorker:error:writefailed,errno=322014-02-1217:48:59.496[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.sendMessageListener2014-02-1217:48:59.496[DEBUG]enigmailCommon.jsm:getVersion2014-02-1217:48:59.496[DEBUG]enigmailCommon.jsm:installedversion:1.62014-02-1217:48:59.496[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.modifyCompFields:otherRandomHeaders=X-Enigmail-Version:1.62014-02-1217:48:59.496[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.encryptMsg:msgType=0,Enigmail.msg.sendMode=12014-02-1217:48:59.497[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.encryptMsg:currentId=[nsIMsgIdentity:id1],ramunro@speakeasy.net2014-02-1217:48:59.497[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=enabled2014-02-1217:48:59.497[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.encryptMsg:gMsgCompose=[xpconnectwrappednsIMsgCompose]2014-02-1217:48:59.497[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.keySelection2014-02-1217:48:59.497[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:identity=id1value=signPlain2014-02-1217:48:59.498[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.getAccDefault:signPlain=true2014-02-1217:48:59.498[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.keySelection:recipientsSelection=3/toAddr=spamtrap@speakeasy.net2014-02-1217:48:59.498[DEBUG]enigmailMsgComposeOverlay.js:hasAttachments=false2014-02-1217:48:59.501[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorGetContentAs2014-02-1217:48:59.501[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.replaceEditorText:2014-02-1217:48:59.503[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorInsertText2014-02-1217:48:59.505[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorInsertText2014-02-1217:48:59.505[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorGetContentAs2014-02-1217:48:59.506[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorGetCharset2014-02-1217:48:59.506[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.encryptMsg:charset=ISO-8859-12014-02-1217:48:59.506[DEBUG]enigmail.js:Enigmail.encryptMessage:13bytesfrom0x490D242Ctospamtrap@speakeasy.net(97)2014-02-1217:48:59.506[DEBUG]enigmailCommon.jsm:encryptMessageStart:uiFlags=1,from0x490D242Ctospamtrap@speakeasy.net,hashAlgorithm=null(00000061)2014-02-1217:48:59.506[DEBUG]enigmailCommon.jsm:getEncryptCommand:hashAlgorithm=null2014-02-1217:48:59.507enigmailCommon.jsm:execStart:command=/usr/bin/gpg2--charsetutf-8--display-charsetutf-8--batch--no-tty--status-fd2--comment"Using GnuPG with Thunderbird - http://www.enigmail.net/"-t--clearsign-u0x490D242C,needPassphrase=1,domWindow=[objectChromeWindow],listener=[objectObject]2014-02-1217:48:59.507[DEBUG]enigmail.js:SettinguseAgenttotrueforgpg2>=2.0.162014-02-1217:48:59.507[DEBUG]enigmailCommon.jsm:getPassphrase:2014-02-1217:48:59.507[DEBUG]enigmail.js:SettinguseAgenttotrueforgpg2>=2.0.162014-02-1217:48:59.507[CONSOLE]enigmail>/usr/bin/gpg2--charsetutf-8--display-charsetutf-8--batch--no-tty--status-fd2--comment"Using GnuPG with Thunderbird - http://www.enigmail.net/"-t--clearsign-u0x490D242C--use-agent2014-02-1217:48:59.593[DEBUG]enigmail.js:SettinguseAgenttotrueforgpg2>=2.0.162014-02-1217:48:59.594[ERROR]subprocess.jsm:tryingtowritedatatoclosedstdin2014-02-1217:48:59.595[DEBUG]enigmailCommon.jsm:encryptMessageEnd:uiFlags=1,sendFlags=00000061,outputLen=02014-02-1217:48:59.595[DEBUG]enigmailCommon.jsm:parseErrorOutput:statusmessage:[GNUPG:]USERID_HINTFAA60C21490D242CRobertAlanMunro(ITmanagementconsultant,journalist,author.)<ramunro@speakeasy.net>[GNUPG:]NEED_PASSPHRASEFAA60C21490D242CFAA60C21490D242C170gpg:problemwiththeagent:Nopinentry[GNUPG:]ERRORget_passphrase85[GNUPG:]MISSING_PASSPHRASEgpg:skipped"0x490D242C":Operationcancelled[GNUPG:]INV_SGNR00x490D242Cgpg:[stdin]:clearsignfailed:Operationcancelled2014-02-1217:48:59.595[DEBUG]enigmailCommon.jsm:parseErrorOutput:detectedinvalidsender:0x490D242C/code:02014-02-1217:48:59.596[DEBUG]enigmailCommon.jsm:parseErrorOutput:statusFlags=004108022014-02-1217:48:59.596[DEBUG]enigmailCommon.jsm:encryptMessageEnd:commandexecutionexitcode:-12014-02-1217:48:59.596[DEBUG]enigmail.js:Enigmail.encryptMessage:commandexecutionexitcode:-12014-02-1217:48:59.596[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.replaceEditorText:2014-02-1217:48:59.598[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorInsertText2014-02-1217:48:59.600[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.editorInsertText2014-02-1217:49:03.518[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.removeAttachedKey:2014-02-1217:49:10.547[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.msgComposeClose2014-02-1217:49:10.547[DEBUG]enigmailMsgComposeOverlay.js:Enigmail.msg.msgComposeReset
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sorry, but the only thing I can see is: [GNUPG:] NEED_PASSPHRASE FAA60C21490D242C FAA60C21490D242C 17 0
gpg: problem with the agent: No pinentry
This line in the log file tells you about gpg-agent:
2014-02-12 17:34:47.049 [DEBUG] enigmail.js: detectGpgAgent: GPG_AGENT_INFO='/tmp/gpg-GvDCox/S.gpg-agent:1932:1'
That's already in my environment variables, so no need to export it again, and doing that doesn't help.
$/usr/bin/gpg2--clearsignYouneedapassphrasetounlockthesecretkeyforuser:"Robert Alan Munro (IT management consultant, journalist, author.) <ramunro@speakeasy.net>"1024-bitDSAkey,ID490D242C,created2003-12-28gpg:problemwiththeagent:Nopinentrygpg:nodefaultsecretkey:Operationcancelledgpg:[stdin]:clearsignfailed:Operationcancelled
It appears that gpg-agent is not calling /usr/bin/pinentry-qt but instead fails, and gpg2 returns the passphrase prompt to the caller, which is the bash shell here.
Why isn't gpg-agent using the "pinentry-program /usr/bin/pinentry-qt [...]" directive that is in my ~/.gnupg/gpg-agent.conf file?
I'm looking into how "no-grab" was added to gpg-agent.conf, but that's definitely what was preventing pinentry-qt from requesting the passphrase.
The parameter "keep-display" is also required by gpg-agent for pinentry-qt to work, but my Linux distribution passes "--keep-display" as a command-line parameter when it starts gpg-agent.
Thanks for helping me figure this out.
Last edit: Robert Munro 2014-02-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't get the Thunderbird Enigmail OpenPGP extension using gnupg2 to work under KDE in Linux, Mageia 4.
Trying to send a signed email fails before displaying the passphrase prompt with the message:
With gnupg2 installed and Enigmail enabled in Thunderbird and OpenPGP preferences set to find /usr/bin/gpg2, all of the pieces appear to be in place. KDE starts the gpg-agent daemon and sets the environment variable GPG_AGENT_INFO and ~/.gnupg/gpg-agent-info to point to its socket, ~/.gnupg/gpg.conf specifies only the default gpg key and keyserver, ~/.gnupg/gpg-agent.conf contains "pinentry-program /usr/bin/pinentry-qt no-grab default-cache-ttl 1800" and /usr/bin/pinentry-qt is a symlink to /usr/bin/pinentry-qt4.
The default key exists in ~/.gnupg and is valid and not expired; I can view it with the command "gpg2 --list-keys" and it works if I uninstall gpg2 and fall back to using gpg.
After the error occurs, the OpenPGP Console shows:
Apparently gpg-agent never calls pinentry-qt because the passphrase prompt is not shown, so the OpenPGP Log file contains:
Is something missing or misconfigured? Or is this a bug in either Enigmail or gnupg2?
You need to install a graphical version of pinentry, such as pinentry-qt or pinentry-gtk. And you need to ensure that pinentry is a symlink to the graphical version of pinentry-xxx.
If these two are already set up correctly, then your ~/.gnupg/gpg-agent.conf contains a reference to a wrong pinentry tool.
Here's what I've got:
Are you seriously suggesting that gpg-agent doesn't honor the gpg-agent.conf pinentry-program directive to call /usr/bin/pinentry-qt instead of pinentry? Are you really sure of this?
If so, that's a bug in gnupg2, and someone like you should file a bug report.
I hesitate to uninstall pinentry, since apparently a lot of KDE depends on it and uninstalling it would remove all of those KDE packages too. I'd also rather not just hack this by renaming pinentry and substituting a symlink to pinentry-qt4, as some programs might use pinentry and that could break those.
what does the following command list concerning pinentry-program? (Note: it doesn't report anything on my Mac, but that could be Mac-specific)
Here is everything I can find out through gpgconf.
That's the default, the same as running "gpgconf --list-components".
The entries default-key and encrypt-to are set to my primary key-id, and keyserver is set to "pgp.mit.edu", as specified in my ~/.gnupg/gpg.conf file.
There's no pinentry-program entry in the gpg-agent parameters maintained by gpgconf, although that's one thing you'd think gnupg2 would want to record.
It didn't complain about anything here, and even created an S/MIME keyring.
No complaints.
Hmmm. I checked the gnupg and gnupg2 packages, and the gpgconf.conf file is not included in either of them. There is no ~/.gnupg/gpgconf.conf file.
Last edit: Robert Munro 2014-02-12
Below is my entire enigdbug.txt file. I would have attached the file instead, but "add attachments" apparently doesn't work here at Sourceforge in forums.
I'm sorry, but the only thing I can see is:
[GNUPG:] NEED_PASSPHRASE FAA60C21490D242C FAA60C21490D242C 17 0
gpg: problem with the agent: No pinentry
This line in the log file tells you about gpg-agent:
2014-02-12 17:34:47.049 [DEBUG] enigmail.js: detectGpgAgent: GPG_AGENT_INFO='/tmp/gpg-GvDCox/S.gpg-agent:1932:1'
You could try this in a shell:
You should then be prompted for your passphrase or get an error about pinentry.
I got an error about pinentry, suggesting that gpg-agent isn't calling it.
That's already in my environment variables, so no need to export it again, and doing that doesn't help.
It appears that gpg-agent is not calling /usr/bin/pinentry-qt but instead fails, and gpg2 returns the passphrase prompt to the caller, which is the bash shell here.
Why isn't gpg-agent using the "pinentry-program /usr/bin/pinentry-qt [...]" directive that is in my ~/.gnupg/gpg-agent.conf file?
Here is what ps displays about gpg-agent:
Last edit: Robert Munro 2014-02-13
I'm not sure, but it may be that either gpg-agent was started before you modified gpg-agent.conf, or gpg-agent is simply ignoring the config option.
I'd suggest you start with symlinking pinentry-qt -> pinentry
I've solved the problem. Here is my modified ~/.gnupg/gpg-agent.conf without the parameter "no-grab":
I'm looking into how "no-grab" was added to gpg-agent.conf, but that's definitely what was preventing pinentry-qt from requesting the passphrase.
The parameter "keep-display" is also required by gpg-agent for pinentry-qt to work, but my Linux distribution passes "--keep-display" as a command-line parameter when it starts gpg-agent.
Thanks for helping me figure this out.
Last edit: Robert Munro 2014-02-15