Thank you so much for reading my mail!
I want to generate keys and certificates with openssl command by web browsers.
So I write expect scripts to call openssl command,such as "openssl genrsa -des3 -out
ca.key 1024".
the expect script can talk with openssl command automatically.
my expect script is:
---------------------------------------
\usr\local\apache\htdocs\key.exp
#!/usr/bin/expect
set pwd some_pwd
spawn openssl genrsa -des3 -out ca.key 1024
expect "Enter PEM pass phrase:"
send $pwd
send "\r"
expect "Verifying password - Enter PEM pass phrase:"
send $pwd
send "\r"
interact
---------------------------------------
When i call this expect script,i get a normal ca.key file.
It's ok.
Then I write a php file to call this expect script
---------------------------------------------
<?
passthru("expect \usr\local\apache\htdocs\key.exp",$nReturn);
?>
----------------------------------------
In IE or Netscape i call the php script.
Then i do get a ca.key file,but the file size is 0 bytes.
And the apache user do have the permission to write in \usr\local\apache\htdocs.
What's the reason,I don't know.
If you can answer my mail, i'll be very appreciated.
Thank you so much.
sunwave from northwest polytechnic univ,china
======================================================================
http://game.163.com/level2/relax.html �����Լ���ÿ������С��Ϸ��
http://sports.163.com/cwfootball/ �й���10ǿ�� ��������һ��֮ң��
http://sms.163.com �����������ֱ���������ĸо�
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]