Openssl: Difference between revisions

From Wiki :-)
Jump to navigation Jump to search
Created page with "openssl req -batch -nodes -x509 -newkey rsa:2048 -sha256 -keyout example.key -out example.crt"
 
No edit summary
 
Line 1: Line 1:
Generate RSA certificate with private key in only one command:
openssl req -batch -nodes -x509 -newkey rsa:2048 -sha256 -keyout example.key -out example.crt
openssl req -batch -nodes -x509 -newkey rsa:2048 -sha256 -keyout example.key -out example.crt
The following commands generate the private key:
openssl genpkey -algorithm RSA -out dev.key
-pkeyopt rsa_keygen_bits:2048 -pkeyopt rsa_keygen_pubexp:65537
openssl genrsa -out private.pem 2048
Generate certificate from the private key:
openssl req -batch -new -x509 -key dev.key -out dev.crt

Latest revision as of 17:09, 17 July 2018

Generate RSA certificate with private key in only one command:

openssl req -batch -nodes -x509 -newkey rsa:2048 -sha256 -keyout example.key -out example.crt

The following commands generate the private key:

openssl genpkey -algorithm RSA -out dev.key

-pkeyopt rsa_keygen_bits:2048 -pkeyopt rsa_keygen_pubexp:65537

openssl genrsa -out private.pem 2048

Generate certificate from the private key:

openssl req -batch -new -x509 -key dev.key -out dev.crt