[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with
From: |
Eli Zaretskii |
Subject: |
bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME |
Date: |
Wed, 15 Nov 2023 16:02:21 +0200 |
> From: Ulrich Mueller <ulm@gentoo.org>
> Date: Thu, 09 Nov 2023 07:56:47 +0100
>
> I was originally trying to sign e-mail messages with S/MIME using
> mml-secure-sign-smime followed by message-send, which fails when I
> customize epg-pinentry-mode as loopback.
>
> The problem also occurs with epa-sign-file, which is easier to reproduce
> (because it doesn't need as much configuration). So I am reporting the
> bug for this command.
>
> To reproduce, emacs -Q, then execute in the *scratch* buffer:
>
> (write-region "hello\n" nil "hello.txt")
> (require 'epa)
>
> (let ((epg-pinentry-mode 'loopback)
> (epa-protocol 'CMS))
> (epa-sign-file
> "hello.txt"
> (epa-select-keys (epg-make-context epa-protocol) "Key:" nil t)
> 'normal))
>
> This asks interactively to select a key. After doing so, it fails with
> the following error (shown in an "*Error* (EPA Info)" buffer):
>
> Error while signing with "/usr/bin/gpgsm":
>
> gpgsm: ignoring gpg-agent inquiry 'PASSPHRASE'
> gpgsm: error creating signature: No passphrase given <GPG Agent>
>
> Debugger *Backtrace* (key IDs x-ed out):
>
> Debugger entered--Lisp error: (epg-error "Sign failed" "")
> signal(epg-error ("Sign failed" ""))
> epa-sign-file("hello.txt" (#s(epg-key :owner-trust nil :sub-key-list
> (#s(epg-sub-key :validity nil :capability (encrypt sign) :secret-p nil
> :algorithm 1 :length 4096 :id "XXXXXXXXXXXXXXXX" :creation-time 20231107
> :expiration-time 20251106 :fingerprint
> "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")) :user-id-list (#s(epg-user-id
> :validity nil :string (("CN" . "Ulrich Müller") ("OU" . "Institut fuer
> Kernphysik") ("O" . "Johannes Gutenberg-Universitaet Mainz") ("L" . "Mainz")
> ("ST" . "Rheinland-Pfalz") ("C" . "DE")) :signature-list nil) #s(epg-user-id
> :validity nil :string "<ulm@uni-mainz.de>" :signature-list nil)))) normal)
> (let ((epg-pinentry-mode 'loopback) (epa-protocol 'CMS)) (epa-sign-file
> "hello.txt" (epa-select-keys (epg-make-context epa-protocol) "Key:" nil t)
> 'normal))
> (progn (let ((epg-pinentry-mode 'loopback) (epa-protocol 'CMS))
> (epa-sign-file "hello.txt" (epa-select-keys (epg-make-context epa-protocol)
> "Key:" nil t) 'normal)))
> eval((progn (let ((epg-pinentry-mode 'loopback) (epa-protocol 'CMS))
> (epa-sign-file "hello.txt" (epa-select-keys (epg-make-context epa-protocol)
> "Key:" nil t) 'normal))) t)
> elisp--eval-last-sexp(t)
> eval-last-sexp(t)
> eval-print-last-sexp(nil)
> funcall-interactively(eval-print-last-sexp nil)
> call-interactively(eval-print-last-sexp nil nil)
> command-execute(eval-print-last-sexp)
>
> When I change epg-pinentry-mode to ask or epa-protocol to OpenPGP in
> the let-binding, things work as expected. In other words, only the
> combination of S/MIME and pinentry loopback fails.
>
> | | OpenPGP | CMS |
> |----------+---------+-------|
> | ask | works | works |
> | loopback | works | fails |
>
> I use pinentry-gnome3, in case this should matter:
>
> $ readlink /usr/bin/pinentry
> pinentry-gnome3
Michael, could you please look into this?
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Ulrich Mueller, 2023/11/09
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME,
Eli Zaretskii <=
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Michael Albinus, 2023/11/15
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Michael Albinus, 2023/11/15
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Eli Zaretskii, 2023/11/15
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Michael Albinus, 2023/11/15
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Ulrich Mueller, 2023/11/16
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Ulrich Mueller, 2023/11/17
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Eli Zaretskii, 2023/11/19
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Ulrich Mueller, 2023/11/19
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Eli Zaretskii, 2023/11/25
- bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME, Ulrich Mueller, 2023/11/25