ibmruntimes / openj9-openjdk-jdk11

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

Revert to Java impl when non-default SecureRandom present #744

Closed KostasTsiounis closed 9 months ago

KostasTsiounis commented 9 months ago

If one initializes any of the NativeECKeyPairGenerator or NativeXDHKeyPairGenerator with a SecureRandom implementation, it is effectively ignored, as the equivalent OpenSSL code is used instead.

This fix changes that to using OpenSSL only when no or the default Sun implementation of SecureRandom is provided. In any other case, the original Java implementation is used to generate the appropriate KeyPair.

Back-ported from: https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/711

Signed-off by: Kostas Tsiounis kostas.tsiounis@ibm.com

pshipton commented 9 months ago

jenkins copyright check

pshipton commented 9 months ago

jenkins compile amac jdk11