Versions Compared

Key

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

...

  • <ca>  The directory <ca> is a placeholder. Any directory can be used.
    • create_root_ca.sh
    • create_server_certificate.sh
    • certs
    • csr
    • private

...

This step is performed just once. In case of renewal of the Root CA Certificate any Server Certificates will have to be renewed.

Code Block
languagebash
titleRun .create_root_ca.sh shell script
linenumberstrue
# Description
# create_root_ca.sh --key-name=<basename> --subject=<distinguished-name> --days=<number-of-days>

# Example for use with defaults
./create_root_ca.sh

# Example for use with basename
./create_root_ca.sh --key-name=ca-root

# Example applying specific distinguished name and lifetime
./create_root_ca.sh --subject="/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=JS7 CA" --days=7660

...

Creating a Server Certificate

Download: create_server_certificate.sh

The following files will be created with <server> being a placeholder for the hostname for which a certificate should be created.

...

This step is performed for each Server Certificate that should be created.

Code Block
languagebash
titleRun .create_server_certificate.sh shell script
linenumberstrue
# Description
# create_server_certificate.sh --dns=<hostname>[,<hostname>] --key-name=<basename> --subject=<distinguished-name> --days=<number-of-days>

# Example for use with DNS and lifetime
./create_server_certificate.sh --dns=centostest-primary --days=365

# Example for use with DNS, key name and lifetime
./create_server_certificate.sh --dns=centostest-primary,centostest-primary.sos --key-name=centostest-primary --days=4017

# Example for use with DNS, subject and lifetime
./create_server_certificate.sh --dns=centostest-primary,centostest-primary.sos --subject="/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=centostest-primary.sos" --days=4017 

...

The shell script is executed with two the following arguments:

  • --dns (required)
    • The DNS hostname of the server that should be assigned the certificate. A server can be assigned more than one DNS hostname, for example the FQDN can extend the hostname. Only DNS hostnames that are added to the certificate can be used later on to establish secure HTTPS connections.
  • --key-name
    • The basename of the key without extension. Default: root-ca
  • --subject
    • The distinguished name that is used as the subject of the Server Certificate. Default: /C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=<dns>
    • The CN attribute must specify the server's hostname. By default the value of the first hostname specified with the --dns option is used.
  • --days
    • The lifetime of the certificate is specified by the number of days. Default: 3652

...