Adding certificate to GnuPG

  1. Create a master key based on the existing key.

# gpg --expert --full-generate-key 


  1. Select option (14) Existing key from card. This will list the serial number of the HSM slot and existing keys which has a corresponding certificate.

image-20260520-071201.png

GPG command to select existing key from HSM

  1. Enter the number for the keys you want to use.

image-20260520-071258.png

List existing keys on HSM through GPG & selecting key number

  1. Enter “Q” then provide key expiry, real name, and email address. Provide slot PIN when prompted.

image-20260520-071432.png


Finishing GPG Key Generate Command

  1. List the keys.

# gpg --list-keys 
image-20260520-071451.png


GPG list keys