0

我正在尝试使用 OpenSSL(Apache 2.2 + mod_ssl 附带的版本)创建自签名 SSL 证书。OpenSSL 二进制文件位于 中C:\Web\Apache2.2\bin,而我使用的配置文件位于C:\Web\Apache2.2\conf\openssl.cnf. 我已经执行了以下命令:

(我将使用换行符使其更具可读性。)

openssl req -config ..\conf\openssl.cnf -new -out ..\conf\eduardo.csr
        -keyout ..\conf\eduardo.pem
# Then I entered country code, province, city, etc.
# This step worked correctly.

openssl rsa -in ..\conf\eduardo.pem -out ..\conf\eduardo.key
# Then I entered my pass phrase.

openssl x509 -in ..\conf\eduardo.csr -out ..\conf\eduardo.cert
        -req -signkey ..\conf\eduardo.key -days 1000000

而且,在执行最后一步时,我得到以下输出:

Loading 'screen' into random state - done
Signature ok
subject=/C=PE/ST=Lima/L=Lima/...
Getting Private Key
unable to write 'random state' <--

我注意到该文件C:\Web\OpenSSL\bin\.rnd是在我执行第二个命令时生成的。我得到的错误是否与该文件有关?可能是什么问题呢?

PS:我已经尝试过使用谷歌,我只找到了适用于 Linux 的解决方案。

4

1 回答 1

1

看看这个,我建议确保您对 具有读/写权限C:\Web\OpenSSL\bin\.rnd,如果这不起作用,请将 $RANDFILE(或者,对于 Windows,%RANDFILE%)设置为您可以写入的文件。

于 2011-02-14T00:47:40.170 回答