This topic explains the use of the sign command to generate a signing certificate.
Feature description
The sign command utilizes a selected private key to produce a signing certificate. Alternatively, the openssl command can be used to create a signing certificate. For further details, see create a self-signed certificate to assist with HSM initialization.
Ensure you start the key_mgmt_tool and log on to HSM as a CU before executing this command.
Syntax
Enter parameters as per the following syntax. For descriptions of each parameter, refer to parameters.
sign -f <file name>
-k <private key handle>
-m <signature mechanism>
-out <signed file name>
Parameters must be entered in the order specified by the syntax.
Example
Command: sign -f messageFile -k 8 -out signedFile -m 1
Signature creation successful
signature is written to file signedFile
Cfm3Sign: sign returned: 0x00 : HSM Return: SUCCESS
Parameters
Parameter name |
Description |
Required |
Valid values |
-f |
Indicates the file to be signed. |
Yes |
No Special Requirements |
-k |
Specifies the private key handle for signing. |
Yes |
No Special Requirements |
-m |
Defines the integer for the signature mechanism. |
Yes |
|
-out |
Designates the file name for saving the signature. |
Yes |
No Special Requirements |