Open dhruv09 opened 2 years ago
Hi @dhruv09 It's likely that you're not providing login credentials to the HSM while running the jar.
You might be running:
$ java -jar target/assembly/cloudhsm-keystore-runner.jar --store <keystore_location> --password <keystore_password>
While actually, you should be running:
$ java -DHSM_USER=<cu_username> -DHSM_PASSWORD=<cu_password> -jar target/assembly/cloudhsm-keystore-runner.jar --store <keystore_location> --password <keystore_password>
Exception in thread "main" com.amazonaws.cloudhsm.jce.jni.exception.ProviderException: The underlying Provider connection was lost: Communication with the device was lost during the execution of the function. at com.amazonaws.cloudhsm.jce.jni.CloudHsmObjectFinder.do_find(Native Method) at com.amazonaws.cloudhsm.jce.jni.CloudHsmObjectFinder.find(CloudHsmObjectFinder.java:10) at com.amazonaws.cloudhsm.jce.provider.CloudHsmKeyStore.engineGetKey(CloudHsmKeyStore.java:522) at com.amazonaws.cloudhsm.jce.provider.KeyStoreWithAttributes.getKey(KeyStoreWithAttributes.java:182) at com.amazonaws.cloudhsm.examples.KeyUtilitiesRunner.getKeyByUsingAttributesMap(KeyUtilitiesRunner.java:222) at com.amazonaws.cloudhsm.examples.KeyUtilitiesRunner.main(KeyUtilitiesRunner.java:167)
Please help!!