can't get passphrase-fd option to work with GnuPG on HPUX when running a scheduled batch
poney
poney@promtech.com
Wed Aug 14 10:49:01 2002
Thanks for the info. We tried imitating your approach, and it seems the
--no-tty is the main thing that did the trick, though I'm not sure I
understand why the command worked when we didn't use the --passphrase-fd
option but broke when we did use that option. Perhaps we didn't test the
scenarios properly. In any case, I've discovered a bunch of the options that
are not in the manual but are in the help system, and they seem quite useful.
Regards,
Poney Carpenter
On Tuesday 13 August 2002 02:22 pm, Steve Butler wrote:
> Try the --batch keyword. Here is the script I use for decrypting files
> inbound to our site:
>
> #!/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 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.
>
> 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"
> #
>
> Note that our option file includes:
> batch
>