Search code examples
code-signingcode-signing-certificatesafenet

Avoiding repeated password prompt when signing with EV code signing certificate on a SafeNet Thales token


I have a Thales SafeNet token with an EV code signing certificate.

To sign an executable I use signtool in a command line:

signtool sign /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /as /n "CERTIFICATE NAME ON TOKEN" /v "D:\path\to\file.exe"

The process works. When a file is signed the SafeNet Authentication Client password prompt popping up and the file is successfully signed.

However the password popup appears every single time when every single file is signed using the above command line in a batch loop.

Is there a way to ask only once in a session (or put it in the batch file as a command line parameter for signtool - I can prompt the password in the batch file itself using a SET variable)?

the /p (password) parameter only works when signing from a .PFX file (/f parameter) so this doesn't work with a token.


Solution

  • I found detailed answer in this post:

    Automate Extended Validation (EV) code signing with SafeNet eToken

    I used the option "Enable single logon" as shown there and it works fine for me, only one password popup in the SafeNet Authentication Client shows up. More answers are available in the post above.

    enter image description here