* 23.0.60; EasyPG and OpenPGP smartcard: process epg not running
@ 2008-03-07 1:40 Luca Capello
2008-03-07 3:03 ` Daiki Ueno
0 siblings, 1 reply; 5+ messages in thread
From: Luca Capello @ 2008-03-07 1:40 UTC (permalink / raw)
To: emacs-pretest-bug; +Cc: rfrancoise
[-- Attachment #1: Type: text/plain, Size: 6078 bytes --]
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
Hello,
please Cc: me, I'm not subscribed to the list.
I cannot use the EasyPG interface with my OpenPGP smartcard [1] and the
OmniKey CardMan 6121 USB [2]: the light on the reader blinks, EasyPG
asks me for the passphrase and then it gives the error below. It
doesn't matter if the passphrase is correct or not and indeed the one
included in the debug message is wrong.
FWIW, gnus/pgg works without any problem with the same smartcard and
reader.
Thx, bye,
Gismo / Luca
Footnotes:
[1] http://www.g10code.de/p-card.html
[2] http://omnikey.aaitg.com/index.php?id=products&tx_okprod_pi1[product]=29
=====
Debugger entered--Lisp error: (error "Process epg not running")
process-send-string(#<process epg> "123456\n")
byte-code("Æ\b!:\x0e\0Æ\b!@\x11\0Æ\b!\b Æ\b!:
\x1e\0Æ\b!A#\x12
M\0\nÇP\x13È\n!É\x12\fC\0Ê\vË\fÌ\"\"\x15È\v!É\x13G\0\v\x15É\x13ÍÎ\b!\r\""
[context epg-key-id passphrase passphrase-with-new-line epg-passphrase-coding-system encoded-passphrase-with-new-line epg-context-passphrase-callback
"\n" epg--clear-string nil epg--encode-coding-string coding-system-change-eol-conversion unix process-send-string epg-context-process] 6)
epg--status-GET_HIDDEN((epg-context . [OpenPGP nil nil nil nil nil nil epa-passphrase-callback-function (epa-progress-callback-function . "Signing...")
nil nil #<process epg> "/tmp/epg-output4587D7V" nil sign]) "passphrase.pin.ask")
epg--process-filter(#<process epg> "[GNUPG:] NEED_PASSPHRASE_PIN OPENPGP 1 D276000124010101000100000E5E0000/C7FD4E97DD7F596290E2839167038CB168440D33\ngpg:
gpg-agent is not available in this session\n[GNUPG:] GET_HIDDEN passphrase.pin.ask\n[GNUPG:] GOT_IT\ngpg: PIN for CHV1 is too short; minimum length is
6\n[GNUPG:] SC_OP_FAILURE 2\ngpg: signing failed: bad passphrase\n")
accept-process-output(#<process epg> 1)
epg-wait-for-completion((epg-context . [OpenPGP nil nil nil nil nil nil epa-passphrase-callback-function (epa-progress-callback-function . "Signing...")
nil nil #<process epg> "/tmp/epg-output4587D7V" nil sign]))
epg-sign-string((epg-context . [OpenPGP nil nil nil nil nil nil epa-passphrase-callback-function (epa-progress-callback-function . "Signing...") nil nil
#<process epg> "/tmp/epg-output4587D7V" nil sign]) "imap run *nnimap* pca.it /bin/bash -c gnutls-cli -p 993 pca.it\nielm run
*ielm* /dev/pts/4 hexl\n" clear)
epa-sign-region(79 186 nil clear)
call-interactively(epa-sign-region t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
=====
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.0.60/etc/DEBUG for instructions.
In GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu)
of 2008-02-28 on elegiac, modified by Debian
(emacs-snapshot package, version 1:20080228-1)
configured using `configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.0.60/leim' '--with-x=no' '--without-dbus' '--without-sound' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Group
Minor modes in effect:
gnus-topic-mode: t
gnus-undo-mode: t
gpm-mouse-mode: t
display-battery-mode: t
display-time-mode: t
show-paren-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
ESC b ESC b ESC b ESC b ESC b ESC b ESC b ESC b ESC
b ESC b ESC b ESC b ESC b ESC b ESC b ESC b ESC b ESC
b ESC b ESC b ESC b ESC b ESC b ESC b ESC b ESC b ESC
b ESC b ESC b ESC b ESC b ESC b ESC b ESC b ESC b ESC
b ESC b ESC b ESC b ESC [ 1 ; 3 B ESC [ B ESC [ B C-e
C-a ESC [ C ESC [ C RET ESC [ B ESC [ B ESC [ B ESC
[ C ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C
ESC [ C ESC [ C ESC [ A ESC [ C ESC [ C ESC [ C ESC
[ C ESC [ C ESC [ C C-x o ESC [ A ESC [ A ESC [ A ESC
[ A ESC [ A ESC [ A C-a C-@ ESC [ B ESC [ B ESC [ B
ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC
[ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC w C-c
ESC f g C-x b RET C-x k RET y C-x b RET g C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p RET q ESC [ B ESC [ A ESC x e m a TAB p DEL b u
TAB TAB DEL DEL DEL DEL DEL DEL DEL DEL r e p o TAB
r t TAB e m TAB b u TAB RET
Recent messages:
Saving /home/luca/.newsrc.eld...
Saving file /home/luca/.newsrc.eld...
Wrote /home/luca/.newsrc.eld
Saving /home/luca/.newsrc.eld...done
Retrieving newsgroup: nnimap+pca.it:INBOX...
nnimap: Updating info for nnimap+pca.it:INBOX...done
Fetching headers for nnimap+pca.it:INBOX...done
Generating summary...done
Exiting summary buffer and applying spam rules
Making completion list...
[-- Attachment #2: Type: application/pgp-signature, Size: 306 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 23.0.60; EasyPG and OpenPGP smartcard: process epg not running
2008-03-07 1:40 23.0.60; EasyPG and OpenPGP smartcard: process epg not running Luca Capello
@ 2008-03-07 3:03 ` Daiki Ueno
2008-03-07 10:07 ` Luca Capello
0 siblings, 1 reply; 5+ messages in thread
From: Daiki Ueno @ 2008-03-07 3:03 UTC (permalink / raw)
To: Luca Capello; +Cc: emacs-pretest-bug, rfrancoise
>>>>> In <87od9r5n1y.fsf@gismo.pca.it>
>>>>> Luca Capello <luca@pca.it> wrote:
> I cannot use the EasyPG interface with my OpenPGP smartcard [1] and the
> OmniKey CardMan 6121 USB [2]: the light on the reader blinks, EasyPG
> asks me for the passphrase and then it gives the error below. It
> doesn't matter if the passphrase is correct or not and indeed the one
> included in the debug message is wrong.
Unfortunately I don't have OpenPGP card, I should have to do remote
debugging...
> epg--process-filter(#<process epg> "[GNUPG:] NEED_PASSPHRASE_PIN OPENPGP 1 D276000124010101000100000E5E0000/C7FD4E97DD7F596290E2839167038CB168440D33\ngpg:
> gpg-agent is not available in this session\n[GNUPG:] GET_HIDDEN passphrase.pin.ask\n[GNUPG:] GOT_IT\ngpg: PIN for CHV1 is too short; minimum length is
> 6\n[GNUPG:] SC_OP_FAILURE 2\ngpg: signing failed: bad passphrase\n")
This looks like that GnuPG got some data (not a passphrase) as the
passphrase, before prompting you. Can you work around this by:
(setq epg-gpg-minimum-version "100")
Regards,
--
Daiki Ueno
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 23.0.60; EasyPG and OpenPGP smartcard: process epg not running
2008-03-07 3:03 ` Daiki Ueno
@ 2008-03-07 10:07 ` Luca Capello
2008-03-10 9:12 ` Daiki Ueno
0 siblings, 1 reply; 5+ messages in thread
From: Luca Capello @ 2008-03-07 10:07 UTC (permalink / raw)
To: emacs-pretest-bug; +Cc: rfrancoise
Hi Daiki!
Still please Cc: me, I'm not subscribed to the list ;-)
BTW, AFAIK there's no mailing list for EasyPG, thus I reported the bug
here. In case I'm wrong, could you point me to the correct direction?
On Fri, 07 Mar 2008 04:03:25 +0100, Daiki Ueno wrote:
> This looks like that GnuPG got some data (not a passphrase) as the
> passphrase, before prompting you. Can you work around this by:
>
> (setq epg-gpg-minimum-version "100")
This solves the situation for `epa-sign-region'.
However, there was another problem, which I erroneously thought it was
due to the same error (my fault). If I try to sign mail on Gnus with
EasyPG, I got another error. It seems the problem is in the function
`mml2015-epg-passphrase-callback` (lisp/gnus/mml2015.el:1004).
Thx, bye,
Gismo / Luca
=====
Debugger entered--Lisp error: (wrong-type-argument stringp PIN)
signal(wrong-type-argument (stringp PIN))
(condition-case error (setq signature (epg-sign-string context ... t) mml2015-epg-secret-key-id-list nil)
(error (while mml2015-epg-secret-key-id-list ... ...) (signal ... ...)))
(let* ((inhibit-redisplay t) (context ...) (boundary ...) signer-key (signers ...) signature micalg)
(epg-context-set-armor context t) (epg-context-set-textmode context t) (epg-context-set-signers context signers)
(if mml2015-cache-passphrase (epg-context-set-passphrase-callback context ...)) (condition-case error
(setq signature ... mml2015-epg-secret-key-id-list nil) (error ... ...)) (if (epg-context-result-for context ...)
(setq micalg ...)) (goto-char (point-min)) (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n" boundary))
(if micalg (insert ...)) (insert "protocol=\"application/pgp-signature\"\n") (insert (format "\n--%s\n" boundary))
(goto-char (point-max)) (insert (format "\n--%s\n" boundary)) (insert "Content-Type: application/pgp-signature\n\n")
(insert signature) (goto-char (point-max)) (insert (format "--%s--\n" boundary)) (goto-char (point-max)))
mml2015-epg-sign((part (sign . "pgpmime") (tag-location . 269) (contents . "test\n")))
funcall(mml2015-epg-sign (part (sign . "pgpmime") (tag-location . 269) (contents . "test\n")))
(if func (funcall func cont) (error "Cannot find sign function"))
(let ((func ...)) (if func (funcall func cont) (error "Cannot find sign function")))
mml2015-sign((part (sign . "pgpmime") (tag-location . 269) (contents . "test\n")))
mml-pgpmime-sign-buffer((part (sign . "pgpmime") (tag-location . 269) (contents . "test\n")))
mml-generate-mime-1((part (sign . "pgpmime") (tag-location . 269) (contents . "test\n")))
mml-generate-mime()
message-encode-message-body()
message-send-mail(nil)
message-send-via-mail(nil)
message-send(nil)
message-send-and-exit(nil)
call-interactively(message-send-and-exit nil nil)
=====
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 23.0.60; EasyPG and OpenPGP smartcard: process epg not running
2008-03-07 10:07 ` Luca Capello
@ 2008-03-10 9:12 ` Daiki Ueno
2008-03-11 6:36 ` Luca Capello
0 siblings, 1 reply; 5+ messages in thread
From: Daiki Ueno @ 2008-03-10 9:12 UTC (permalink / raw)
To: Luca Capello; +Cc: emacs-pretest-bug, rfrancoise
>>>>> In <87hcfi4zkw.fsf@gismo.pca.it>
>>>>> Luca Capello <luca@pca.it> wrote:
> BTW, AFAIK there's no mailing list for EasyPG, thus I reported the bug
> here. In case I'm wrong, could you point me to the correct direction?
There is a bug tracker: http://sourceforge.jp/projects/epg/tracker/
But I think here is also the right place.
> > This looks like that GnuPG got some data (not a passphrase) as the
> > passphrase, before prompting you. Can you work around this by:
> >
> > (setq epg-gpg-minimum-version "100")
> This solves the situation for `epa-sign-region'.
Then, it seems a GnuPG issue. I'll look into the detail.
> However, there was another problem, which I erroneously thought it was
> due to the same error (my fault). If I try to sign mail on Gnus with
> EasyPG, I got another error. It seems the problem is in the function
> `mml2015-epg-passphrase-callback` (lisp/gnus/mml2015.el:1004).
I've just applied the following fix to the Gnus CVS. It will appear
after the next CVS synch.
Index: mml2015.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/mml2015.el,v
retrieving revision 7.52
retrieving revision 7.53
diff -c -r7.52 -r7.53
*** mml2015.el 2 Mar 2008 17:43:01 -0000 7.52
--- mml2015.el 10 Mar 2008 08:59:56 -0000 7.53
***************
*** 999,1005 ****
(defun mml2015-epg-passphrase-callback (context key-id ignore)
(if (eq key-id 'SYM)
(epg-passphrase-callback-function context key-id nil)
! (let* (entry
(passphrase
(password-read
(if (eq key-id 'PIN)
--- 999,1009 ----
(defun mml2015-epg-passphrase-callback (context key-id ignore)
(if (eq key-id 'SYM)
(epg-passphrase-callback-function context key-id nil)
! (let* ((password-cache-key-id
! (if (eq key-id 'PIN)
! "PIN"
! key-id))
! entry
(passphrase
(password-read
(if (eq key-id 'PIN)
***************
*** 1007,1020 ****
(if (setq entry (assoc key-id epg-user-id-alist))
(format "Passphrase for %s %s: " key-id (cdr entry))
(format "Passphrase for %s: " key-id)))
! (if (eq key-id 'PIN)
! "PIN"
! key-id))))
(when passphrase
(let ((password-cache-expiry mml2015-passphrase-cache-expiry))
! (password-cache-add key-id passphrase))
(setq mml2015-epg-secret-key-id-list
! (cons key-id mml2015-epg-secret-key-id-list))
(copy-sequence passphrase)))))
(defun mml2015-epg-find-usable-key (keys usage)
--- 1011,1022 ----
(if (setq entry (assoc key-id epg-user-id-alist))
(format "Passphrase for %s %s: " key-id (cdr entry))
(format "Passphrase for %s: " key-id)))
! password-cache-key-id)))
(when passphrase
(let ((password-cache-expiry mml2015-passphrase-cache-expiry))
! (password-cache-add password-cache-key-id passphrase))
(setq mml2015-epg-secret-key-id-list
! (cons password-cache-key-id mml2015-epg-secret-key-id-list))
(copy-sequence passphrase)))))
(defun mml2015-epg-find-usable-key (keys usage)
Regards,
--
Daiki Ueno
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 23.0.60; EasyPG and OpenPGP smartcard: process epg not running
2008-03-10 9:12 ` Daiki Ueno
@ 2008-03-11 6:36 ` Luca Capello
0 siblings, 0 replies; 5+ messages in thread
From: Luca Capello @ 2008-03-11 6:36 UTC (permalink / raw)
To: emacs-pretest-bug; +Cc: rfrancoise
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
Hi Daiki!
On Mon, 10 Mar 2008 10:12:07 +0100, Daiki Ueno wrote:
>>>>>> In <87hcfi4zkw.fsf@gismo.pca.it>
>>>>>> Luca Capello <luca@pca.it> wrote:
>> However, there was another problem, which I erroneously thought it was
>> due to the same error (my fault). If I try to sign mail on Gnus with
>> EasyPG, I got another error. It seems the problem is in the function
>> `mml2015-epg-passphrase-callback` (lisp/gnus/mml2015.el:1004).
>
> I've just applied the following fix to the Gnus CVS.
This indeed fix the gnus/epg problem.
However, I'd prefer to have a more verbose prompt, something like "PIN
for 0x9DDB992B: " instead of a general "Passphrase for PIN: ", since
what I enter is not really a passphrase ;-)
Thx, bye,
Gismo / Luca
[-- Attachment #2: Type: application/pgp-signature, Size: 306 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-11 6:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-07 1:40 23.0.60; EasyPG and OpenPGP smartcard: process epg not running Luca Capello
2008-03-07 3:03 ` Daiki Ueno
2008-03-07 10:07 ` Luca Capello
2008-03-10 9:12 ` Daiki Ueno
2008-03-11 6:36 ` Luca Capello
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.