Versions Compared

Key

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

...

  1. Generate a private key file (serverCA.key) for the Server CA using the command below. You will be required to enter a pass phrase to be associated with the serverCA.key file.

    Tip

    Make note of this pass phrase for the Server CA private key file (serverCA.key) as it will be used again whilst creating the certificate hierarchy. 


    Code Block
    languagetext
    openssl genrsa -des3 -out ca/server/serverCA.key 2048


  2. Generate a Certificate Signing Request (CSR) for the server CA using the command below. This command generates a new CSR named "serverCA.csr’ using the RSA private key "serverCA.key" and you will be required to enter the pass phrase for the serverCA.key file created in the previous step.

    Code Block
    languagetext
    openssl req -new -key ca/server/serverCA.key -out ca/server/serverCA.csr


    Note

    There are a number of fields associated with the creation of the certificate. Fill them out with your relevant details where theCommon Name must be the Fully Qualified Domain Name (FQDN) of the Chariot server.


  3. Sign the Server CA with the Root CA using the command below. This command will sign the CSR "serverCA.csr" with the Root CA certificate ‘ca.crt’ and RSA private key ‘ca.key’, creating a new X.509 certificate named ‘serverCA.crt’ valid for 3650 days (10 years). A "ca.srl" file will also be created containing the signed certificate's unique serial number. You will be required to enter the pass phrase associated with the Root CA private key file "ca.key". 

    Code Block
    languagetext
    openssl x509 -req -in ca/server/serverCA.csr -CA ca/ca.crt -CAkey ca/ca.key -CAcreateserial -out ca/server/serverCA.crt -days 3650


...

You should have the following files created: 

chariotcerts/
├── ca/
 ├── ca.crt
 ├── ca.key
 ├── ca.srl
 ├── engine/
 │   ├── engineCA.crt
 │   ├── engineCA.csr
 │   ├── engineCA.key
 |── server/
 │   ├── serverCA.crt
 │   ├── serverCA.csr
 │   ├── serverCA.key
 └── transmission/
     ├── transmissionCA.crt
     ├── transmissionCA.csr
     ├── transmissionCA.key

       

...

Note
Depending on the version of openSSL that you are using, you may see additional .srl files created which contain the signed certificate's unique serial number. These files are not used directly by the modules and not included in the certificate hierachy displayed above. 

Anchor
GenerateServerCertificate
GenerateServerCertificate
Generate Server certificate signed with Server CA private key

  1. Generate private key in PKCS8 format (server.key) for the Chariot server using the command

...

  1. Generate private key in PKCS8 format (server.key) for the Chariot server using the command below.

    Code Block
    languagetext
    openssl genrsa -out certs/server/server.key 2048

    ******* Convert from PKCS8 format to PCKS1 until Chariot supports PKCS8 format CS-612 *********

    Code Block
    languagetext
    openssl rsa -in certs/server/server.key -traditional -out certs/server/server.key


  2. Generate a Certificate Signing Request (CSR) for the Chariot server using the command below. This command generates a new CSR named "server.csr’ using the RSA private key "server.key".

    Code Block
    languagetext
    openssl req -new -key certs/server/server.key -out certs/server/server.csr


    Note

    There are a number of fields associated with the creation of the certificate. Fill them out with your relevant details where the Common Name must be the Fully Qualified Domain Name (FQDN) of the Chariot server.


  3. Sign the Server CSR with the Server CA using the command below. This command will sign the CSR "server.csr" with the Server CA certificate ‘serverCA.crt’ and RSA private key ‘serverCA.key’, creating a new X.509 certificate named ‘serverCA.crt’ valid for 3650 days (10 years). A "serverCA.srl" file will also be created containing the signed certificate's unique serial number. You will be required to enter the pass phrase associated with the private key file "serverCA.key".

    Code Block
    languagetext
    openssl x509 -req -in certs/server/server.csr -CA ca/server/serverCA.crt -CAkey ca/server/serverCA.key -CAcreateserial -out certs/server/server.crt -days 3650


