ibmruntimes / openj9-openjdk-jdk11

Extensions for OpenJDK 11 for Eclipse OpenJ9
GNU General Public License v2.0
31 stars 112 forks source link

Don't test unavailable algorithms #670

Closed keithc-ca closed 1 year ago

keithc-ca commented 1 year ago

Support for EdDSA, Ed25519 and Ed448 was added in Java 15.

Fixes: https://github.com/eclipse-openj9/openj9/issues/17579.

keithc-ca commented 1 year ago

Jenkins test sanity.openjdk alinux64 jdk11

keithc-ca commented 1 year ago

Strange: the test job didn't use this change; instead it used the current openj9 branch - b33416dc888.

 Using OPENJDK_REPO = [11:[aarch64_linux:https://github.com/ibmruntimes/openj9-openjdk-jdk11.git]] OPENJDK_BRANCH = [11:[aarch64_linux:openj9]] OPENJDK_SHA = [11:[aarch64_linux:]]

I've launched a grinder instead: https://openj9-jenkins.osuosl.org/job/Grinder/2502.

JasonFengJ9 commented 1 year ago

https://openj9-jenkins.osuosl.org/job/Grinder/2502/consoleFull

12:41:59  STDERR:
12:41:59  java.lang.IllegalArgumentException: Key must be at least 160 bits
12:41:59    at com.evilprovider.EvilHmacSHA1.engineInit(EvilHmacSHA1.java:44)
12:41:59    at java.base/javax.crypto.Mac.init(Mac.java:433)
12:41:59    at java.base/com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(PBKDF2KeyImpl.java:182)
12:41:59    at java.base/com.sun.crypto.provider.PBKDF2KeyImpl.<init>(PBKDF2KeyImpl.java:122)
12:41:59    at java.base/com.sun.crypto.provider.PBKDF2Core.engineGenerateSecret(PBKDF2Core.java:69)
12:41:59    at java.base/javax.crypto.SecretKeyFactory.generateSecret(SecretKeyFactory.java:338)
12:41:59    at SecKeyFacSunJCEPrf.main(SecKeyFacSunJCEPrf.java:63)
12:41:59    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:41:59    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
12:41:59    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:41:59    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
12:41:59    at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
12:41:59    at java.base/java.lang.Thread.run(Thread.java:839)
12:41:59  
12:41:59  JavaTest Message: Test threw exception: java.lang.IllegalArgumentException: Key must be at least 160 bits

This is a known failure - jdk_security2_0_FAILED javax/crypto/SecretKeyFactory/SecKeyFacSunJCEPrf.java IllegalArgumentException: Key must be at least 160 bits

JasonFengJ9 commented 1 year ago

Strange: the test job didn't use this change; instead it used the current openj9 branch - b33416dc888.

I think this is a known issue as well, the test change is not picked up, it was determined a low priority item.

FYI @AdamBrousseau

keithc-ca commented 1 year ago

https://github.com/ibmruntimes/openj9-openjdk-jdk11/pull/669 should fix that failure.

keithc-ca commented 1 year ago

I think this is a known issue as well, the test change is not picked up, it was determined a low priority item.

This may become a more important issue with an increased focus on testing security-related changes.

JasonFengJ9 commented 1 year ago

Created an issue - https://github.com/ibmruntimes/openj9-openjdk-jdk/issues/613