Git Product home page Git Product logo

Comments (13)

commi avatar commi commented on July 30, 2024 1

Branch issue-413 seems to work. I pass storetype 'ETOKEN' to JavaPackager (keystore and password blank) and Jsing uses it. It needs some DLL still, and aborts, but it identified it correctly. I will report as soon as I find the driver DLL for my eToken:)

from javapackager.

commi avatar commi commented on July 30, 2024 1

Singing works!

from javapackager.

fvarrui avatar fvarrui commented on July 30, 2024

Hi @commi!
I'm not really sure if it's feature or a bug πŸ˜„ as far as I remember, I had to patch SignerHelper class in order to fix some bug with JP. But you are right, maybe it would be a good idea to upgrade jsign-core library and try with its own SignerHelper.

from javapackager.

fvarrui avatar fvarrui commented on July 30, 2024

Hi @commi!
I've just fixed this "bug" and released a new snapshot version: 1.7.6-20240602.222910-9. Now JP directly uses net.jsing.SignerHelper class from the jsing-core library.
Please, try it and give me some feedback.
Thanks!!

from javapackager.

fvarrui avatar fvarrui commented on July 30, 2024

Oh! I almost forgot ... now, if the problem persists, we should ask the jsign developer

from javapackager.

commi avatar commi commented on July 30, 2024

Update: Signing worked with branch issue-413!

<signing>
    <storetype>ETOKEN</storetype>
    <keystore></keystore>
    <storepass>${windows.codesign.password}</storepass>
</signing>

I had to supply the following JVM options to maven so jsign-core could use Java APIs:

--add-exports jdk.crypto.cryptoki/sun.security.pkcs11=ALL-UNNAMED
--add-exports jdk.crypto.cryptoki/sun.security.pkcs11.wrapper=ALL-UNNAMED
--add-exports java.base/sun.security.action=ALL-UNNAMED
--add-exports java.base/sun.security.rsa=ALL-UNNAMED
--add-opens java.base/java.security=ALL-UNNAMED
--add-opens java.base/sun.security.util=ALL-UNNAMED
-Djava.security.debug=sunpkcs11

The java.security.debug option is also crucial because it triggers the driver to scan all 'ports' for a token. Otherwise, the correct port has to be supplied by a config file. That would be doable (supply a .cfg file instead of ETOKEN), but I don't like to hardcode stuff in the config file if not needed.

from javapackager.

commi avatar commi commented on July 30, 2024

Related: i found that jsign needs commons-io:2.16 when signing MSI files. with 2.11 i get a NoSuchMethod error. So this dependency has to be updated too in this branch.

from javapackager.

commi avatar commi commented on July 30, 2024

with implementation 'commons-io:commons-io:2.16.1' MSI gets also signed correctly with jsign 6.0 and ETOKEN. i updated my fork.

from javapackager.

fvarrui avatar fvarrui commented on July 30, 2024

Hi @commi!
Just upgraded commons-io to 2.16.1 and released 1.7.6-20240623.184401-10.
Please, test it and give me some feedback!
Thanks

from javapackager.

commi avatar commi commented on July 30, 2024

Yes, this fixes it! To build the MSI correctly i also needed f9276f9 for issue #370

from javapackager.

fvarrui avatar fvarrui commented on July 30, 2024

Yes, this fixes it! To build the MSI correctly i also needed f9276f9 for issue #370

Ok, I've just added your patch to issue-413 branch and released a new snapshot version: 1.7.6-20240625.080404-12.
Please, try it again and give me feedback. If all works fine, I'll release 1.7.6 to Maven Central with all pending patches.
Thanks!

from javapackager.

fvarrui avatar fvarrui commented on July 30, 2024

Branch issue-413 merged into devel, ready to be released in 1.7.6

from javapackager.

fvarrui avatar fvarrui commented on July 30, 2024

v1.7.6 released to Maven Central

from javapackager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.