help needed desperately: gpg --decrypt hanging

Steve Butler sbutler at fchn.com
Fri Oct 31 11:02:01 CET 2003


OK.  Perhaps I was the brain dead one <<and with Halloween running rampant
through the company today it could be contagious>>.

Perhaps you already know this and I just didn't pick it out from the Perl
script.  However, the data to be encrypted and the passphrase cannot both
come through STDIN (or FD 0).  I would suggest that you send the passphrase
through STDIN (and use the --passphrase-fd 0 command line option) and send
the data to decrypt through a named pipe.  Perhaps something like:

mknod mydata p
cat info_to_decrypt > mydata &
cat my_pass_phrase | gpg --no-tty --passphrase-fd 0 --decrypt mydata >
my_output_file

Does that help or am I still barking up the wrong tree?

--Steve

-----Original Message-----
From: Dave Della Costa [mailto:dave at acadaca.com]
Sent: Friday, October 31, 2003 10:52 AM
To: gnupg-users at gnupg.org
Cc: Steve Butler; jason at acadaca.com
Subject: RE: help needed desperately: gpg --decrypt hanging


Sorry Steve, I don't think I explained the problem well enough.  If I
run, on the command line:

gpg --decrypt

Then I pass it the encrypted text to decrypt, and then I give it the
password, it just hangs!  It sits and sits and sits...and we get
nothing.

Thanks for your help!

Dave




On Fri, 2003-10-31 at 12:47, Steve Butler wrote:
> Dave,
> 
> I don't use Perl but I do have a Korn shell script that works for me on a
> SuSE SLES Linux box.  You will need to replace the 'default gpg_pass$1'
> routine with something that gets the passphrase for your secret key.  Also
> replace 'default gpg_homd' with something that gets the GnuPG home
directory
> for your box (or set the environment before running the script).
> 
> 
> # COPYRIGHT (c) 1995-2002 Stephen M. Butler dba XRG
> # This information may be copied, distributed and/or modified under
> # certain conditions, but it comes WITHOUT ANY WARRANTY.
> # See the Design Science License for more details
> # =================================================================
> #
> #  gpg_decrypt pass_id   input_file  output_file
> #     Interface for edi and default routines to decrypt pgp files vi
GnuPG.
> #
> #     pass_id      1 or 2 to indicate which pass phrase needs to be picked
> up.
> #     input_file   name of file to decrypt.  Includes any path
> #     output_file  name where to place output plain text file (with path)
> #
> #     Note:  See 'default' script for default usage.
> 
> XRG_DBA=${XRG_DBA:-/usr/xrg_dba}
> xrgbin=$XRG_DBA/bin
> 
> homedir=$($xrgbin/default gpg_home)
> 
>   rm -f "$3" 2>&1 1> /dev/null
>   $xrgbin/default gpg_pass$1 \
>   | gpg --homedir $homedir --passphrase-fd 0 --no-tty --skip-verify \
>         --output "$3" --decrypt "$2"
> #
> 
> -----Original Message-----
> From: Dave Della Costa [mailto:dave at acadaca.com]
> Sent: Friday, October 31, 2003 8:44 AM
> To: gnupg-users at gnupg.org
> Cc: jason at acadaca.com
> Subject: help needed desperately: gpg --decrypt hanging
> 
> 
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
> 
> 
> CONFIDENTIALITY NOTICE:  This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information.  Any unauthorized review, use,
disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies
of the original message.
-- 
Acadaca Internet Solutions
636 Broadway, Suite 516, Bell #50
New York, NY 10012
p 212.505.5885
f 212.505.5655



CONFIDENTIALITY NOTICE:  This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.




More information about the Gnupg-users mailing list