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.
Go to CLI configuration mode:
hostname > enable hostname # configure terminal
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:
URLis the direct path to the certificate or private key file.commentis a description of the certificate. It must be enclosed in double quotation marks.
Verify that the certificate was added to the certificate database:
hostname (config) # show crypto certificate name <certificateName>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.keyhostname (config) # show crypto certificate name newcert
Certificate with name 'newcert'
Private Key: present
Serial Number: 0x532gdda69e90b436542ea92e9gd5dor9
SHA-1 Fingerprint: 4563a957349g83264bw2c8b32c0rw5g8d8353246
.
.
.