Versions Compared

Key

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

...

Expand
titleClick to expand/collapse...
Code Block
languagebash
titleExample how to create Private Key and Certificate Signing Request using RSA encryption (Unix)
linenumberstrue
# Specify key name used for file names
key_name=signing

# Create Private Key and Certificate Signing Request
openssl req -new -newkey rsa:4096 -sha256 -nodes \
    -keyout ${key_name}.key \
    -out ${key_name}.csr \
    -subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=${key_name}"
Expand
titleWindows version...
Code Block
languagetext
titleExample how to create Private Key and Certificate Signing Request using RSA encryption (Windows)
linenumberstrue
@rem Specify key name used for file names
set key_name=signing
 
@rem Create Private Key and Certificate Signing Request
openssl req -new -newkey rsa:4096 -sha256 -nodes ^
     -keyout %key_name%.key ^
    -out %key_name%.csr ^
    -subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=%key_name%"
Expand
titleExplanations...
  • In the example the Private Key is created using the specified key size 4096.
  • For use of the SHA hash algorithm -sha256 and the -subj option see Using ECDSA Encryption.
  • The following files will be created with this step:
    • The signing.key file will hold the Private Key.
    • The signing.csr file will hold the Certificate Signing Request.

...