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.
If one initializes any of the
NativeECKeyPairGenerator
orNativeXDHKeyPairGenerator
with aSecureRandom
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 appropriateKeyPair
.Back-ported from: https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/711
Signed-off by: Kostas Tsiounis kostas.tsiounis@ibm.com