Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Basic use to create self-signed certificate

Code Block
# Generate SSL privvateprivate key self signed certificate for 10 years
openssl req -x509 -newkey rsa:4096 -sha256 -keyout server.key -out cert.crt -days 3650 -nodes

...

Code Block
openssl req -new -key server.key -out server.csr

non-interactive mode example

Code Block
openssl req -new -key server.key -out server.csr -subj "/C=UA/ST=Kyiv/L=Kyiv/O=Company Name/OU=Department name/CN=example.com" -passin pass:password -passout pass:password


Check request

Code Block
openssl req -text -noout -verify -in server.csr

...