Adding certificate to Gnupg

  1. Create master key based on existing key

›_ Console

# gpg --expert --full-generate-key 
  1. Select option (14) Existing key from card

tmp2kkfj6i2.jpg

GPG command to select existing key from HSM

This will list the serial number of the HSM slot and existing keys which has corresponding Certificate.

tmp_bgc1y0s.jpg

List existing keys on HSM through gpg

  1. Enter the number for the keys you want use

tmpv3ehrabk.jpg

Selecting key number

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

tmpeq161ftw.jpg

Finishing gpg Key Generate Command

  1. List the keys

›_ Console

# gpg --list-keys 
tmpj32ts98u.jpg

gpg list keys