Gammadyne Corporation

DIGSIG.EXE

DIGSIG.EXE is a free Windows command line program that can apply a digital signature to an .EXE or .DLL, or verify an existing signature.

Usage

DIGSIG filepath [/folder] [/nologo] [/ns] [/sign cert-filepath password]


Switches:
/folderInstead of processing just a single file, processes all files in a folder.  Press Escape to abort.
/nologoDon't display the program banner.
/nsDon't recursively enter subfolders (only applies to /folder).
/signSign the file with the specified certificate and password.  The certificate must be in either PFX or P12 format.  If you are running Windows 8 or later, it will be signed with both SHA-1 and SHA-256, otherwise SHA-256 only.

Output

When verifying a signature, the %ErrorLevel% environment variable will be set to one of the following:

CodeDescription
-1Invalid parameter.
0The signature is present, and was validated successfully.
1No signature is present.
2Failed to find the signature.
3The signature is present, but the file is not allowed.
4The file is not trusted.
5Admin policy has disabled user trust.
6Failed to link to WinVerifyTrust() in WinTrust.DLL.
7An unknown error occurred.
8The file does not exist.
9The file is locked.
10Unsupported file type.
11A certificate was revoked by the issuer.
12A certificate is expired.
13The signature or certificate is malformed.
14The signature could not be verified.
15A parameter was invalid.

Example #1 - verifying a signature

>digsig c:\work\foo.exe
DigSig 3.0 - Digital Signature Verification Utility - www.Gammadyne.com
Copyright (C) 2010-2019 by Greg Wittmeyer - All Rights Reserved

Code 11: A certificate was revoked by the issuer.


Example #2 - verifying all files in a folder

>digsig /folder c:\work
DigSig 3.0 - Digital Signature Verification Utility - www.Gammadyne.com
Copyright (C) 2010-2019 by Greg Wittmeyer - All Rights Reserved

c:\work\foo.exe : No signature is present.
c:\work\bar.exe : The signature is present, and was validated successfully.
c:\work\baz.exe : The file is not trusted.


Example #3 - signing a file

>digsig "c:\work\foo.exe" /sign "c:\certs\cert.p12" abc123
DigSig 3.0 - Digital Signature Verification Utility - www.Gammadyne.com
Copyright (C) 2010-2019 by Greg Wittmeyer - All Rights Reserved

The file was signed successfully.


Download

Click the button below to download version 3.0 of DIGSIG.EXE, released July 12th, 2019.