Use the viocli certificate command to add, remove, and view certificates.

Note: To generate a certificate signing request (CSR) or update an existing certificate, see viocli deployment Command.

The viocli certificate command supports a variety of actions to perform different tasks. The following parameters apply to all actions.

Parameter Mandatory or Optional Description

-d NAME or --deployment NAME

Optional

Name of the deployment to use.

If you do not enter a value, the default deployment is used.

-p or --progress

Optional

Shows the progress of the current operation.

--verbose

Optional

Displays output in verbose mode.

You can run viocli certificate -h or viocli certificate --help to display the actions and parameters for the command. You can also use the -h or --help option on any action to display parameters for the action. For example, viocli certificate add -h will show parameters for the add action.

The actions that viocli certificate supports are listed as follows.

viocli certificate add [-d NAME] --name CERT-NAME --cert CERT-FILE [-p] [--verbose]

Adds a certificate to the certificate store. The following additional parameters apply to the add action.

Parameter Mandatory or Optional Description

--cert CERT-FILE

Mandatory

Certificate to add. The certificate must be in PEM format.

--name CERT-NAME

Mandatory

Name of the certificate.

 

viocli certificate remove [-d NAME] --name CERT-NAME [-p] [--verbose]

Removes a certificate from the certificate store. The following additional parameters apply to the remove action.

Parameter Mandatory or Optional Description

--name CERT-NAME

Mandatory

Name of the certificate.

 

viocli certificate list [-d NAME] [--json JSON | -pretty PRETTY] [-p] [--verbose]

Lists all certificates in the certificate store. The following additional parameters apply to the list action.

Parameter Mandatory or Optional Description

--json JSON

--pretty PRETTY

Optional

Displays output in JSON format or as formatted text.

If you do not enter a value, PRETTY is used when the command is run interactively and JSON is used when the command is run noninteractively.

 

viocli certificate show [-d NAME] --name CERT-NAME [--json JSON | --pretty PRETTY] [-p] [--verbose]

Shows detailed information about a specified certificate. The following additional parameters apply to the show action.

Parameter Mandatory or Optional Description

--name CERT-NAME

Mandatory

Name of the certificate.

--json JSON

--pretty PRETTY

Optional

Displays output in JSON format or as formatted text.

If you do not enter a value, PRETTY is used when the command is run interactively and JSON is used when the command is run noninteractively.