- Java 11 or later installed and on your path.
- One of the following:
- A Java Keystore (in jks or pfx format) containing either:
- A self-generated and self-signed code signing certificate.
- A code signing certificate, obtained from and signed by a CA, and the certificate chain that goes with it.
- OR a PKCS11 hardware token (e.g., SafeNet eToken, YubiKey) with an EV Code Signing certificate.
- A Java Keystore (in jks or pfx format) containing either:
Keystore Explorer is an easy to use tool for creating and managing keystores and certificates.
Invocation from the command-line:
java -jar module-signer.jar \
--keystore=<path-to-my-keystore>/keystore.jks \
--keystore-pwd=<password> \
--alias=server \
--alias-pwd=<password> \
--chain=<pathToMyp7b>/cert.p7b \
--module-in=<path-to-my-module>/my-unsigned-module.modl \
--module-out=<path-to-my-module>/my-signed-module.modlInvocation from the command-line:
java -jar module-signer.jar \
--pkcs11-cfg=<path-to-config>/safenet.cfg \
--keystore-pwd=<your-token-pin> \
--alias=<certificate-alias> \
--module-in=<path-to-my-module>/my-unsigned-module.modl \
--module-out=<path-to-my-module>/my-signed-module.modlNote: When using PKCS11:
- The
--chainparameter is optional - the certificate chain will be automatically extracted from the token - The
--keystoreparameter is not needed - The
--keystore-pwdshould contain your token PIN (required for most tokens) - The
--alias-pwdis optional and usually not needed for PKCS11 tokens - You must create a PKCS11 configuration file (see example below)
- The signer name displayed in Ignition will be extracted from your certificate's Common Name (CN) field
The path to the keystore containing your code signing certificate. Can be either JKS or PFX format.
The password to access the keystore.
The alias under which your code signing certificate is stored.
The password to access the alias.
The path to the certificate chain (in p7b format). This file will is generally returned along with your signed certificate after submitting a CSR to a CA.
The path to the unsigned module.
The path the signed module will be written to.
The path to the PKCS11 configuration file. Required when using a hardware token.
When using a hardware token (such as SafeNet eToken), you need to create a PKCS11 configuration file. This file tells Java how to communicate with your hardware token.
Windows:
name = SafeNet
library = C:/Windows/System32/eTPKCS11.dll
Linux:
name = SafeNet
library = /usr/lib/libeTPkcs11.so
macOS:
name = SafeNet
library = /Library/Frameworks/eToken.framework/Versions/Current/libeTPkcs11.dylib
The library path depends on your token vendor and operating system:
- SafeNet eToken: Usually
eTPKCS11.dll(Windows) orlibeTPkcs11.so(Linux) - YubiKey: Usually
libykcs11.dll(Windows) orlibykcs11.so(Linux) - Generic PKCS11: Check your token vendor's documentation
To find the library on your system:
- Windows: Search for
*.dllfiles inC:\Windows\System32or your token software installation directory - Linux: Run
find /usr/lib -name "*pkcs11*.so" - macOS: Run
find /Library/Frameworks -name "*pkcs11*"
To list all available aliases on your token, you can use the KeyStore Explorer tool or run a simple Java command. If you're unsure of the alias, the module-signer will display available aliases if it cannot find the one you specified.