Build the docker from the osslsigncode directory.
docker build --rm -t osslsigncode .
Figure out the key by running the command below and enter the password (PIN). The command depends on
which version of the token library you are using (9, 10 or maybe newer). Change the entrypoint.sh
accordingly.
pkcs11-tool --module /lib/libeToken.so.9 -l -O
pkcs11-tool --module /lib/libeToken.so.10 -l -O
Export the pem from the USB. Sign the code. Pass the key ID and the password to the docker run.
docker run --privileged --rm --disable-content-trust \
-v /dev/bus/usb:/dev/bus/usb \
-v /link-to-your.pem:/etc/certs/ev.pem \
-v /link-to-your-electron-files:/electron \
-ti osslsigncode \
-key 'key' \
-pass pass \
-in /electron/app-2.1.0-setup.exe \
-out /electron/app-2.1.0-setup-signed.exe