我尝试了几次以下操作,我认为必须提及它,因为这可以解释一些问题。
下面我要解释的是第二次及以后的尝试。
我已将我的私钥/公钥对导入到Enigmail,此密钥受密码保护。在导入过程中,Enigmail要求输入密码,一切都很好。
我向自己发送了一封加密的电子邮件,并且能够在收件箱和已发送的文件夹中解密此电子邮件。 Enigmail并未要求提供用于解密此电子邮件的密码。据我所记得,它是在第一次尝试使用Pinentry窗口时完成的。
然后我重新启动Thunderbird,麻烦开始了...
当我单击此加密的电子邮件时,Enigmail(在“收件箱”和“已发送”文件夹中)说“密码丢失-单击详细信息按钮以获取更多详细信息”。 但是无法输入密码,没有Pinentry窗口...
我遵循了本故障排除指南:Resolving issues with GnuPG 2.x and gpg-agent。但是使用gpg-agent和pinentry似乎一切正常。
我收集了尽可能多的信息,这里是:
我正在使用:
我的pinentry版本是pinentry-gnome3 1.1.0-1
/ usr / bin / pinentry-> / etc / alternatives / pinentry-> / usr / bin / pinentry-gnome3
这是我的$ HOME / .gnupg / gpg-agent.conf
# Created by pEpEngine
# GPGConf disabled this option here at Sat Sep 8 22:07:14 2018 CEST
# default-cache-ttl 300
# GPGConf disabled this option here at Sat Sep 8 22:07:14 2018 CEST
# max-cache-ttl 1200
###+++--- GPGConf ---+++###
default-cache-ttl 60
max-cache-ttl 600
###+++--- GPGConf ---+++### Sun Sep 9 15:12:48 2018 CEST
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
这是gpgconf命令的输出
gpgconf
gpg:OpenPGP:/usr/bin/gpg
gpg-agent:Private Keys:/usr/bin/gpg-agent
scdaemon:Smartcards:/usr/lib/gnupg/scdaemon
gpgsm:S/MIME:/usr/bin/gpgsm
dirmngr:Network:/usr/bin/dirmngr
pinentry:Passphrase Entry:/usr/bin/pinentry
还有enigmail日志
2018-09-09 17:40:01.188 [DEBUG] enigmailMessengerOverlay.js: messageFrameUnload
2018-09-09 17:40:01.188 [DEBUG] enigmailMessengerOverlay.js: messageCleanup
2018-09-09 17:40:01.188 [DEBUG] enigmailMessengerOverlay.js: setAttachmentReveal
2018-09-09 17:40:01.188 [DEBUG] enigmailMsgHdrViewOverlay.js: this.messageUnload
2018-09-09 17:40:01.188 [DEBUG] uris.jsm: forgetEncryptedUri: uri=imap-message://user@imap.domain.tld/INBOX#35158
2018-09-09 17:40:01.200 [DEBUG] enigmailMsgHdrViewOverlay.js: _listener_onStartHeaders
2018-09-09 17:40:01.200 [DEBUG] enigmailMessengerOverlay.js: setAttachmentReveal
2018-09-09 17:40:01.200 [DEBUG] windows.jsm: getFrame: user@domain.tld=messagepane
2018-09-09 17:40:01.200 [DEBUG] enigmailMsgHdrViewOverlay.js: setWindowCallback
2018-09-09 17:40:01.212 [DEBUG] enigmailMsgHdrViewOverlay.js: _listener_onEndHeaders
2018-09-09 17:40:01.214 [DEBUG] enigmailMessengerOverlay.js: setAttachmentReveal
2018-09-09 17:40:01.214 [DEBUG] pgpmimeHandler.js: PgpMimeHandler()
2018-09-09 17:40:01.214 [DEBUG] pgpmimeHandler.js: onStartRequest
2018-09-09 17:40:01.214 [DEBUG] pgpmimeHandler.js: ct= multipart/encrypted; protocol="application/pgp-encrypted";
boundary="3VzqdH1YMSTPOoMxLxCc7reSPX9w7Lham"
2018-09-09 17:40:01.214 [DEBUG] mimeDecrypt.jsm: MimeDecryptHandler()
2018-09-09 17:40:01.214 [DEBUG] mimeDecrypt.jsm: onStartRequest
2018-09-09 17:40:01.214 [DEBUG] mimeDecrypt.jsm: onStartRequest: uri='imap://user@imap.domain.tld:993/fetch%3EUID%3E/INBOX%3E35156'
2018-09-09 17:40:01.218 [DEBUG] uris.jsm: msgIdentificationFromUrl: url.pathQueryRef=/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.218 [DEBUG] uris.jsm: msgIdentificationFromUrl: msgNum=35156 / folder=/fetch>UID>/INBOX
2018-09-09 17:40:01.218 [DEBUG] mimeDecrypt.jsm: checking MIME structure for 1 / imap://user@imap.domain.tld:993/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.218 [DEBUG] decryption.jsm: decryptMessageStart: verifyOnly=false
2018-09-09 17:40:01.220 execution.jsm: execStart: command = /usr/bin/gpg --charset utf-8 --display-charset utf-8 --no-auto-check-trustdb --batch --no-tty --no-verbose --status-fd 2 --log-file /tmp/gpgOutput.OesdhL --sender user@domain.tld --max-output 639200 --decrypt, needPassphrase=true, domWindow=[object ChromeWindow], listener=[object Object]
2018-09-09 17:40:01.220 [CONSOLE] enigmail> /usr/bin/gpg --charset utf-8 --display-charset utf-8 --no-auto-check-trustdb --batch --no-tty --no-verbose --status-fd 2 --log-file /tmp/gpgOutput.OesdhL --sender user@domain.tld --max-output 639200 --decrypt
2018-09-09 17:40:01.222 [DEBUG] enigmail> DONE
2018-09-09 17:40:01.222 [DEBUG] mimeDecrypt.jsm: onStopRequest: pipe not yet ready
2018-09-09 17:40:01.240 [DEBUG] mimeDecrypt.jsm: stdin()
2018-09-09 17:40:01.244 [DEBUG] mimeDecrypt.jsm: stdin: closing pipe
2018-09-09 17:40:01.346 [DEBUG] errorHandling.jsm: Process terminated. Human-readable output from gpg:
-----
2018-09-09 17:40:01 gpg[13290] encrypted with 4096-bit RSA key, ID xxxxxxxxxxxxxxxx, created 2018-09-08
"First Last <user@domain.tld>"
2018-09-09 17:40:01 gpg[13290] public key decryption failed: No passphrase given
2018-09-09 17:40:01 gpg[13290] decryption failed: No secret key
-----
2018-09-09 17:40:01.346 [DEBUG] decryption.jsm: decryptMessageEnd: uiFlags=8, verifyOnly=false, noOutput=false
2018-09-09 17:40:01.346 [DEBUG] decryption.jsm: decryptMessageEnd: stderrStr=
[GNUPG:] ENC_TO xxxxxxxxxxxxxxxx 1 0
[GNUPG:] KEY_CONSIDERED xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0
[GNUPG:] PINENTRY_LAUNCHED 13292 gnome3 1.1.0 - - :0.0
[GNUPG:] KEY_CONSIDERED xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0
[GNUPG:] ERROR pkdecrypt_failed 67109041
[GNUPG:] BEGIN_DECRYPTION
[GNUPG:] DECRYPTION_FAILED
[GNUPG:] END_DECRYPTION
2018-09-09 17:40:01.346 [DEBUG] errorHandling.jsm: parseErrorOutputWith: status message:
[GNUPG:] ENC_TO xxxxxxxxxxxxxxxx 1 0
[GNUPG:] KEY_CONSIDERED xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0
[GNUPG:] PINENTRY_LAUNCHED 13292 gnome3 1.1.0 - - :0.0
[GNUPG:] KEY_CONSIDERED xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0
[GNUPG:] ERROR pkdecrypt_failed 67109041
[GNUPG:] BEGIN_DECRYPTION
[GNUPG:] DECRYPTION_FAILED
[GNUPG:] END_DECRYPTION
2018-09-09 17:40:01.346 [DEBUG] errorHandling.jsm: missingPassphrase: missing passphrase
2018-09-09 17:40:01.348 [DEBUG] errorHandling.jsm: parseErrorOutputWith: statusFlags = 00410800
2018-09-09 17:40:01.348 [DEBUG] errorHandling.jsm: parseErrorOutputWith: return with c.errorMsg =
2018-09-09 17:40:01.348 [DEBUG] execution.jsm: EnigmailExecution.fixExitCode: agentType: gpg exitCode: undefined statusFlags 6359040
2018-09-09 17:40:01.348 [DEBUG] decryption.jsm: decryptMessageEnd: process: Phrase de passe manquante
2018-09-09 17:40:01.348 [DEBUG] decryption.jsm: decryptMessageEnd: process:
2018-09-09 17:40:01.348 [DEBUG] decryption.jsm: decryptMessageEnd: command execution exit code: undefined
2018-09-09 17:40:01.348 [DEBUG] mimeDecrypt.jsm: displayStatus
2018-09-09 17:40:01.348 [DEBUG] mimeDecrypt.jsm: displayStatus for uri imap://user@imap.domain.tld:993/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.348 [DEBUG] enigmailMsgHdrViewOverlay.js: EnigMimeHeaderSink.processDecryptionResult:
2018-09-09 17:40:01.348 [DEBUG] enigmailMsgHdrViewOverlay.js: actionType= modifyMessageHeaders, mimePart=1
2018-09-09 17:40:01.348 [DEBUG] enigmailMsgHdrViewOverlay.js: EnigMimeHeaderSink.isCurrentMessage: uri.spec=imap://user@imap.domain.tld:993/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.348 [DEBUG] uris.jsm: msgIdentificationFromUrl: url.pathQueryRef=/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.348 [DEBUG] uris.jsm: msgIdentificationFromUrl: msgNum=35156 / folder=/fetch>UID>/INBOX
2018-09-09 17:40:01.348 [DEBUG] uris.jsm: msgIdentificationFromUrl: url.pathQueryRef=/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.350 [DEBUG] uris.jsm: msgIdentificationFromUrl: msgNum=35156 / folder=/fetch>UID>/INBOX
2018-09-09 17:40:01.350 [DEBUG] enigmailMsgHdrViewOverlay.js: EnigMimeHeaderSink.isCurrentMessage: url=imap://user@imap.domain.tld:993/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.350 [DEBUG] enigmailMsgHdrViewOverlay.js: EnigMimeHeaderSink.isCurrentMessage: true
2018-09-09 17:40:01.350 [DEBUG] enigmailMsgHdrViewOverlay.js: EnigMimeHeaderSink.modifyMessageHeaders:
2018-09-09 17:40:01.350 [DEBUG] enigmailMsgHdrViewOverlay.js: updateSecurityStatus: mimePart=1
2018-09-09 17:40:01.350 [DEBUG] enigmailMsgHdrViewOverlay.js: EnigMimeHeaderSink.isCurrentMessage: uri.spec=imap://user@imap.domain.tld:993/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.350 [DEBUG] uris.jsm: msgIdentificationFromUrl: url.pathQueryRef=/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.350 [DEBUG] uris.jsm: msgIdentificationFromUrl: msgNum=35156 / folder=/fetch>UID>/INBOX
2018-09-09 17:40:01.350 [DEBUG] uris.jsm: msgIdentificationFromUrl: url.pathQueryRef=/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.350 [DEBUG] uris.jsm: msgIdentificationFromUrl: msgNum=35156 / folder=/fetch>UID>/INBOX
2018-09-09 17:40:01.350 [DEBUG] enigmailMsgHdrViewOverlay.js: EnigMimeHeaderSink.isCurrentMessage: url=imap://user@imap.domain.tld:993/fetch%3EUID%3E/INBOX%3E35156
2018-09-09 17:40:01.350 [DEBUG] enigmailMsgHdrViewOverlay.js: EnigMimeHeaderSink.isCurrentMessage: true
2018-09-09 17:40:01.350 [DEBUG] enigmailMsgHdrViewOverlay.js: this.updateHdrIcons: exitCode=undefined, statusFlags=6359040, keyId=, userId=,
2018-09-09 17:40:01.350 [DEBUG] enigmailMessengerOverlay.js: createArtificialAutocryptHeader
2018-09-09 17:40:01.350 [DEBUG] enigmailMsgHdrViewOverlay.js: this.updateMsgDb
2018-09-09 17:40:01.350 [DEBUG] mimeDecrypt.jsm: returnData: 0 bytes
2018-09-09 17:40:01.352 [DEBUG] mimeDecrypt.jsm: onStopRequest: process terminated
2018-09-09 17:40:01.358 [DEBUG] enigmailMsgHdrViewOverlay.js: this.messageLoad
2018-09-09 17:40:01.358 [DEBUG] enigmailMessengerOverlay.js: messageAutoDecrypt:
2018-09-09 17:40:01.358 [DEBUG] enigmailMessengerOverlay.js: messageDecrypt: null
2018-09-09 17:40:01.358 [DEBUG] enigmailMessengerOverlay.js: movePEPsubject:
2018-09-09 17:40:01.358 [DEBUG] windows.jsm: getFrame: user@domain.tld=messagepane
2018-09-09 17:40:01.358 [DEBUG] enigmailMessengerOverlay.js: messageDecryptCb:
2018-09-09 17:40:01.358 [DEBUG] enigmailMessengerOverlay.js: messageDecryptCb: mimeMsg is null
2018-09-09 17:40:01.360 [DEBUG] enigmailMessengerOverlay.js: header content-transfer-encoding: ''
2018-09-09 17:40:01.360 [DEBUG] enigmailMessengerOverlay.js: header x-enigmail-version: ''
2018-09-09 17:40:01.360 [DEBUG] enigmailMessengerOverlay.js: header x-pgp-encoding-format: ''
2018-09-09 17:40:01.360 [DEBUG] enigmailMessengerOverlay.js: header autocrypt-setup-message: ''
2018-09-09 17:40:01.362 [DEBUG] autocrypt.jsm: processAutocryptHeader(): from==?UTF-8?Q?name?= <user@domain.tld>
2018-09-09 17:40:01.364 [DEBUG] autocrypt.jsm: openAutocryptDb()
2018-09-09 17:40:01.364 [DEBUG] autocrypt.jsm: _openAutocryptDb_inner()
2018-09-09 17:40:01.372 [DEBUG] autocrypt.jsm: checkDatabaseStructure
2018-09-09 17:40:01.372 [DEBUG] autocrypt.jsm: checkDatabaseStructure - success
2018-09-09 17:40:01.372 [DEBUG] autocrypt.jsm: findUserRecord
2018-09-09 17:40:01.372 [DEBUG] autocrypt.jsm: findUserRecord - got row
2018-09-09 17:40:01.372 [DEBUG] autocrypt.jsm: got 1 rows
2018-09-09 17:40:01.372 [DEBUG] autocrypt.jsm: updateUser
2018-09-09 17:40:01.372 [DEBUG] autocrypt.jsm: updateUser: not a new latest message
2018-09-09 17:40:01.374 [DEBUG] autocrypt.jsm: OK - closing connection
2018-09-09 17:40:05.090 [DEBUG] enigmailMessengerOverlay.js: updateOptionsDisplay:
2018-09-09 17:40:05.090 [DEBUG] funcs.jsm: collapseAdvanced:
2018-09-09 17:40:08.244 [DEBUG] enigmailMessengerOverlay.js: updateOptionsDisplay:
2018-09-09 17:40:08.244 [DEBUG] funcs.jsm: collapseAdvanced:
2018-09-09 17:40:09.776 [DEBUG] enigmailHelp.js: enigLoadPage
2018-09-09 17:40:09.778 [DEBUG] windows.jsm: getFrame: user@domain.tld=contentFrame
自从我的原始帖子以来,我进行了进一步的调查,这是我的发现。
我已从Thunderbird中将加密的电子邮件保存到桌面,然后尝试使用以下命令将其解密:
gpg -d -vvv encrypted.eml
这是结果有趣的部分:
gpg: pinentry launched (18664 gnome3 1.1.0 /dev/pts/0 xterm-256color :0.0)
# off=798 ctb=d2 tag=18 hlen=2 plen=0 partial new-ctb
:encrypted data packet:
length: unknown
mdc_method: 2
它说已经启动了pinentry,但是在任何地方都没有pinentry窗口,或者在终端提示输入密码...
然后我尝试通过在$ HOME / .gnupg / gpg-agent.conf中添加此行来更改默认的pinentry程序
pinentry-program /usr/bin/pinentry-gtk-2
并重新加载gpg-connect-agent:
gpg-connect-agent reloadagent /bye
我试图再次解密电子邮件:
gpg -d -vvv encrypted.eml
我们可以看到pinentry程序已更改,但仍然无法输入密码...
gpg: pinentry launched (18739 gtk2 1.1.0 /dev/pts/0 xterm-256color :0.0)
# off=798 ctb=d2 tag=18 hlen=2 plen=0 partial new-ctb
:encrypted data packet:
length: unknown
mdc_method: 2
我终于按照以下方法在终端中成功输入了密码:
我已经安装了pinentry-tty
sudo apt install pinentry-tty
我通过在$ HOME / .gnupg / gpg-agent.conf中添加此行来更改默认的pinentry程序
pinentry-program /usr/bin/pinentry-tty
并重新加载gpg-connect-agent:
gpg-connect-agent reloadagent /bye
我试图再次解密电子邮件:
gpg -d -vvv encrypted.eml
最后,pinentry在终端中要求输入密码,并且电子邮件已正确解密。
然后,我打开了Thunderbird,并且能够解密所有加密的消息。
所以在这个阶段,我可以说pinentry-tty在起作用,但pinentry-gnome3和pinentry-gtk2却不起作用。
我还尝试安装和使用pinentry-qt,但是Enigmail向我发送了一条错误消息,指出pinentry无法正常工作。
然后,我决定安装use pinentry-fltk,它可以工作。当我在Thunderbird中单击加密的邮件时,会打开一个(非常丑陋的)窗口,我可以输入密码并解密电子邮件。
对我来说,这只是一种解决方法。我想了解为什么我不能使用 pinentry-gtk2。
感谢您的帮助