Mailing List Archive

GnuPG and my CGI
Okay, I've gotten GnuPG and my cgi to work nicely together (thanks to
cgiwrap) and now my script will send me encrypted messages. The main flaw I
see in my script is that it writes the file to the disk, then it encrypts to
a new file, sends the new file and then deletes both files. I realize the
file is only there for fractions of a second, but I think it would be better
if I could just send the information straight from the script to gpg and
have the only file written to disk. I'm pretty sure this is possible, I
just haven't figured out which commands to use. Anyone have any
suggestions?

Thanks

Jonathan Cantrell
Re: GnuPG and my CGI [ In reply to ]
On Sat, 26 Jun 1999, Jonathan Cantrell wrote:

> a new file, sends the new file and then deletes both files. I realize the
> file is only there for fractions of a second, but I think it would be better
> if I could just send the information straight from the script to gpg and
> have the only file written to disk. I'm pretty sure this is possible, I

You can use gpg as any other unix filter programm. Just use a pipe:

prog_wich_creates_data | gpg ENCRYPTION_OPTS | mail MAIL_OPTS

If you don't have a single programm which creates the data, you can group
different programms:

{
echo "something"
echo "foobar"
some_example_programm
echo "this is the last line
} | gpg ENCRYPTION_OPTS | mail MAIL_OPTS


cu
Michael