[15] RFR 8236070: Multiple test failures after JDK-8234465

Weijun Wang weijun.wang at oracle.com
Tue Dec 17 08:47:46 UTC 2019


Multiple tests failed after my code change for including the public key into the encoded EC private key:

   https://bugs.openjdk.java.net/browse/JDK-8234465
   https://hg.openjdk.java.net/jdk/jdk/rev/066bb54fba95

The reason is that while a newly generated ECPrivateKeyImpl (or one decoded from a PKCS #8 file already containing the public key info) has the public key info and can encode it in a PKCS #8 file, the ECPrivateKeySpec still does not have the related method so a private key created from KeyFactory will not have it, and key comparison tests like KeySpecTest.java and TestEC.java fail.

Therefore I'd like to revert the change in JDK-8234465 and think of a better way to resolve this issue. We might either compare the keys in a different way or introduce the getPublicKey method to more classes to make this info available everywhere.

Thanks,
Max

p.s. DefaultSignatureAlgorithm.java fails with a different reason.


More information about the security-dev mailing list