Versions Compared

Key

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

...

Code Block
languagebash
titleCreate Server Certificate
linenumberstrue
# Specify server for which the certificate should be created
SERVER=somehost

# Step 1 - Generate Private Key and Certificate Signing Request
openssl req -new -config openssl-cert.config -extensions 'standard exts' -nodes \
    -days 7300 -newkey rsa:4096 -keyout ${SERVER}.key -out ${SERVER}.csr

# Step 2 - Generate and Sign the Server Certificate
openssl x509 -req \
    -in ${SERVER}.csr \
    -CA root-ca.crt \
    -CAkey root-ca.key \
    -CAcreateserial \
    -out ${SERVER}.crt -days 7300 \
    -extfile <(printf "'subjectAltName=DNS:${SERVER}%s\nnsCertType = client, server\nkeyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment\nextendedKeyUsage = serverAuth, clientAuth\n' "${SERVER}")


Explanation:

  • The following files will be created for the given server:
    • <SERVER>.key: the Private Key
    • <SERVER>.csr: the Certificate Signing Request
    • <SERVER>.crt: the Server Certificate
  • For operation with JS7 JOC Cockpit, Controller and Agents users can add
    • the Private Key and Server Certificate to a keystore.
    • the Root CA Certificate to a truststore.
  • For details see JS7 - How to add SSL TLS Certificates to Keystore and Truststore

...