Generate Openssl Key Without Password

An RSA key is a private key based on RSA algorithm, used for authentication and an symmetric key exchange during establishment of an SSL/TLS session. The RSA private key in PEM format (the most common format for X.509 certificates, CSRs and cryptographic keys) can be generated from the command line using the openssl genpkey utility. Make a new ssl private key:. Generate a new unencrypted rsa private key in PEM format: openssl genrsa -out privkey.pem 2048. You can create an encrypted key by adding the -des3 option. # To make a self-signed certificate:. Create a certificate signing request (CSR) using your rsa private key: openssl req -new -key privkey.pem -out certreq.csr. Generate a 2048 bit length private key without passphrase.

If you have a PFX file that contains a private key with a password, you can use OpenSSL to extract the private key without a password into a separate file, or create a new PFX file without a password.

For those running macOS or Linux, I've created a Bash script to automate the process, which you can download from GitHub. You set the PFX_PASSWORD and PFX_FILE_IN variables at the top of the file with your own values, and don't forget to make it executable by running chmod +x pfx-remove-password.sh in Terminal.

For those running Windows, you can download OpenSSL for Windows binaries from SourceForge.

The manual instructions are below.

PasswordOpenssl generate key without password

If you only want the private key file, you can skip steps 5 and 6.

If you want a PFX file with no password, you can delete TargetFile.Key when you're finished.

  • MyPassword is your current password
  • SourceFile.PFX is the PFX file you want to convert
  • TargetFile.Key is the name of the private key file without a password that will be generated
  • TargetFile.PFX is the name of the PFX file without a password that will be generated

1. Extract the certificate:

2. Extract the certificate authority key:

Generate Openssl Key Without Password Online

3. Extract the private key:

4. Remove the passphrase from the private key file:

Generate Openssl Key Without Password Download

5. Create a new input file to generate a PFX file:

Generate openssl key without password online

Generate Openssl Key Without Password Windows 10

6. Generate a new PFX file without a password:

And that's it. For an input file named test-cert.pfx, you'll now have a private key file named test-cert.nopassword.key and a PFX file named test-cert.nopassword.pfx.

Openssl Generate Key Without Password

Reference: Serverfault