certs_manage.sh

Function

This command is used to manage certificates, including web and FusionDirector certificates. Specifically, it can query and delete unused certificates, and restore the previous certificate.

Syntax

certs_manage.sh [ACTION] [COMPONENT] [OPTION]
Table 1 Parameters of the subcommand

Parameter

Mandatory/Optional

Description

ACTION

Mandatory

Operation type. Values:

  • getunusedcert: queries unused certificates.
  • deletecert: deletes unused certificates.
  • restorecert: restores the previous certificate.
NOTE:
  • When deleting a FusionDirector certificate, you need to specify the name of the certificate to be deleted. If the previous certificate has the same name as an unused certificate, delete the unused certificate first.
  • When deleting a certificate, you need to enter yes or no to confirm the deletion.
  • After a web certificate is restored, it will be overwritten by the previous one. For a FusionDirector certificate, if it is in use or already exists in the current certificate list, the restoration will fail.

COMPONENT

Mandatory

Certificate type. Values:

  • fd-ccae: FusionDirector certificate
  • web: web certificate

OPTION

Optional

When deleting a FusionDirector certificate, you need to specify the certificate name. The value is a string of 4 to 64 characters, including digits, uppercase letters, lowercase letters, underscores (_), and dots (.). The value cannot contain two consecutive dots (..).

Usage Guidelines

You must run the certs_manage.sh command as the root user.

Examples

  1. Run the following command to switch to the directory containing the target script:
    cd /usr/local/mindx/MindXOM/tools
  2. Manage certificates as required. The following uses a FusionDirector certificate as an example.
    • Query unused certificates.
      ./certs_manage.sh getunusedcert web
    • Delete unused certificates.
      ./certs_manage.sh deletecert fd-ccae a200_fd.crt
    • Restore the previous certificate.
      ./certs_manage.sh restorecert fd-ccae