Is it possible to generate pvk files with OpenSSL 3.0?

Viewed 326

Is it possible to create pvk files with OpenSSL 3.0? In previous version, it could be done with this commands:

OPENSSL genrsa -out test.key -passout pass:blahblah 2048
OPENSSL rsa -in test.key -inform pem -out test.pvk -outform PVK -pvk-strong -passout pass:blahblah

But, when i run this commands in OpenSSL 3.0, second command gives me an error:

300F0000:error:07880106:common libcrypto routines:ossl_pw_get_passphrase:reason(524550):crypto\passphrase.c:265:No password method specified
300F0000:error:04800068:PEM routines:i2b_PVK:bad password read:..\crypto\pem\pvkfmt.c:1058

I loaded legacy provider, but unfortunately, no effect. Do you have any suggestions or workarounds of this?

2 Answers

The error 'No password method specified' is referring to the fact that test.key has a password and you haven't entered it

you need to either;

  1. not set a password on test.key (using -nodes in the first command) or
  2. in the second command use -passin pass: ... etc (or env:,stdin:,etc)
Related