Difference between revisions of "Openssl req -x509"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
  
 
  # interactive
 
  # interactive
  [[openssl req -x509 -newkey]] rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365
+
  [[openssl req -x509 -newkey]] rsa:4096 -keyout [[key.pem]] -out [[cert.pem]] -sha256 -days 365
  
 
  # non-interactive and 10 years expiration
 
  # non-interactive and 10 years expiration

Revision as of 10:09, 6 December 2023

# interactive
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365
# non-interactive and 10 years expiration
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"

Generating a 4096 bit RSA private key
.............................................................................++++
...........................................................................................................................++++
writing new private key to 'key.pem'

Related

See also

Advertising: