开发者

Error when creating a self-signed SSL Certificate

开发者 https://www.devze.com 2023-02-10 11:04 出处:网络
I am trying to create a self-signed SSL certificate using OpenSSL (the version that comes with Apache 2.2 + mod_ssl). The OpenSSL binaries are in C:\\Web\\Apache2.2\\bin, and the configuration file I

I am trying to create a self-signed SSL certificate using OpenSSL (the version that comes with Apache 2.2 + mod_ssl). The OpenSSL binaries are in C:\Web\Apache2.2\bin, and the configuration file I am using is 开发者_如何学编程C:\Web\Apache2.2\conf\openssl.cnf. I have executed the following commands:

(I will use newlines to make it more readable.)

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

And, when executing the last step, I got the following output:

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

I have noticed that the file C:\Web\OpenSSL\bin\.rnd was generated when I executed the second command. Is the error I got in any way related to that file? What could be the problem?

PS: I have already tried using Google, and I have only found solutions that work in Linux.


Looking at this, I would suggest making sure you have read/write permissions for C:\Web\OpenSSL\bin\.rnd, and if that doesn't work, setting $RANDFILE (or, for windows, %RANDFILE%) to a file you can write to.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号