Suppressing passphrase prompt

Steve Butler sbutler@fchn.com
Fri Jun 21 18:04:02 2002


Guess I'll have to start a counter of how many times I post this:

leo:/home/oracle > cat /usr/xrg_dba/bin/gpg_decrypt
#!/bin/ksh
# 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
#     Interface for edi and default routines to decrypt pgp files vi GnuPG.

homedir=$(default gpg_home)

  rm -f "$3" 2>&1 1> /dev/null
  default gpg_pass$1 \
  | gpg --homedir $homedir --passphrase-fd 0 --no-tty --skip-verify \
        --output "$3" --decrypt "$2"
#


Notes: 
1.  default is a utility for looking up default values given the keyword
    A.  gpg_home returns the path to send to the --homedir option.
    B.  gpg_pass$1 returns the passphrase associated with the first command
line
        parameter (I have 2 secret keys -- most everybody is on the 2nd key
now)

2.  Command line parameters:
    $1 -- identifier for which passphrase to return
    $2 -- name of input file to decrypt
    $3 -- name of output file to send the clear text

3.  Usage:  gpg_decyrpt N file_in file_out

The purist will suggest that you set your passphrase to an null string and
run without a passphrase.  The above method has about the same security as
removing your passphrase -- eg, a good hacker will be delayed only a second
or two.


--Steve Butler
Oracle Administrator
First Choice Health Network
206-268-2309
sbutler@fchn.com
    

-----Original Message-----
From: Steven Handleman [mailto:shandleman@geewax.com]
Sent: Friday, June 21, 2002 8:18 AM
To: gnupg-users@gnupg.org
Subject: Suppressing passphrase prompt


Hi All,

I am a new user to GPG and I am hoping that someone on this list can 
provide an easy answer to this.  When I try to sign & encrypt a file (--sign
--
encrypt --armor), gpg prompts me for a passphrase for my secret key.  Is 
there any way to suppress this prompt?  I need to suppress it because the 
encryption is going to become part of an automated batch file.

TIA,
Steven Handleman
IT Manager
Geewax, Terker and Co.
systems@geewax.com


_______________________________________________
Gnupg-users mailing list
Gnupg-users@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.