Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add module Support for Java 9+ #85

Open
ErikBergfurInfor opened this issue Jan 7, 2022 · 1 comment
Open

Add module Support for Java 9+ #85

ErikBergfurInfor opened this issue Jan 7, 2022 · 1 comment
Assignees

Comments

@ErikBergfurInfor
Copy link

ErikBergfurInfor commented Jan 7, 2022

I'm working on getting a Java 17 FIPS test environment working with WolfSSL as the JSSE and JCA.
One of the build steps is to get a FIPS JDK compiled with the JSSE and JCA modules.
If I put the JNI and JSSE jars in the /fips and run

jlink --no-header-files --no-man-pages \
    --compress=2 \
    --module-path /fips/ \
    --add-modules ${mods},wolfcrypt.jni,wolfssl.jsse \
    --output /usr/java/fips --ignore-signing-information

I get errors that indicate that the module-info class is missing. I can patch the jar-files with:

jdeps --ignore-missing-deps --generate-module-info patch /fips/wolfcrypt-jni.jar \
  && javac --patch-module wolfcrypt.jni=/fips/wolfcrypt-jni.jar patch/wolfcrypt.jni/module-info.java \
  && jar uf /fips/wolfcrypt-jni.jar -C patch/wolfcrypt.jni module-info.class

But when I do this and retry with the previous command, I get a conflict in the exported packages.

What I think needs to be done is:

  1. In wolfssljni, move the classes in com.wolfssl.wolfcrypt to com.wolfssl.wolfcrypt.jsse or somewhere non-conflicting
  2. Add a module-info.java to each jar, to ease the integration in java 9+
@cconlon cconlon self-assigned this Jan 7, 2022
@cconlon
Copy link
Member

cconlon commented Jan 10, 2022

Hi @ErikBergfurInfor, thanks for the reports. I'll be looking into this and the other issues you recently opened.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants