Is it possible to use openssl
to generate a PKCS#8 private key directly, or do I have to first generate a PKCS#1 key with genrsa
and then convert it?
PKCS#12 (also known as PKCS12 or PFX) is a binary format for storing a certificate chain and private key in a single, encryptable file. PKCS#12 files are commonly used to import and export certificates and private keys on Windows and macOS computers, and usually have the filename extensions .
You can do this directly:
$ openssl genpkey -out rsakey.pem -algorithm RSA -pkeyopt rsa_keygen_bits:2048
See the man page here:
https://www.openssl.org/docs/man1.1.1/man1/openssl-genpkey.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With