Prerequisites:
Note: Exceptions to this requirement can be a wildcard certificate. However, the Subject Alternative Name (SAN) should also include the Fully Qualified Domain Name of the appliance.
Notes:
Generating a Certificate Signing Request (CSR):
unalias openssl
openssl genrsa -out key_filename.key 2048
openssl req -new -key key_filename.key -out certificate_request.csr
Validating the custom certificate files:
file <cert_file>.crt
file <cert_key>.key
Replace <cert_file> and <cert_key> with the actual .crt and .key names.
The below example command and the associated output means the signature is correct:
#file customcert.crt
customcert.crt: PEM certificate#file customcert_privatekey.key
customcert_privatekey.key: PEM RSA private key - CorrectThe below example command and the associated output means the signature is incorrect:
#file custcert.crt
custcert.crt: ASCII text - Incorrect#file custcert_privatekey.key
custcert_privatekey.key: ASCII textNote: For PFX/PB7 key, it may be necessary to run some additional commands to get to the expected format.
----- BEGIN RSA PRIVATE KEY-----
<payload>
-----END RSA PRIVATE KEY-----
Note: It could also contain Header and Footer with some digest in between because some conversion and or exporting tools also write so called BAG ATTRIBUTES to output file. It is required and safe to remove these from the above files.
Installing a custom certificate:
consoleuser.custom-cert remove command :custom-cert removeRemoved all custom certificates. custom-cert copy --host <IP_of_SFTP_host> --user <user_of_SFTP_host> --port 22 --path </path/to/file>.crt
custom-cert copy --host <IP_of_SFTP_host> --user <user_of_SFTP_host> --port 22 --path </path/to/file>.keysupport".copying...
successfully copied.crt and .key) can be moved to the folder custom_certs under /home/ubuntu/ directory and then the older certificates can be manually deleted.custom-cert list command:custom-cert list
file.crt
file.keyAbove should show the new certificate which needs to be applied.
custom-cert apply command:custom-cert apply Successfully applied new certificate. All active UI sessions have to be restarted.
While replacing the certs, getting below error
"Failed to find the Key file"
openssl rsa -in file.key -out newfile.key
sed -i 's/-----BEGIN PRIVATE KEY-----/-----BEGIN RSA PRIVATE KEY-----/g' vrni_key.key
sed -i 's/-----END PRIVATE KEY-----/-----END RSA PRIVATE KEY-----/g' vrni_key.key