Skip to content

Instantly share code, notes, and snippets.

@jvehent
Created August 30, 2018 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jvehent/45a9a07dc1024ebda97ad18b1996aee1 to your computer and use it in GitHub Desktop.
Save jvehent/45a9a07dc1024ebda97ad18b1996aee1 to your computer and use it in GitHub Desktop.

export pubkey from certificate

openssl x509 -inform DER -in dep2.der -pubkey -noout > nss_pub.pem

sign with hsm

openssl dgst -engine cloudhsm -sha256 -sign dep2_private_hsm.pem -out test.sig test.plain

verify with public key without hsm

openssl dgst -sha256 -verify nss_pub.pem -signature test.sig test.plain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment