sam add certificate
To add a new certificate to the certificate table, use the sam add certificate command in EXEC mode.
sam add certificate filepath location {trust | untrust}
Syntax Description
filepath |
Absolute path to the source location of the certificate. |
location |
Storage site of the certificate. Use one of the following: root, mem, disk0, disk1, or other flash device name on router. |
trust |
Adds the certificate to the certificate table without validation by the Software Authentication Manager (SAM). To add a root certificate, you must use the trust keyword. Adding a root certificate with the untrust keyword is not allowed. |
untrust |
Adds the certificate to the certificate table after the SAM has validated it. Adding a root certificate with the untrust keyword is not allowed. To add a root certificate, you must use the trust keyword. |
Command Default
None
Command Modes
EXEC modeCommand History
Release |
Modification |
---|---|
Release 2.0 |
This command was introduced. |
Usage Guidelines
For security reasons, the sam add certificate command can be issued only from the console or auxiliary port of the networking device; the command cannot be issued from a Telnet connection to any other interface on the networking device.
The certificate must be copied to the network device before it can be added to the certificate table. If the certificate is already present in the certificate table, the SAM rejects the attempt to add it.
When adding root certificates, follow these guidelines:
-
Only the certificate authority (CA) root certificate can be added to the root location.
-
To add a root certificate, you must use the trust keyword. Adding the root certificate with the untrust keyword is not allowed.
Use of the trust keyword assumes that you received the new certificate from a source that you trust, and therefore have enough confidence in its authenticity to bypass validation by the SAM. One example of acquiring a certificate from a trusted source is downloading it from a CA server (such as Cisco.com) that requires user authentication. Another example is acquiring the certificate from a person or entity that you can verify, such as by checking the identification badge for a person. If you bypass the validation protection offered by the SAM, you must verify the identity and integrity of the certificate by some other valid process.
Certificates added to the memory (mem) location validate software installed in memory. Certificates added to the disk0 or disk1 location validate software installed on those devices, respectively.
Note |
If the sam add certificate command fails with a message indicating that the certificate has expired, the networking device clock may have been set incorrectly. Use the show clock command to determine if the clock is set correctly. |
Task ID
Task ID |
Operations |
---|---|
crypto |
execute |
Examples
The following example shows how to add the certificate found at /bootflash/ca.bin to the certificate table in the root location without first validating the certificate:
RP/0/RP0/CPU0:router# sam add certificate /bootflash/ca.bin root trust
SAM: Successful adding certificate /bootflash/ca.bin
The following example shows how to add the certificate found at /bootflash/css.bin to the certificate table in the memory (mem) location after validating the certificate:
RP/0/RP0/CPU0:router# sam add certificate /bootflash/css.bin mem untrust
SAM: Successful adding certificate /bootflash/css.bin