-
Notifications
You must be signed in to change notification settings - Fork 408
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
build failure with openjdk-17 #1298
Comments
This makes me think to eclipse-californium/californium#2040 (comment) But I don't know how this could be link to java 17 🤔 |
I tested building Cf and I have somewhat the same prob |
not the second time I build it 🤯 |
ok looks like it is related, I'll take a look |
Tested on my machine get same error with openjdk 17. Try to debug it but it the error is raised by JDK. So :
|
|
this fix the issue for those 2 tests but we also have the problem in the integration test who use the same hardcoded key maybe a PR is the eclipse staff manage to change my email address ❓ 😂 😹 |
Yep but I would like to better understand why the previous way doesn't work anymore 🤔 |
I guess it's the result of this fix: Improper ECDSA signature verification (Libraries, 8277233) (CVE-2022-21449) |
So finally, we (mainly @boaks) guess the issue is that some of our EC points created with : // Get point values
byte[] publicX = Hex
.decodeHex("fcc28728c123b155be410fc1c0651da374fc6ebe7f96606e90d927d188894a73".toCharArray());
byte[] publicY = Hex
.decodeHex("d2ffaa73957d76984633fc1cc54d0b763ca0559a9dff9706e9f4557dacc3f52a".toCharArray());
byte[] privateS = Hex
.decodeHex("1dae121ba406802ef07c193c1ee4df91115aabd79c1ed7f4c0ef7ef6a5449400".toCharArray());
// Get Elliptic Curve Parameter spec for secp256r1
AlgorithmParameters algoParameters = AlgorithmParameters.getInstance("EC");
algoParameters.init(new ECGenParameterSpec("secp256r1"));
ECParameterSpec parameterSpec = algoParameters.getParameterSpec(ECParameterSpec.class);
// Create key specs
KeySpec publicKeySpec = new ECPublicKeySpec(new ECPoint(new BigInteger(publicX), new BigInteger(publicY)),
parameterSpec);
KeySpec privateKeySpec = new ECPrivateKeySpec(new BigInteger(privateS), parameterSpec); have negative coordinates. But EC is using Positive number. So the right way to create BigInteger from should be : -new BigInteger(publicX)
+new BigInteger(1, publicX) A question remain : Why this doesn't work only with openjdk 15 or > More details at : eclipse-californium/californium#2040 (comment) Thx @boaks for your help. |
It should be fixed by #1299 |
it is fixed, thanks |
Using latest Debian 11 java17 :
I have some tests falling, example:
Logs for LeshanBootstrapServerBuilderTest.create_server_without_psk_cipher
The text was updated successfully, but these errors were encountered: