Last active
January 13, 2023 23:42
-
-
Save Littlebigdondon/08bab1f3936d185cdd068608689cc444 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = HardwareToken | |
library = /Library/Frameworks/eToken.framework/Versions/A/libeToken.dylib | |
slotListIndex = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
} | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Export for .pem is normal CodeSign Cert, not EV Cert.