I am writing a script about using PGP command line mode program to encrypt a plain text file. But I encountered some problems.
My working environment is: Windows 2000 server + IIS 5.0 + PHP 4.2.2
My PGP program is PGP Command Line 6.5.8
I installed PGP and create a public / secret key pair successfully.
Problem 1: I can't find where PGP.cfg, pubring.pkr, secring.skr locate. ( But I formerlly installed the same PGP program in my personal computer using Windows 2000 professonal and created public / secret key pair. I found related files in C:\Documents and Settings\Administrator\Application Data\PGP)
Problem 2: I use system() to run PGP in order to encrypt a plain text file like this:
system("PGPcmdln\PGP -ea plaintext.txt my_user_id")
And I got output in the browser as the followings
No configuration file found.
X-Powered-By: PHP/4.2.2
Content-type: text/html
Recipients' public key(s) will be used to encrypt.
Can't open key rings
Encryption error
For a usage summary, type: pgp -h
For more detailed help, consult the PGP User's Guide.
Error!!!
insufficient random bits
😕I am wondering if it's the problem about the permission and privilige of PGP and the public / secret key ring files can't be found.
Is there anyone who can help me with this problem?
Thanx a lot!