On This Page
Importing and Reverting a Signed Certificate
Overview
This procedure describes how to import a CA-signed certificate into TOS, and if needed, revert to a self-signed certificate.
Prerequisites
Signed Certificate Format
The signed certificate must:
-
Be RSA compatible
-
In .PEM format; other formats are not supported
Signed Certificate Bundle and Order
The certificate bundle refers to the certificate chain file, and must include the following certificates:
-
<your_domain>.crt
-
intermediate.crt
-
root.crt, only when using an internal or a private self-signed certificate
Each certificate in the bundle must be preceded by the -----BEGIN CERTIFICATE----- header and ended by the -----END CERTIFICATE----- footer.
Certificate creation
Here's an example of the command to create the certificate bundle:
Certificate order in bundle
The order of the certificates in the chain file is important for clients to fully verify the server certificate. The chain file must start with the server certificate, followed by the intermediate CA certificates, and end with the root CA certificate.
-----BEGIN CERTIFICATE-----
(Domain Server Certificate)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Intermediate-1)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Intermediate-2)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Root)
-----END CERTIFICATE-----
Import CA-Signed Server Certificate
Import a CA-signed server certificate into TOS to authenticate and encrypt communications with your TOS server. Make sure you import the entire certificate chain as a bundle including the root, an intermediate certificate, and the server certificate.
-
If your organization uses an intermediate CA, first create the certificate bundle:
-
If the private key has a passphrase, remove it now.
-
Run:
-
When prompted, enter the passphrase for the original key.
The output file [new. key] is now unencrypted.
-
-
Create a certificate bundle (bundle.crt) from a signed server certificate (certificate.cer) and an intermediate CA certificate (intermediate.cer):
-
-
Stop all TOS services:
-
Import the signed server certificate:
[<ADMIN> ~]$ sudo tos certificate import --type=<"server"> --cert=<CERT-PATH> --key=<KEY-PATH>sudo tos certificate import --type=<"server"> --cert=<CERT-PATH> --key=<KEY-PATH>where:
- <"server"> is the CA-signed server certificate used for the TOS web server.
- <CERT-PATH> is the full path to the certificate bundle (certificate chain) with the required certificates.
- <KEY-PATH> is the full path to your private key.
Example
$ sudo tos certificate import --type="server" --cert=/tmp/certfile.pem --key=/tmp/keyfile.key
-
Restart TOS:
Revert CA-Signed Certificate to Self-Signed
Revert a CA-signed server certificate to a self-signed one if needed.
-
Stop all TOS services:
-
Revert the certificate:
-
<"server"> is the reverted self-signed certificate to use for the TOS web server.
-
Restart TOS:
where:
Was this helpful?
Thank you!
We’d love your feedback
We really appreciate your feedback
Send this page to a colleague