Import a Key using tmsh

  1. Generate a key using PKCS#11 tool

›_ Console

# p11tool2 [Slot=<slot_id>] LoginUser=<user_pin>

[PubKeyAttr=<pub_key_attr>] [PrvKeyAttr=<prv_key_attr>]

GenerateKeyPair=<mech>

For Example

# /opt/utimaco/bin/p11tool2 LoginUser=123456 PubKeyAttr=CKA_LABEL="f5-

testkey",CKA_ID=0x383564383335623832386565326662393230313931633265303934373634

3164 PrvKeyAttr=CKA_LABEL="f5-

testkey",CKA_ID=0x383564383335623832386565326662393230313931633265303934373634

3164 GenerateKeyPair=RSA
  1. Alternatively, if the user wants to add/import the existing key via console

›_ Console

# tmsh install sys crypto key <nethsm_key_label> from-nethsm security-type nethsm 
  1. Save the configuration

›_ Console

# tmsh save sys config