OTA openssl command

User avatar
arunbm123
Posts: 96
Joined: Fri Feb 23, 2018 5:36 am

OTA openssl command

Postby arunbm123 » Mon Mar 04, 2019 1:50 pm

Hello Geeks

I am integrating OTA feature in my app

$ openssl req -x509 -newkey rsa:2048 -keyout ca_key.pem -out ca_cert.pem -days 365

Can't load C:\msys32\home\renu/.rnd into RNG
5532:error:2406F079:random number generator:RAND_load_file:Cannot open file:../openssl-1.1.1/crypto/rand/randfile.c:88:Filename=C:\msys32\home\renu/.rnd
Generating a RSA private key

Whats this error Any one Came across this error

amagri
Posts: 2
Joined: Thu May 02, 2019 12:16 pm

Re: OTA openssl command

Postby amagri » Fri May 03, 2019 1:44 pm

Hello,
I have the same problem, but it is probably not the one you believe you have:
the openssl command tries to read a file called .rnd when it's called. You can create one by calling openssl rand -writerand .rnd
but it does not make any difference to me:

openssl req -x509 -newkey rsa:2048 -keyout ca_key_new.pem -out ca_cert_new.pem -days 365
Generating a RSA private key
.................................+++++
...............+++++

and it just stays there...

Regards,

Antonio

amagri
Posts: 2
Joined: Thu May 02, 2019 12:16 pm

Re: OTA openssl command

Postby amagri » Mon May 06, 2019 6:52 am

UPDATE:

I am working on Windows, where it is necessary to prepend "winpty" to the command in order to make it work.. the openssl command as it is found in the examples requires you to input some data from the terminal, and that is where the winpty thingy comes to help.

On Linux (at home...) it works for me without any problem. For a production environment it would be best to create a configuration file and use it for repeatable batch generation of the certificates.

Regards,

Antonio

Who is online

Users browsing this forum: Bing [Bot] and 93 guests