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]

Reply via email to