aws-samples / aws-cloudhsm-jce-examples

Sample applications demonstrating how to use the CloudHSM JCE
MIT No Attribution
36 stars 56 forks source link

KeyUtilitiesRunner.java importRSAKey reproting this error. Attirbutes being specified are imcomplete #57

Closed LIJI-Max closed 1 year ago

LIJI-Max commented 1 year ago

Exception in thread "main" com.amazonaws.cloudhsm.jce.jni.exception.AttributeException: Attributes being specified are incomplete: Incomplete template at com.amazonaws.cloudhsm.jce.jni.RsaPrivateKeyImportBuilder.do_importKey(Native Method) at com.amazonaws.cloudhsm.jce.jni.RsaPrivateKeyImportBuilder.importKey(RsaPrivateKeyImportBuilder.java:35) at com.amazonaws.cloudhsm.jce.provider.ImportKey.importRsaPrivateKey(ImportKey.java:168) at com.amazonaws.cloudhsm.jce.provider.RsaKeyFactory.engineGeneratePrivate(RsaKeyFactory.java:153) at java.security.KeyFactory.generatePrivate(KeyFactory.java:366) at com.amazonaws.cloudhsm.examples.KeyUtilitiesRunner.importRsaKey(KeyUtilitiesRunner.java:268) at com.amazonaws.cloudhsm.examples.KeyUtilitiesRunner.main(KeyUtilitiesRunner.java:147)

rday commented 1 year ago

We didn't have enough information to investigate this issue. Our example code is building and executing on our side, so maybe the error is fixed. Please re-open if this is still a problem.