Re: PGP

From: Date: Mon, 29 Apr 2002 06:13:43 +0000
Subject: Re: PGP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95106@lists.php.net to get a copy of this message
On Sun, 28 Apr 2002, Richard Lynch wrote:
On Sat, 27 Apr 2002, Richard Lynch wrote:
$test = escapeshellarg($cleartext); exec("cat $test | /usr/bin/pgpe -a -t -f -r 'ceo@l-i-e.com' . . . ^Kb^Estdin^H^@^@^@
$cleartext is the actual text? What if you used 'echo' instead of 'cat'? miguel
D'oh! Different output, for sure, but still nothing decodable into the original...
Maybe cat's bugging on the line breaks (if any) in $cleartext. You might try, for starters, dumping the message into a temp file and passing that through pgpe...
TIPS for the archives, in case I die before I figure this out completely: 1. You may or may not need to use putenv("PGPPATH=/home/yourusername/.pgp"); 2. If you are going to use --pubring and --secring, note that the filename extension for SECRING is .skr, not .pkr D'oh! 3. When you copy&paste from your browser to the SSH session where you can use pgpv to decode your message, the newlines are critical to get *EXACTLY* right, including the extra one after the "Message ID: ........" line that was getting lost in my copy/paste 4. It may have been significant that I tried re-ordering the args to pgpv the way they are in man: pgpv -r recipient@whatever.com -atfz --pubring=/home/.../.pgp/pubring.pkr --secring=/home/.../.pgp/secring.skr Or, maybe not. 5. I am also using addslashes() which might or might not be helping with the newlines... Again, not sure that was the critical thing. #3 was the last thing that made the big difference. I still haven't gotten popen to work, but at least I can do it with exec now, if nothing else. Yes, that's *NOT* good for security, but I'm getting closer to the correct solution. -- Got Music? http://l-i-e.com/artists.htm

« previous php.general (#95106) next »