This topic explains how to import a public key into HSM using the importPubKey command.
Feature description
The importPubKey command allows for the importation of a public key from a file into HSM.
Utilizing the exportPubKey command, importPubKey facilitates the backup or migration of public keys.
Ensure you start the key_mgmt_tool and log on to HSM as a CU before executing this command.
Syntax
Enter the parameters as outlined in the syntax below. For descriptions of each parameter, see Parameters.
importPubKey -l <label>
-f <key-file>
[-sess]
[-id <key-id>]
[min_srv <minimum-number-of-servers>]
[-timeout <number-of-seconds>]
Parameters must be entered in the specified order.
Example
The following example demonstrates importing the publickey.pem file and assigning the label importedPublicKey to the key. The output indicates that the handle for the imported public key in HSM is 18.
Command: importPubKey -l importedPublicKey -f publickey.pem
Cfm3CreatePublicKey returned: 0x00 : HSM Return: SUCCESS
Public Key Handle: 18
Cluster Status:
Node id 0 status: 0x00000000 : HSM Return: SUCCESS
Parameters
Parameter Name | Description | Required | Valid Values |
-l | Defines the label for the imported key. | Yes | No specific requirements |
-f | Indicates the file name containing the key to import. | Yes | No specific requirements |
-sess | Marks the imported key as a session key. | No | No specific requirements |
-id | Assigns an ID to the imported key. | No | No specific requirements |
-min_srv |
| No | No specific requirements |
-timeout |
| No | No specific requirements |