Ask a Question

Advanced Search

Solution ID : SO20528

Last Modified : 08/13/2019

Extended Validation (EV) Code Signing Certificate Signing Instructions


Sign Microsoft Windows software using an Extended Validation (EV) Code Signing Certificate.



To sign software using an Extended Validation (EV) Code Signing Certificate, you will first need to download and install the following:

  1. Microsoft Windows SDK 7 or
    Microsoft Windows SDK 8.1
  2. SafeNet eToken Drivers

This below examples use several of the arguments that SignTool supports. For a complete list of signing options, please click here for documentation.

  • Sign: Configures the tool to sign the intended file
  • Verify: Verifies the digital signature of files by determining whether the signing certificate was issued by a trusted authority, whether the signing certificate has been revoked, and, optionally, whether the signing certificate is valid for a specific policy.
  • /f: Specifies the signing certificate in a file. Only the Personal Information Exchange (PFX) file format is supported
  • /fd: Specifies the file digest algorithm to use for creating file signatures. The default is SHA1.
  • /n: Specifies the Common Name of a certificate.  Use this option if you have certificates issued to more then one organization in your certificate store.
  • /p: If the file is in PFX format protected by a password, use the /p option to specify the password
  • /pa: Specifies that the Default Authentication Verification Policy is used.
  • /s: Specifies a certificate store (If the certificate is imported into the Personal store, the SPCCertificateStore is MY)
  • /t: Specifies that the digital signature will be timestamped by the Time-Stamp Authority (TSA) indicated by the URL
  • /tr: Specifies the URL of the RFC 3161 time stamp server.  This option cannot be used with the /t option.
  • /v: Specifies the verbose option for successful execution and warning messages.

The timestamping URL is

Signing using command line

  1. Insert the Safenet USB token into the computer .
  2. Go to: Start > Run
  3. Type CMD > click OK
  4. At the command prompt, enter the directory where signtool exists, the default directory is:
    C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin

    NOTE: The directory above may vary.

  5. Run one of the following signing commands below:

    SHA-1 with Timestamp:
    signtool.exe sign /s my /t /v "C:\filename.dll"

    NOTE: If there are multiple certificates installed in your Personal certificate store, use the /sha1 option to specify the hash value of the EV Code Signing Certificate.
    This would be the thumbprint value of your EV Code Signing Certificate. Please ensure to remove all spaces for the thumbprint value.
    For example:
    signtool.exe sign /s my /sha1 sha1_thumbprint_value /t /v "C:\filename.dll"

    SHA-256 with RFC 3161 Timestamp:
    signtool.exe sign /s my /fd sha256 /tr /v "C:\filename.dll"

     NOTE: If there are multiple certificates installed in your Personal certificate store, use the /sha1 option to specify the hash value of the EV Code Signing Certificate.  For example:

    signtool.exe sign /s my /sha1 SHA1_hash_value /fd sha256 /tr /v "C:\filename.dll"

  6. After running one of the above commands, you will be prompted to enter in your Token Password:


    Note: If you want to batch sign your files, you will need to enable single logon for the SafeNet Token.  Please refer to the following solution:  SO20695.  Once you have enabled single logon and have logged into the Token, you will be able to batch sign your files without being prompted for the Token Password every time.
  7. Enter in the Token Password and click OK
  8. You will receive a message that the file has been successfully signed.

Test Your Signature
The Platform SDK SIGNTOOL.EXE utility contains a command to check a digital signature before distributing your file.

  1. Go to: Start > Run
  2. Type CMD > click OK
  3. At the command prompt, enter the directory where signtool exists
  4. Run the following:
    signtool.exe verify /pa /v "C:\filename.dll"


For additional information, refer to the following documents from the Microsoft knowledge base: