0

I am looking for a sample java code for connecting nShield Connect HSM by using PKCS11 library. RSA key is created on token slot 1 and soft token slot 2. Imported Certificate is on slot 1. I like to connect to HSM, read the slot 1 and find the certificate and sign the XML document.

S.Doe
  • 1
  • 2
  • Consider using [jacknji11](https://github.com/joelhockey/jacknji11) or [iaik pkcs11 provider](https://jce.iaik.tugraz.at/sic/Products/Core_Crypto_Toolkits/PKCS_11_Provider). If my memory serves me well, they both contain some sample code. Good luck! – vlp Dec 14 '15 at 15:14
  • Thank you. I really appreciate your help. – S.Doe Dec 15 '15 at 16:04

1 Answers1

1

I know I am late but here goes for those who have the same problem:

You can use Sun PKCS#11 Provider or IAIK to connect Java programs to the PKCS#11 libraries.

This tutorial explains how to use JCE for cryptographic operations e.g. encrypt, sign, etc.

Homaei
  • 177
  • 1
  • 1
  • 10