clearsign a variable?

Werner Koch wk at gnupg.org
Thu May 18 19:42:55 CEST 2006


"Gordon McNevin" <gordon at yourmarketing.co.uk> writes:

> $cmd = "echo $passphrase | $gpg --passphrase-fd 0 --no-tty -u

$cmd = "(echo "$passphrase"; echo "$variable") \
        | $gpg --passphrase-fd 0 --clearsign - 

The trick here is that the passphrase is only read up to and including
the first linefeed.  Then the rest is fed into gpg as regular input.

BTW, it is easier and equal save to remove the passphrase from the key
so that you don't need the --passphrase-fd at all.  


Shalom-Salam,

   Werner





More information about the Gnupg-users mailing list