ibmruntimes / openj9-openjdk-jdk11

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

Get native EC key pointer during init through ECUtil instead of key impl #783

Closed KostasTsiounis closed 5 months ago

KostasTsiounis commented 5 months ago

The acquisition of a native pointer for an EC key, private or public, is being moved to the ECUtil, instead of the implementation classes of said keys. This allows use of interop keys, rather than just keys coming from SunEC.

The methods to get the pointers to the native keys are called during the initialization phases, to discover the possibility of not being able to utilize the native code and revert to the Java implementation early.

The engineUpdate() methods of the RawECDSA subclass are, also, updated to use the java implementation, if one has been initialized.

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

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

KostasTsiounis commented 5 months ago

FYI @keithc-ca

keithc-ca commented 5 months ago

Jenkins test sanity amac jdk11