For more information, see man openssl in your terminal.-newkey rsa:4096: Create a 4096 bit RSA key for use with the certificate. RSA 2048 is the default on more recent versions of OpenSSL but to be sure of the key size, you should specify it during creation.-x509: Create a self-signed certificate. Openssl should not show that a 4096 bit key is generated and then generate something much weaker. The output of the command you gave is indeed confusing, but if you use $ openssl req -config openssl.cnf -nodes -new -keyout testkey.pem -keyform PEM -out testreq.pem to generate the key+request the correct value.is. picked up from the openssl.
OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It’s useful but hard to remember so many commands, so I have listed some common usages below.
Generate a new RSA private key
Generate a new ECC private key
Generate a new private key and Certificate Signing Request
Generate a self-signed certificate
Generate a certificate signing request (CSR) for an existing private key
Generate a multi-domain SSL certificate signing request (CSR) for an existing private key
Generate a certificate signing request based on an existing certificate
Remove a passphrase from a private key
Check a Certificate Signing Request (CSR)
Check a private key
Check a certificate
Check a PKCS#12 file (.pfx or .p12)
Check the chained certificates
Check an MD5 hash of the public key to ensure that it matches with what is in a CSR or private key
Check an SSL connection. All the certificates (including Intermediates) should be displayed
Check an SSL connection using specified CA
Convert a DER file (.crt .cer .der) to PEM
Convert a PEM file to DER /openssl-generate-pem-private-key.html.
Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM
Vertica jdbc return_generated_keys. Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)