You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sign Tool is a command-line tool that digitally signs files, verifies signatures in files, and time-stamps files.
12
12
13
-
This tool is automatically installed with Visual Studio. To run the tool, use the Developer Command Prompt for Visual Studio (or the Visual Studio Command Prompt in Windows 7). For more information, see [Command Prompts](developer-command-prompt-for-vs.md).
13
+
This tool is automatically installed with Visual Studio. To run the tool, use the Developer Command Prompt for Visual Studio (or the Visual Studio Command Prompt in Windows 7). For more information, see [Command Prompts](developer-command-prompt-for-vs.md).
14
+
15
+
> [!Note]
16
+
> The Windows 10 SDK, Windows 10 HLK, Windows 10 WDK and Windows 10 ADK **builds 20236 and later** require specifying the digest algorithm. The SignTool `sign` command requires the `/fd`**file digest algorithm** and the `/td`**timestamp digest algorithm** option to be specified during signing and timestamping, respectively. A warning (error code 0, initially) will be thrown if `/fd` is not specified during signing and if `/td` is not specified during timestamping. In later versions of SignTool, the warning will become an error. SHA256 is recommended and considered to be more secure than SHA1 by the industry.
|`/d`*Desc*|Specifies a description of the signed content.|
71
74
|`/du`*URL*|Specifies a Uniform Resource Locator (URL) for the expanded description of the signed content.|
72
75
|`/f`*SignCertFile*|Specifies the signing certificate in a file. If the file is in Personal Information Exchange (PFX) format and protected by a password, use the `/p` option to specify the password. If the file does not contain private keys, use the `/csp` and `/kc` options to specify the CSP and private key container name.|
73
-
|`/fd`|Specifies the file digest algorithm to use for creating file signatures. The default is SHA1.|
76
+
|`/fd`|Specifies the file digest algorithm to use for creating file signatures. </br> **Note:** A warning is generated if the`/fd` switch is not provided while signing. The default algorithm is SHA1 but SHA256 is recommended.|
77
+
|`/fd`*certHash*|Specifying the string *certHash* will default to the algorithm used on the signing certificate. </br> **Note:** Only available in Windows 10 kit builds 20236 and later.|
74
78
|`/i`*IssuerName*|Specifies the name of the issuer of the signing certificate. This value can be a substring of the entire issuer name.|
75
79
|`/kc`*PrivKeyContainerName*|Specifies the private key container name.|
76
80
|`/n`*SubjectName*|Specifies the name of the subject of the signing certificate. This value can be a substring of the entire subject name.|
|`/sha1`*Hash*|Specifies the SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches.|
86
90
|`/sm`|Specifies that a machine store, instead of a user store, is used.|
87
91
|`/t`*URL*|Specifies the URL of the time stamp server. If this option (or `/tr`) is not present, the signed file will not be time stamped. A warning is generated if time stamping fails. This option cannot be used with the `/tr` option.|
88
-
|`/td`*alg*|Used with the `/tr` option to request a digest algorithm used by the RFC 3161 time stamp server.|
89
-
|`/tr`*URL*|Specifies the URL of the RFC 3161 time stamp server. If this option (or `/t`) is not present, the signed file will not be time stamped. A warning is generated if time stamping fails. This option cannot be used with the `/t` option.|
92
+
|`/td`*alg*|Used with the `/tr` option to request a digest algorithm used by the RFC 3161 time stamp server. </br> **Note:** A warning is generated if the `/td` switch is not provided while timestamping. The default algorithm is SHA1, but SHA256 is recommended. <br/> The `/td` switch must be declared after the `/tr` switch, not before. If the `/td` switch is declared before the `/tr` switch, the timestamp that is returned is from the SHA1 algorithm instead of the intended SHA256 algorithm. |
93
+
|`/tr`*URL*|Specifies the URL of the RFC 3161 time stamp server. If this option (or `/t`) is not present, the signed file will not be time stamped. A warning is generated if time stamping fails. This option cannot be used with the `/t` option.|
90
94
|`/u`*Usage*|Specifies the enhanced key usage (EKU) that must be present in the signing certificate. The usage value can be specified by OID or string. The default usage is "Code Signing" (1.3.6.1.5.5.7.3.3).|
91
95
|`/uw`|Specifies usage of "Windows System Component Verification" (1.3.6.1.4.1.311.10.3.6).|
|`/t`*URL*|Specifies the URL of the time stamp server. The file being time stamped must have previously been signed. Either the `/t` or the `/tr` option is required.|
103
-
|`/td`*alg*|Requests a digest algorithm used by the RFC 3161 time stamp server. `/td` is used with the `/tr`option.|
107
+
|`/td`*alg*|Used with the `/tr` option to request a digest algorithm used by the RFC 3161 time stamp server. </br> **Note:** A warning is generated if the `/td`switch is not provided while timestamping. The default algorithm is SHA1, but SHA256 is recommended. <br/> The `/td` switch must be declared after the `/tr`switch, not before. If the `/td` switch is declared before the `/tr` switch, the timestamp that is returned is from the SHA1 algorithm instead of the intended SHA256 algorithm. |
104
108
|`/tp`*index*|Time stamps the signature at *index*.|
105
109
|`/tr`*URL*|Specifies the URL of the RFC 3161 time stamp server. The file being time stamped must have previously been signed. Either the `/tr` or the `/t` option is required.|
The following command adds the catalog file MyCatalogFileName.cat to the system component and driver database. The `/u` option generates a unique name if necessary to prevent replacing an existing catalog file named `MyCatalogFileName.cat`.
The following command signs a file by using a certificate located in the `My` store that has a subject name of `My Company Certificate`.
170
174
171
175
```console
172
-
signtool sign /n "My Company Certificate" MyFile.exe
176
+
signtool sign /n "My Company Certificate" /fd SHA256 MyFile.exe
173
177
```
174
178
175
179
The following command signs an ActiveX control and provides information that is displayed by Internet Explorer when the user is prompted to install the control.
0 commit comments