Code Monkey home page Code Monkey logo

Comments (4)

ebourg avatar ebourg commented on August 27, 2024

It looks like a compatibility issue between your PKCS11 eToken and the JVM. I can't do much at the jsign level to avoid that unfortunately.

from jsign.

meydominic avatar meydominic commented on August 27, 2024

It looks like that there are problems with macOS JRE.

Tried with 1.8.0_191 x64 Java on Windows 10 and it works without any problems.

Edit:
Will try now with a newer jdk

Edit2:
Same result with latest (11.0.1) jdk on macOS

from jsign.

lichkessel avatar lichkessel commented on August 27, 2024

@meydominic I have the same problem with macOS Mojave and USB EV-certificate. Since Mojave introduced more strict implementation of USB specifications, some of the apps, including jsign, doesn't work properly with USB.
However, if occasionally it works, why don't we automate attempts to run jsign ? :) Here is my code used for signing electron based windows application on macOS workstation (it is sign.js):

function sleep(ms){
  return new Promise(resolve=>{
      setTimeout(resolve,ms)
  })
}
exports.default = async function(configuration) {
  const MAX_ITER = 100;
  let command = `java \
    -jar ./admin/windows_ev_sign/jsign-2.1.jar \
    --keystore ./admin/windows_ev_sign/hardwareToken.cfg \
    --storepass "{PASSWORD_HERE}" \
    --storetype PKCS11 \
    --tsaurl http://timestamp.digicert.com \
    --alias "{CERTIFICATE_ID_HERE}" \
    "${configuration.path}"`;
  for (let i = 0; i < MAX_ITER; ++i) {
    try {
      require("child_process").execSync(command);      
    } catch(e) {
      await sleep(1000);
      continue
    }
    console.log(`signing succeeded: ${configuration.path}`)
    return;
  }
  console.log(`All ${MAX_ITER} iterations failed.`)
  process.exit(1)
};

It is used according to electron-build specs:

"win": {
      "target": [
        "nsis"
      ],
      "sign": "./sign.js"
    },

from jsign.

ebourg avatar ebourg commented on August 27, 2024

I'm closing this issue since it isn't actionable at the Jsign level.

from jsign.

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.