Downloading a certificate using the CLI

Prev Next

Use the commands in this section to download the public and private keys for a certificate.

Important

The private key is an optional parameter, but it must be downloaded to activate the certificate for an application that requires a private key.

To download a certificate:
  1. Go to CLI configuration mode:

    hostname > enable
    hostname # configure terminal
  2. Specify the name for the certificate and download it:

    hostname (config) # crypto certificate name <certName> fetch public-cert-url <URL> [private-key-url <URL>] [comment "<comment>"]

    where:

    • URL is the direct path to the certificate or private key file.

    • comment is a description of the certificate. It must be enclosed in double quotation marks.

  3. Verify that the certificate was added to the certificate database:

    hostname (config) # show crypto certificate name <certificateName>
  4. Save your changes.

    hostname (config) # write memory

Example

This example downloads a certificate and private key, and adds it to the certificate database with the name "newcert."

hostname (config) # crypto certificate name newcert fetch public-cert-url http://acme/security/certs/acme.crt private-key-url http://acme/security/certs/acme.key
hostname (config) # show crypto certificate name newcert
Certificate with name 'newcert'
    Private Key:               present
    Serial Number:             0x532gdda69e90b436542ea92e9gd5dor9
    SHA-1 Fingerprint:         4563a957349g83264bw2c8b32c0rw5g8d8353246
.
.
.