...

  1. Generate private key in PSCK8 format (engine.key) for MQTT Engine using the command below.

    Code Block
    languagetext
    openssl genrsa -out certs/engine/engine.key 2048


  2. Generate a Certificate Signing Request (CSR) for MQTT Engine using the command below. This command generates a new CSR named "engine.csr’ using the RSA private key "engine.key".

    Code Block
    languagetext
    openssl req -new -key certs/engine/engine.key -out certs/engine/engine.csr


    Note

    There are a number of fields associated with the creation of the certificate. Fill them out with your relevant details where the Common Name must be the Fully Qualified Domain Name (FQDN) of the Chariot server.


  3. Sign the MQTT Engine Client CSR with the Engine CA using the command below. This command will sign the CSR "engine.csr" with the Engine CA certificate ‘engineCA.crt’ and RSA private key ‘engineCA.key’, creating a new X.509 certificate named ‘engineCA.crt’ valid for 3650 days (10 years). An "engineCA.srl" file will also be created containing the signed certificate's unique serial number. You will be required to enter the pass phrase associated with the private key file "engineCA.key".

    Code Block
    languagetext
    openssl x509 -req -in certs/engine/engine.csr -CA ca/engine/engineCA.crt -CAkey ca/engine/engineCA.key -CAcreateserial -out certs/engine/engine.crt -days 3650


...

  1. Generate private key in PKCS8 format (transmission.key) for MQTT Transmission using the command below.

    Code Block
    languagetext
    openssl genrsa -out certs/transmission/transmission.key 2048


  2. Generate a Certificate Signing Request (CSR) for MQTT Transmission using the command below. This command generates a new CSR named "transmission.csr’ using the RSA private key "transmission.key".

    Code Block
    languagetext
    openssl req -new -key certs/transmission/transmission.key -out certs/transmission/transmission.csr


    Note

    There are a number of fields associated with the creation of the certificate. Fill them out with your relevant details where the Common Name must be the Fully Qualified Domain Name (FQDN) of the Chariot server.


  3. Sign the MQTT Transmission Client CSR with the Transmission CA using the command below. This command will sign the CSR "transmission.csr" with the Transmission CA certificate ‘transmissionCA.crt’ and RSA private key ‘transmissionCA.key’, creating a new X.509 certificate named ‘transmissionCA.crt’ valid for 3650 days (10 years). An "transmissionCA.srl" file will also be created containing the signed certificate's unique serial numberyears). You will be required to enter the pass phrase associated with the private key file "transmissionCA.key".

    Code Block
    languagetext
    openssl x509 -req -in certs/transmission/transmission.csr -CA ca/transmission/transmissionCA.crt -CAkey ca/transmission/transmissionCA.key -CAcreateserial -out certs/transmission/transmission.crt -days 3650


...

chariotcerts/
├── ca/
│   ├── ca.crt
│   ├── ca.key
│   ├── ca.srl
  ├── engine/
│   │   ├── engineCA.crt
│   │   ├── engineCA.csr
│   │   ├── engineCA.key
│   │   └── engineCA.srl
│   ├── server/
│   │   ├── serverCA.crt
│   │   ├── serverCA.csr
│   │   ├── serverCA.key
│   │   └── serverCA.srl
│   └── transmission/
│       ├── transmissionCA.crt
│       ├── transmissionCA.csr
│       ├── transmissionCA.key
│       └── transmissionCA.srl
└── certs/
   ├── engine/
   │   ├── engine.crt
   │   ├── engine.csr
   │   └── engine.key
   ├── server/
   │   ├── server.crt
   │   ├── server.csr
   │   └── server.key
   └── transmission/
       ├── transmission.crt
       ├── transmission.csr
       └── transmission.key

...

Private Keyserverkeycerts
File TypeFile NameFile Location
CA ChainserverCA.crtchariotcerts/ca/server
CA ChainPrivate KeyserverCAserver.crtkeychariotcerts/cacerts/server
Certificateserver.crtchariotcerts/certs/server

...