Importing Private Key to HSM

The private key, created with the backup command (check the Section Create a Backup of CA Database), needs to be imported to the HSM

  1. Open a command prompt as an Administrator and use the below command to import the .p12 file to the HSM

›_ Console

> cngtool Name=<key_name> [Spec=<key_specifier>] [Type=<type>]
[Password=<pass>] ImportKey=<filename>

Example

›_ Console

> cngtool Name=PrivateKey Spec=0 Type=PKCS8 Password=123456
ImportKey=C:\CaBackup\Root-CA.p12

If you are using Smartcard Authentication, the prompt will go on the PIN Pad device to insert Smartcard and enter the pin. Then press OK button on the PIN Pad.

  1. Check with the cngtool whether the private key was imported successfully

›_ Console

> cngtool ListKeys

If you are using Smartcard Authentication, the prompt will go on the PIN Pad device to insert Smartcard and enter the pin. Then press OK button on the PIN Pad.