ECDSA Algorithms not available with jlink

Michele Adduci michele.adduci at openlimit.com
Mon May 11 08:50:06 UTC 2020


Hello,

my name is Michele Adduci and I've freshly subscribed to this mailing
list because I'm seeking for advice/help on an issue that arose during
the creation of a new application and I couldn't find my answers by
searching online.

I'm using JDK 14.0.1 GA and trying to create a small redistributable
version of my application using the combo jlink + jpackage.

In my application, I'm trying to validate some signatures with algorithm
such a||||||s SHA256withECDSA, SHA384withECDSA and SHA512withECDSA. If I
run my application with the standard JDK distribution, the application
is working correctly, but if I run it with the result of jlink+jpackage,
I get errors like

"SHA256withECSA Signature not available"

I've double-checked that libsunec.so is in place under the 'runtime/lib'
folder, but I've seen that the SunEC provider isn't loaded at all during
the start (just SUN and SunRSA are being loaded).

The jlink modules I'm using are:

java.desktop,java.smartcardio,java.management,java.sql,java.logging,java.net.http,java.xml.crypto,jdk.crypto.ec

and my jlink command is the following one:


jlink --strip-debug \
      --strip-native-commands \
      --bind-services \
      --no-header-files \
      --no-man-pages \
      --compress=2 \
      --module-path ${JAVA_HOME}/jmods \
      --add-modules
java.desktop,java.smartcardio,java.management,java.sql,java.logging,java.net.http,java.xml.crypto,jdk.crypto.ec
\
      --output jlink-runtime


What am I doing wrong? The issue is present in both Windows and Linux -
I cannot test on Mac.

Kind regards and thanks in advance for your help

Michele Adduci

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20200511/8bd1030c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2242 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20200511/8bd1030c/smime.p7s>


More information about the security-dev mailing list