Skip to main content

Download certificate

Use one of the following commands to list all available actions to download a certificate:

smctl cert download <flag>

or

smctl cert save <flag>

tabla 1. Flags for downloading a certificate

Shortcut

Flag

Description

-c

--chain

Download the complete certificate chain.

-f

--format string

Allowed formats include pem, der, p12 or pfx. The default format is pem. The private key will not be downloaded. 

Format:

--format="<value>"

--keypair-alias string

Download the default certificate for a keypair alias. 

Format:

--keypair-alias="<value>"

--keypair-id string

Download the default certificate for a keypair ID. 

Format:

--keypair-id="<value>"

-n

--name string

Name of the certificate file. The default name is the certificate alias. 

Format:

--name="<value>"

-o

--out string

Output path where the certificate is to be downloaded. 

Format:

--out="<value>"

-p

--password string

Password to be used in case of p12 or pfx format. The default is “changeit”. 

Format:

--password="<value>"

--account-id string

Account ID for the user. 

Format:

--account-id="<value>"

--issuer-first

By default, the end entity certificate is placed first when downloading complete chain. Setting this option to put the Root CA first.

-h

--help

Help for download.


Examples

Description: Download a certificate for the provided certificate ID to the specified output folder.

Command:

smctl certificate download <certificate-id> --out <path where certificate should be stored>

Command sample:

smctl certificate download 23454-234542-23454-23454 –-out C:\Users\Name\Desktop

Description: Download the default certificate for the provided keypair alias. The complete certificate chain will be downloaded in .der format in the current SMCTL directory.

Command:

smctl certificate download --keypair-alias=<keypair alias> --chain --format=<format>

Command sample:

smctl certificate download --keypair-alias=keypairdynamic-key-mk2 -c -f=der