Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Nov 2000 00:52:19 -0000
From:      "Chris Sheppard" <cpfs@laminar.co.uk>
To:        freebsd-questions@FreeBSD.ORG
Subject:   PGP encryption of www cgi forms
Message-ID:  <3A035DC3.5889.1ABEB69@localhost>

next in thread | raw e-mail | index | archive | help
I'm trying to use a perl cgi script to encrypt the results of a feedback form 
and then email it. I've installed PGP 2.6.3i and everyting works fine as long 
as you run the script from the command line. However, if I run it from a www 
cgi form the PGP program tries to communicate with the perl script as if it is 
an interactive user and asks for random key presses!

Here is the httpd-error.log:

snip-----------------

Pretty Good Privacy(tm) 2.6.3ia - Public-key encryption for the masses.
(c) 1990-96 Philip Zimmermann, Phil's Pretty Good Software. 1996-03-04
International version - not for use in the USA. Does not use RSAREF.
Current time: 2000/11/04 00:40 GMT

We need to generate 192 random bits.  This is done by measuring the
time intervals between your keystrokes.  Please enter some random text
on your keyboard until you hear the beep:
cannot open tty, using stdin

Unable to get terminal characteristics: ioctl: Inappropriate ioctl for device
Couldn't open PGP62.255.32.4.asc for read at /usr/local/apache/cgi-
bin/www/pgptest.pl line 162.

snip-------------

I've noticed that if you try to encrypt a file, the very first time you do it, 
it asks for these 192 random bits, but only the first time. Each new user who 
logs in over telnet gets asked this question the first time they try to encrypt 
a file using pgp. pgp then creates a .pgp directory in their home directory and 
adds the randseed.bin file.

So I've created a new user called www and logged in as him and setup pgp. I've 
used pgp to encrypt a file and gone through  the keypresses. I've then changed 
httpd.conf to run apache as www and group www but all to no avail. I've set the 
pgp config.txt to use the same .pgp directory as in www - again I keep getting 
this message in the error.log file.

Has anybody any idea how to convince pgp that the user is already set up. I'm 
running the script from a secure server, if that makes any difference.

Any help would be much appreciated.

Regards

Chris Sheppard
cpfs@laminar.co.uk


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A035DC3.5889.1ABEB69>