Suppressing passphrase prompt
Steve Butler
sbutler@fchn.com
Fri Jun 21 18:16:01 2002
Oops. I gave my decrypt script which has the passphrase stuff. Here is my
encrypt script which does not do signing. However, feel free to merge the
two scripts for your purposes:
#!/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_script PK_ID source
#
# Interface script for edi and ftpexec to encrypt files vi GnuPG
XRG_DBA=${XRG_DBA:=/usr/xrg_dba}
xrgbin=$XRG_DBA/bin
homedir=$($xrgbin/default gpg_home)
if [[ $# -ne 2 ]]; then
echo "gpg_script: Must supply 2 parameters" >&2
exit 99
fi
rm -f "$2.pgp" > /dev/null
gpg --homedir $homedir --no-tty --always-trust --recipient $1 \
--output "$2.pgp" --encrypt "$2"
x=$?
if [ $x -ne 0 ]; then
echo "gpg_script: gpg failure code '$x'" >&2
fi
echo "$2.pgp"
exit $x
#
--Steve
-----Original Message-----
From: Frank Tobin [mailto:ftobin@neverending.org]
Sent: Friday, June 21, 2002 9:01 AM
To: Steven Handleman
Cc: gnupg-users@gnupg.org
Subject: Re: Suppressing passphrase prompt
Steven Handleman, on 2002-06-21, wrote:
> 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.
Use --passphrase-fd then for automated entering.
--
Frank Tobin http://www.neverending.org/~ftobin/
_______________________________________________
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.