From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62543 Path: news.gmane.org!not-for-mail From: Sascha Wilde Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: pgg-gpg broken? Date: Thu, 06 Apr 2006 11:58:21 +0200 Message-ID: References: <2cd46e7f0510031250u66ea1349yb437d539ce4027ef@mail.gmail.com> <2cd46e7f0510121647x3c51fb65pc883ed61f4e864ab@mail.gmail.com> <2cd46e7f0510200708x4640d1c2t50743cf439e52dd4@mail.gmail.com> <87pskfq361.fsf@latte.josefsson.org> <877j6mg2af.fsf@latte.josefsson.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1144317531 29000 80.91.229.2 (6 Apr 2006 09:58:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 6 Apr 2006 09:58:51 +0000 (UTC) Cc: Simon Josefsson , ding@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 06 11:58:50 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FRRGH-0007Fe-UB for ged-emacs-devel@m.gmane.org; Thu, 06 Apr 2006 11:58:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FRRGH-0006bD-KH for ged-emacs-devel@m.gmane.org; Thu, 06 Apr 2006 05:58:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FRRG2-0006aK-Ov for emacs-devel@gnu.org; Thu, 06 Apr 2006 05:58:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FRRG0-0006ZF-Dq for emacs-devel@gnu.org; Thu, 06 Apr 2006 05:58:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FRRG0-0006ZB-A9 for emacs-devel@gnu.org; Thu, 06 Apr 2006 05:58:28 -0400 Original-Received: from [62.141.58.119] (helo=km1136.keymachine.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FRRJh-00012G-J8 for emacs-devel@gnu.org; Thu, 06 Apr 2006 06:02:18 -0400 Original-Received: from kenny.sha-bang.de (xdslj117.osnanet.de [212.95.110.117]) (authenticated bits=0) by km1136.keymachine.de (8.12.11/8.12.10) with ESMTP id k369wJgM030036; Thu, 6 Apr 2006 11:58:19 +0200 Original-Received: from wilde by kenny.sha-bang.de with local (Kenny MUA v.0409034.42) ID 1FRRFt-0004Ei-6j; Thu, 06 Apr 2006 11:58:21 +0200 Original-To: Daiki Ueno In-Reply-To: (Daiki Ueno's message of "Thu, 06 Apr 2006 18:21:26 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52469 gmane.emacs.gnus.general:62543 Archived-At: Daiki Ueno wrote: >>>>>> In >>>>>> Sascha Wilde wrote: >> > A straightforward way to investigate this problem is decrypting the mail >> > from the command line as pgg-gpg does. Could you try the following? >> > >> > $ cat input.txt | gpg --no-tty --status-fd 1 --command-fd 0 --yes \ >> > --output output.txt --decrypt > >> This doesn't work (it tries to read the passphrase from the pipe, too. > > As I said in the private mail, this is because the pipe is closed after > cat exits. Could you try this one and see if gpg waits after "[GNUPG:] > GET_HIDDEN passphrase.enter"? > > $ (cat test.msg; sleep 10) | gpg --no-tty --status-fd 1 --command-fd 0 --yes \ > --output output.txt --decrypt No, it doesn't -- here is what happens (thomas agreed with posting this information, so no more '*'s): (cat test.msg; sleep 10) | gpg --no-tty --status-fd 1 --command-fd 0 --yes \ --output output.txt --decrypt [GNUPG:] ENC_TO 31A16202F8F7E674 16 0 [GNUPG:] USERID_HINT 31A16202F8F7E674 Sascha Wilde [GNUPG:] NEED_PASSPHRASE 31A16202F8F7E674 BB2185144BB86568 16 0 [GNUPG:] GET_HIDDEN passphrase.enter [GNUPG:] GOT_IT [GNUPG:] BAD_PASSPHRASE 31A16202F8F7E674 gpg: Invalid passphrase; please try again ... [GNUPG:] USERID_HINT 31A16202F8F7E674 Sascha Wilde [GNUPG:] NEED_PASSPHRASE 31A16202F8F7E674 BB2185144BB86568 16 0 [GNUPG:] GET_HIDDEN passphrase.enter [GNUPG:] GOT_IT [GNUPG:] BAD_PASSPHRASE 31A16202F8F7E674 gpg: Invalid passphrase; please try again ... [GNUPG:] USERID_HINT 31A16202F8F7E674 Sascha Wilde [GNUPG:] NEED_PASSPHRASE 31A16202F8F7E674 BB2185144BB86568 16 0 [GNUPG:] GET_HIDDEN passphrase.enter [GNUPG:] GOT_IT [GNUPG:] BAD_PASSPHRASE 31A16202F8F7E674 [GNUPG:] ENC_TO 8699BF5FC42134DD 16 0 gpg: encrypted with 1024-bit ELG-E key, ID C42134DD, created 2003-06-24 "Thomas Arendsen Hein " [GNUPG:] NO_SECKEY 8699BF5FC42134DD gpg: encrypted with 2048-bit ELG-E key, ID F8F7E674, created 2004-11-15 "Sascha Wilde " gpg: public key decryption failed: bad passphrase [GNUPG:] BEGIN_DECRYPTION [GNUPG:] DECRYPTION_FAILED gpg: decryption failed: secret key not available gpg: CRC error; 474D93 - 15B95A [GNUPG:] END_DECRYPTION is seems that gpg detects the end early and uses the rest of the message as passphrase, which of cause fails... So either the PGP Message is malformed, or that there is a bug in gpg. In either case, I don't understand why gpg --no-tty --status-fd 1 --command-fd 0 --yes \ --output output.txt --decrypt test.msg works without any error: [GNUPG:] ENC_TO 31A16202F8F7E674 16 0 [GNUPG:] USERID_HINT 31A16202F8F7E674 Sascha Wilde [GNUPG:] NEED_PASSPHRASE 31A16202F8F7E674 BB2185144BB86568 16 0 [GNUPG:] GET_HIDDEN passphrase.enter ************************* [GNUPG:] GOT_IT [GNUPG:] GOOD_PASSPHRASE [GNUPG:] ENC_TO 8699BF5FC42134DD 16 0 gpg: encrypted with 1024-bit ELG-E key, ID C42134DD, created 2003-06-24 "Thomas Arendsen Hein " [GNUPG:] NO_SECKEY 8699BF5FC42134DD gpg: encrypted with 2048-bit ELG-E key, ID F8F7E674, created 2004-11-15 "Sascha Wilde " [GNUPG:] BEGIN_DECRYPTION [GNUPG:] PLAINTEXT 74 1143202578 mutt-eukrante-10004-12773-1220 gpg: Signature made Fre 24 Mr 2006 13:16:19 CET using DSA key ID 5816791A [GNUPG:] SIG_ID AfiFfg5+XNFF741BR7ts3MOF6ds 2006-03-24 1143202579 [GNUPG:] GOODSIG 5BB3F5195816791A Thomas Arendsen Hein gpg: Good signature from "Thomas Arendsen Hein " gpg: aka "Thomas Arendsen Hein (private) " gpg: aka "Thomas Arendsen Hein " [GNUPG:] VALIDSIG 53D27A45B9AD27915EE44EDE5BB3F5195816791A 2006-03-24 1143202579 0 3 0 17 2 01 53D27A45B9AD27915EE44EDE5BB3F5195816791A [GNUPG:] TRUST_FULLY [GNUPG:] DECRYPTION_OKAY [GNUPG:] GOODMDC [GNUPG:] END_DECRYPTION cheers -- Sascha Wilde A conclusion is simply the place where someone got tired of thinking.