opensslopenj9

How to make sure that OpenJ9 uses bundled OpenSSL crypto library for ALL crypto operations?


I have built OpenJ9 with my customized OpenSSL, using --with-openssl and --enable-openssl-bundling options. I can even see libcrypto.so in the built binaries, but I'm sure they are not used when I create RSA key pair using java.security.KeyPairGenerator. How can I "force" JVM to use OpenSSL for all crypto operations? I've tried -Djdk.nativeCrypto=true That didn't make any difference.


Solution

  • OpenJ9 uses openssl for a few select functions, like Digest, CBC, GCM, RSA, and ChaCha20. It may not be used for key generation as that is a less frequently performed operation.

    You could try using -Djdk.nativeCryptoTrace=true to verify that the native acceleration is being used.