Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.security.InvalidKeyException: Could not create key" when using the SunPKCS11-NSS-FIPS provider #310

Open
sravannsk opened this issue Feb 22, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sravannsk
Copy link

Hi We recently deployed the rest services in ROcky LInux +Wildfly 27.x + Corretto JDK 11.0.16 and this service trying to connect to the AWS MQ, noticing the CKR_ATTRIBUTE_VALUE_INVALID , which is known issues in OpenJDK but looks that is fixed in the latest, can you please check if the issues fixed on Amazon COrretto JDK

02-22-2023 16:06:07,871 INFO [stdout] (DefaultMessageListenerContainer-1) ... 7 more
02-22-2023 16:06:07,871 INFO [stdout] (DefaultMessageListenerContainer-1) Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_VALUE_INVALID
02-22-2023 16:06:07,871 INFO [stdout] (DefaultMessageListenerContainer-1) at sun.security.pkcs11.wrapper.PKCS11.C_CreateObject(Native Method) ~[jdk.crypto.cryptoki:?]
02-22-2023 16:06:07,872 INFO [stdout] (DefaultMessageListenerContainer-1) at sun.security.pkcs11.P11SecretKeyFactory.createKey(P11SecretKeyFactory.java:285) ~[jdk.crypto.cryptoki:?]
02-22-2023 16:06:07,872 INFO [stdout] (DefaultMessageListenerContainer-1) at sun.security.pkcs11.P11SecretKeyFactory.convertKey(P11SecretKeyFactory.java:191) ~[jdk.crypto.cryptoki:?]
02-22-2023 16:06:07,872 INFO [stdout] (DefaultMessageListenerContainer-1) at sun.security.pkcs11.P11SecretKeyFactory.convertKey(P11SecretKeyFactory.java:123) ~[jdk.crypto.cryptoki:?]
02-22-2023 16:06:07,872 INFO [stdout] (DefaultMessageListenerContainer-1) at sun.security.pkcs11.P11Mac.engineInit(P11Mac.java:204) ~[jdk.crypto.cryptoki:?]
02-22-2023 16:06:07,872 INFO [stdout] (DefaultMessageListenerContainer-1) at javax.crypto.Mac.init(Mac.java:433) ~[?:?]

If your issue is specific to Corretto 11, then you are in the right place. Please proceed with the following.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps and (source) code to reproduce the behavior.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Platform information

OS: [e.g. Amazon Linux 2]
Version [e.g. "11.0.1+13-1" (output from "java -version")]

Additional context

Add any other context about the problem here.

For VM crashes, please attach the error report file. By default the file name is hs_err_pidpid.log, where pid is the process ID of the process.

@sravannsk sravannsk added the bug Something isn't working label Feb 22, 2023
@benty-amzn
Copy link
Contributor

Hi, the latest version of Corretto 11 is 11.0.18 at this time, so if you're still using 11.0.16 you can try the latest release to see if it resolves your issue. Corretto typically includes all patches from openjdk, so if the issue has been addressed there (do you have the JBS id so we can confirm?) it should be present in Corretto as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants