Skip to content

Instantly share code, notes, and snippets.

@Littlebigdondon
Last active January 13, 2023 23:42
Show Gist options
  • Save Littlebigdondon/08bab1f3936d185cdd068608689cc444 to your computer and use it in GitHub Desktop.
Save Littlebigdondon/08bab1f3936d185cdd068608689cc444 to your computer and use it in GitHub Desktop.
name = HardwareToken
library = /Library/Frameworks/eToken.framework/Versions/A/libeToken.dylib
slotListIndex = 0
const CERTIFICATE_NAME = "YOUR_CERT_NAME_HERE";
exports.default = async function(configuration) {
const tokenPassword = () => {
if (!process.env.TOKEN_KEY) {
process.env.TOKEN_KEY = require("readline-sync").question(
"\n\n\tPlease enter the password for the hardware token: ",
{
hideEchoBack: true
}
);
}
return process.env.TOKEN_KEY;
};
require("child_process").execSync(
`java \
-jar jsign-2.1.jar \
--keystore hardwareToken.cfg \
--storepass "${tokenPassword()}" \
--storetype PKCS11 \
--tsaurl http://timestamp.digicert.com \
--alias "${CERTIFICATE_NAME}" \
"${configuration.path}"
`,
{
stdio: "inherit"
}
);
};
@biaomingzhong
Copy link

Hi, I am using this script. My Ev code signing token device is also 5110. I downloaded v10.2 driver from This link . But I couldn't export the certificate to *.pem file like the doc said. SafeNet was just not responding when I clicked the export button. What version is your mac os? I am using Big Sur. What should I do next?

@ShinHyunJong
Copy link

@biaomingzhong Hi, I also have same issue! Do you have any updates?

@biaomingzhong
Copy link

I could not make it work. Eventually, I use a windows machine.

@ShinHyunJong
Copy link

@biaomingzhong Thanks for response

@Amethystafyy282
Copy link

Amethystafyy282 commented Aug 18, 2022

Hi, I am using this script. My Ev code signing token device is also 5110. I downloaded v10.2 driver from This link . But I couldn't export the certificate to *.pem file like the doc said. SafeNet was just not responding when I clicked the export button. What version is your mac os? I am using Big Sur. What should I do next?

Export for .pem is normal CodeSign Cert, not EV Cert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment