* Problems with signing Mails
@ 2003-02-25 9:11 Frank Küster
2003-02-25 13:27 ` Simon Josefsson
0 siblings, 1 reply; 12+ messages in thread
From: Frank Küster @ 2003-02-25 9:11 UTC (permalink / raw)
Hi,
When I compose a short message to myself and then choose PGP sign, I get
an error.
It asks me for my Passphrase, and then I get an error message with the
following backtrace:
Debugger entered--Lisp error: (error "gpg exited abnormally: '2'")
signal(error ("gpg exited abnormally: '2'"))
error("%s exited abnormally: '%s'" "gpg" 2)
pgg-gpg-process-region(1 9 "XXXXXXXXXXXXX" "gpg" ("--clearsign" "--armor" "--batch" "--verbose" "--local-user" "frank@kuesterei.ch"))
pgg-gpg-sign-region(1 8 t)
funcall(pgg-gpg-sign-region 1 8 t)
apply(funcall pgg-gpg-sign-region (1 8 t))
pgg-invoke("sign-region" gpg 1 8 t)
pgg-sign-region(1 8 t)
mml1991-pgg-sign((part (sign . "pgp") (tag-location . 288) (contents . "asldfk\n")))
mml1991-sign((part (sign . "pgp") (tag-location . 288) (contents . "asldfk\n")))
mml-pgp-sign-buffer((part (sign . "pgp") (tag-location . 288) (contents . "asldfk\n")))
mml-generate-mime-1((part (sign . "pgp") (tag-location . 288) (contents . "asldfk\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)
I controlled that I didn't mistype the Passphrase before changing it to
XXXXXXXX. The same happens when I start emacs with -q --no-site-file,
then load-library gnus-load and then M-x gnus. I have just switched from
Gnus 5.9.0 in GNU Emacs to Oort Gnus v0.15, so perhaps there's something
wrong in my ~/.gnus¹. But I couldn't figure out. emacs-version is 21.2.1.
What could I do?
¹but does that get loaded with -q --no-site-file? It seems no, because
then Gnus doesn't find new mail and news.
--
Dr. Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Problems with signing Mails
2003-02-25 9:11 Problems with signing Mails Frank Küster
@ 2003-02-25 13:27 ` Simon Josefsson
2003-02-25 14:20 ` Bug in pgg-gpg-process-region (was: Problems with signing Mails) Frank Küster
0 siblings, 1 reply; 12+ messages in thread
From: Simon Josefsson @ 2003-02-25 13:27 UTC (permalink / raw)
Cc: ding
frank@kuesterei.ch (Frank Küster) writes:
> Hi,
>
> When I compose a short message to myself and then choose PGP sign, I get
> an error.
>
> It asks me for my Passphrase, and then I get an error message with the
> following backtrace:
>
> Debugger entered--Lisp error: (error "gpg exited abnormally: '2'")
> signal(error ("gpg exited abnormally: '2'"))
> error("%s exited abnormally: '%s'" "gpg" 2)
> pgg-gpg-process-region(1 9 "XXXXXXXXXXXXX" "gpg" ("--clearsign" "--armor" "--batch" "--verbose" "--local-user" "frank@kuesterei.ch"))
Is your GnuPG configuration kosher? Can you sign on the command line?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Bug in pgg-gpg-process-region (was: Problems with signing Mails)
2003-02-25 13:27 ` Simon Josefsson
@ 2003-02-25 14:20 ` Frank Küster
2003-02-27 16:51 ` Bug in pgg-gpg-process-region Frank Küster
0 siblings, 1 reply; 12+ messages in thread
From: Frank Küster @ 2003-02-25 14:20 UTC (permalink / raw)
Simon Josefsson <jas@extundo.com> schrieb:
> frank@kuesterei.ch (Frank Küster) writes:
>
>> Hi,
>>
>> When I compose a short message to myself and then choose PGP sign, I get
>> an error.
>>
>> It asks me for my Passphrase, and then I get an error message with the
>> following backtrace:
>>
>> Debugger entered--Lisp error: (error "gpg exited abnormally: '2'")
>> signal(error ("gpg exited abnormally: '2'"))
>> error("%s exited abnormally: '%s'" "gpg" 2)
>> pgg-gpg-process-region(1 9 "XXXXXXXXXXXXX" "gpg" ("--clearsign" "--armor" "--batch" "--verbose" "--local-user" "frank@kuesterei.ch"))
>
> Is your GnuPG configuration kosher? Can you sign on the command line?
Yes, without problems.
I now found out where the error comes from. The passphrase that Gnus
passes to gpg should be enclosed in '' to prevent any shell action on
it.
Try
~$ echo "hel$lo"
vs.
~$ echo 'hel$lo'
Seen the problem? I found it out by trying
~$ echo "Mypass$phrase" | gpg --status-fd 2 --passphrase-fd 0 \
--output gpg.out --clearsign --armor --batch --verbose \
--local-user frank@kuesterei.ch netenv.conf; echo $?
which should be exactly the call Gnus does. With echo 'Mypass$phrase' it
works. But I guess it's better to check with any character that's
allowed in passphrases. I checked that redirection signs are no problem.
Unfortunately, I do not dare to code this in Lisp, so I can't provide a
patch.
Bye, Frank
--
Dr. Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug in pgg-gpg-process-region
2003-02-25 14:20 ` Bug in pgg-gpg-process-region (was: Problems with signing Mails) Frank Küster
@ 2003-02-27 16:51 ` Frank Küster
2003-02-27 21:44 ` Kai Großjohann
2003-02-27 23:56 ` Satyaki Das
0 siblings, 2 replies; 12+ messages in thread
From: Frank Küster @ 2003-02-27 16:51 UTC (permalink / raw)
frank@kuesterei.ch (Frank Küster) wrote:
Since nobody answered so far, let me try to clarify a little. Perhaps my
first mail was a little confuse.
> ~$ echo "Mypass$phrase" | gpg --status-fd 2 --passphrase-fd 0 \
> --output gpg.out --clearsign --armor --batch --verbose \
> --local-user frank@kuesterei.ch netenv.conf; echo $?
>
> which should be exactly the call Gnus does.
This was what I, with limited Lisp knowlegde, found out that the call
would be that Gnus makes, except that it doesn't need echo. (I forgot
the --detach-sign, but that shouldn't make a difference.)
And exactly this call fails as soon as there is a $ sign in the
passphrase. I do not know in fact wether that has anything to do with
shell expansion. However, I just created a throw-away-key with the
passphrase "Hallo", and I could sign without an error; with my real one,
I still cannot.
Bye, Frank
--
Dr. Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug in pgg-gpg-process-region
2003-02-27 16:51 ` Bug in pgg-gpg-process-region Frank Küster
@ 2003-02-27 21:44 ` Kai Großjohann
2003-02-28 9:39 ` Frank Küster
2003-02-27 23:56 ` Satyaki Das
1 sibling, 1 reply; 12+ messages in thread
From: Kai Großjohann @ 2003-02-27 21:44 UTC (permalink / raw)
frank@kuesterei.ch (Frank Küster) writes:
> And exactly this call fails as soon as there is a $ sign in the
> passphrase. I do not know in fact wether that has anything to do with
> shell expansion. However, I just created a throw-away-key with the
> passphrase "Hallo", and I could sign without an error; with my real one,
> I still cannot.
I presume shell quoting issues. You can start a process from within
Emacs with start-process. I suggest that you use M-x ielm RET to
execute Lisp statements. Then you can do the start-process. Store
the result in a variable. Then you can use that process to send it
some data using process-send-string.
(setq x (start-process "gpg-test" (get-buffer-create "*gpg-test*")
"gpg" "arg1" "arg2" ...))
(process-send-string x "pass$phrase\n")
Something like this. Maybe you can snarf the start-process thingy
from the Gnus Lisp code.
--
A preposition is not a good thing to end a sentence with.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug in pgg-gpg-process-region
2003-02-27 21:44 ` Kai Großjohann
@ 2003-02-28 9:39 ` Frank Küster
2003-02-28 13:04 ` Kai Großjohann
0 siblings, 1 reply; 12+ messages in thread
From: Frank Küster @ 2003-02-28 9:39 UTC (permalink / raw)
Cc: ding
kai.grossjohann@uni-duisburg.de (Kai Großjohann) schrieb:
> frank@kuesterei.ch (Frank Küster) writes:
>
>> And exactly this call fails as soon as there is a $ sign in the
>> passphrase. I do not know in fact wether that has anything to do with
>> shell expansion. However, I just created a throw-away-key with the
>> passphrase "Hallo", and I could sign without an error; with my real one,
>> I still cannot.
>
> I presume shell quoting issues.
No it seems it's rather character encoding.
> You can start a process from within
> Emacs with start-process. I suggest that you use M-x ielm RET to
> execute Lisp statements. Then you can do the start-process. Store
> the result in a variable. Then you can use that process to send it
> some data using process-send-string.
I do not understand anything of this. What should I do? M-x ielm RET and
then type the lines above? Why not eval-region?
> (setq x (start-process "gpg-test" (get-buffer-create "*gpg-test*")
> "gpg" "arg1" "arg2" ...))
> (process-send-string x "pass$phrase\n")
>
> Something like this. Maybe you can snarf the start-process thingy
> from the Gnus Lisp code.
It's start-process-region.
Bye, Frank
--
Dr. Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug in pgg-gpg-process-region
2003-02-28 9:39 ` Frank Küster
@ 2003-02-28 13:04 ` Kai Großjohann
0 siblings, 0 replies; 12+ messages in thread
From: Kai Großjohann @ 2003-02-28 13:04 UTC (permalink / raw)
frank@kuesterei.ch (Frank Küster) writes:
> kai.grossjohann@uni-duisburg.de (Kai Großjohann) schrieb:
>
>> frank@kuesterei.ch (Frank Küster) writes:
>>
>>> And exactly this call fails as soon as there is a $ sign in the
>>> passphrase. I do not know in fact wether that has anything to do with
>>> shell expansion. However, I just created a throw-away-key with the
>>> passphrase "Hallo", and I could sign without an error; with my real one,
>>> I still cannot.
>>
>> I presume shell quoting issues.
>
> No it seems it's rather character encoding.
Yeah, I saw another message. But try the following two commands in a
shell some day and then you will see why I thought it might be a
shell quoting issue:
echo "foo$HOME"
echo 'foo$HOME'
>> You can start a process from within
>> Emacs with start-process. I suggest that you use M-x ielm RET to
>> execute Lisp statements. Then you can do the start-process. Store
>> the result in a variable. Then you can use that process to send it
>> some data using process-send-string.
>
> I do not understand anything of this. What should I do? M-x ielm RET and
> then type the lines above? Why not eval-region?
It's a matter of taste, mostly. I like the way that ielm presents me
the input and output.
In principle, eval-region or M-: should also work.
>> (setq x (start-process "gpg-test" (get-buffer-create "*gpg-test*")
>> "gpg" "arg1" "arg2" ...))
>> (process-send-string x "pass$phrase\n")
>>
>> Something like this. Maybe you can snarf the start-process thingy
>> from the Gnus Lisp code.
>
> It's start-process-region.
OK.
--
A preposition is not a good thing to end a sentence with.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug in pgg-gpg-process-region
2003-02-27 16:51 ` Bug in pgg-gpg-process-region Frank Küster
2003-02-27 21:44 ` Kai Großjohann
@ 2003-02-27 23:56 ` Satyaki Das
2003-02-28 9:37 ` Frank Küster
1 sibling, 1 reply; 12+ messages in thread
From: Satyaki Das @ 2003-02-27 23:56 UTC (permalink / raw)
frank@kuesterei.ch (Frank Küster) writes:
> frank@kuesterei.ch (Frank Küster) wrote:
>
> Since nobody answered so far, let me try to clarify a little. Perhaps my
> first mail was a little confuse.
>
>> ~$ echo "Mypass$phrase" | gpg --status-fd 2 --passphrase-fd 0 \
>> --output gpg.out --clearsign --armor --batch --verbose \
>> --local-user frank@kuesterei.ch netenv.conf; echo $?
>>
>> which should be exactly the call Gnus does.
I don't think the "$" char is the problem. I tried changing my
passphrase to contain a "$" and everything still worked. Do you
have non-ASCII characters in your passphrase?
Satyaki
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug in pgg-gpg-process-region
2003-02-27 23:56 ` Satyaki Das
@ 2003-02-28 9:37 ` Frank Küster
2003-02-28 18:04 ` Satyaki Das
0 siblings, 1 reply; 12+ messages in thread
From: Frank Küster @ 2003-02-28 9:37 UTC (permalink / raw)
Cc: ding
Satyaki Das <satyaki@chicory.stanford.edu> schrieb:
> frank@kuesterei.ch (Frank Küster) writes:
>
>> frank@kuesterei.ch (Frank Küster) wrote:
>>
>> Since nobody answered so far, let me try to clarify a little. Perhaps my
>> first mail was a little confuse.
>>
>>> ~$ echo "Mypass$phrase" | gpg --status-fd 2 --passphrase-fd 0 \
>>> --output gpg.out --clearsign --armor --batch --verbose \
>>> --local-user frank@kuesterei.ch netenv.conf; echo $?
>>>
>>> which should be exactly the call Gnus does.
>
> I don't think the "$" char is the problem. I tried changing my
> passphrase to contain a "$" and everything still worked. Do you
> have non-ASCII characters in your passphrase?
Err, you're right. There is one char that is not on the american
keyboards standing around in the lab. I couldn't imagine that this one
could be a problem, it's been on german typewriters since the old ages.
I invented a new Passphrase now, and yes, though it's complicated, it
works. Still I feel that in the future, more and more people will be
using the characters they find on _their_ machine in their passphrases,
so it may be worth thinking about that; gpg itself doesn't have a
problem with that (at least not with iso-9985-?, may be different with
Unicode).
However, there is one more problem. In a test mail with german Umlauts
in the body, Gnus didn't send the signed mail, instead complained:
Debugger entered--Lisp error: (error "Multibyte character in QP encoding region")
signal(error ("Multibyte character in QP encoding region"))
error("Multibyte character in QP encoding region")
quoted-printable-encode-region(1 325)
mml1991-pgg-sign((part (sign . "pgp") (tag-location . 374) (contents \
. "alskdf\xf64\n-- \nDr. Frank K\x8fcster, Biozentrum der \
Univ. Basel\nAbt. Biophysikalische Chemie\n")))
mml1991-sign((part (sign . "pgp") (tag-location . 374) (contents
. "alskdf\xf64\n-- \nDr. Frank K\x8fcster, Biozentrum der
Univ. Basel\nAbt. Biophysikalische Chemie\n")))
mml-pgp-sign-buffer((part (sign . "pgp") (tag-location . 374)
(contents . "alskdf\xf64\n-- \nDr. Frank K\x8fcster, Biozentrum der
Univ. Basel\nAbt. Biophysikalische Chemie\n")))
mml-generate-mime-1((part (sign . "pgp") (tag-location . 374)
(contents . "alskdf\xf64\n-- \nDr. Frank K\x8fcster, Biozentrum der
Univ. Basel\nAbt. Biophysikalische Chemie\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)
I wasn't even aware that I was sending quoted-printable, but have never
bothered with that in the last years.
Bye, Frank
--
Dr. Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug in pgg-gpg-process-region
2003-02-28 9:37 ` Frank Küster
@ 2003-02-28 18:04 ` Satyaki Das
2003-03-03 9:19 ` Frank Küster
2003-03-18 13:18 ` Frank Küster
0 siblings, 2 replies; 12+ messages in thread
From: Satyaki Das @ 2003-02-28 18:04 UTC (permalink / raw)
Cc: ding
[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]
Frank Küster <frank@kuesterei.ch> writes:
> Satyaki Das <satyaki@chicory.stanford.edu> schrieb:
>
> > I don't think the "$" char is the problem. I tried changing my
> > passphrase to contain a "$" and everything still worked. Do you
> > have non-ASCII characters in your passphrase?
>
> Err, you're right. There is one char that is not on the american
> keyboards standing around in the lab. I couldn't imagine that this one
> could be a problem, it's been on german typewriters since the old ages.
>
> I invented a new Passphrase now, and yes, though it's complicated, it
> works. Still I feel that in the future, more and more people will be
> using the characters they find on _their_ machine in their passphrases,
> so it may be worth thinking about that; gpg itself doesn't have a
> problem with that (at least not with iso-9985-?, may be different with
> Unicode).
I wasn't suggesting that you change your passphrase. Recently I
had submitted a patch to pgg to use call-process-region, instead
of start-process (this gets rid of the blinking). That has had
unintended consequences as you have just found out.
The attached patch might fix this problem. I am not sure if it
does.
> However, there is one more problem. In a test mail with german Umlauts
> in the body, Gnus didn't send the signed mail, instead complained:
I have no ideas about this one.
Satyaki
[-- Attachment #2: Possible fix for PGG --]
[-- Type: text/plain, Size: 582 bytes --]
Index: pgg-gpg.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/pgg-gpg.el,v
retrieving revision 6.10
diff -u -r6.10 pgg-gpg.el
--- pgg-gpg.el 8 Feb 2003 21:20:53 -0000 6.10
+++ pgg-gpg.el 28 Feb 2003 18:16:42 -0000
@@ -67,6 +67,7 @@
(progn
(set-default-file-modes 448)
(let* ((coding-system-for-write 'binary)
+ (default-enable-multibyte-characters nil)
(input (buffer-substring-no-properties start end)))
(with-temp-buffer
(when passphrase
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug in pgg-gpg-process-region
2003-02-28 18:04 ` Satyaki Das
@ 2003-03-03 9:19 ` Frank Küster
2003-03-18 13:18 ` Frank Küster
1 sibling, 0 replies; 12+ messages in thread
From: Frank Küster @ 2003-03-03 9:19 UTC (permalink / raw)
Cc: ding
"Satyaki Das" <satyakid@stanford.edu> wrote:
> Frank Küster <frank@kuesterei.ch> writes:
>
>> However, there is one more problem. In a test mail with german Umlauts
>> in the body, Gnus didn't send the signed mail, instead complained:
>
> I have no ideas about this one.
Well, it's gone now...
I'll try the patch soon.
Bye, Frank
--
Dr. Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bug in pgg-gpg-process-region
2003-02-28 18:04 ` Satyaki Das
2003-03-03 9:19 ` Frank Küster
@ 2003-03-18 13:18 ` Frank Küster
1 sibling, 0 replies; 12+ messages in thread
From: Frank Küster @ 2003-03-18 13:18 UTC (permalink / raw)
Cc: ding
"Satyaki Das" <satyakid@stanford.edu> wrote:
(Sorry for answering that late)
>
> The attached patch might fix this problem. I am not sure if it
> does.
Yes, it does, it works fine.
Thank you, Frank
--
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-03-18 13:18 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-25 9:11 Problems with signing Mails Frank Küster
2003-02-25 13:27 ` Simon Josefsson
2003-02-25 14:20 ` Bug in pgg-gpg-process-region (was: Problems with signing Mails) Frank Küster
2003-02-27 16:51 ` Bug in pgg-gpg-process-region Frank Küster
2003-02-27 21:44 ` Kai Großjohann
2003-02-28 9:39 ` Frank Küster
2003-02-28 13:04 ` Kai Großjohann
2003-02-27 23:56 ` Satyaki Das
2003-02-28 9:37 ` Frank Küster
2003-02-28 18:04 ` Satyaki Das
2003-03-03 9:19 ` Frank Küster
2003-03-18 13:18 ` Frank Küster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).