简体   繁体   中英

Error when creating a self-signed SSL Certificate

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM