Upgrade code signing to SHA-256
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
e54e827a07
commit
e173ed8aa2
@ -1 +1 @@
|
||||
Subproject commit ef5e73f72f57a0cc7e1e943918b1203c18839f98
|
||||
Subproject commit f943510140b067645a42864a99a5e196f64cccc6
|
@ -40,8 +40,8 @@ In order to have the build process digitally sign output files, one should provi
|
||||
|
||||
1. A signing certificate installed in the current user's certificate store.
|
||||
2. The following variables in the environment:
|
||||
- `ManifestCertificateThumbprint` - set the value to certificate's SHA1 thumbprint (hexadecimal, without spaces, i.e. `bc0d8da45f9eeefcbe4e334e1fc262804df88d7e`).
|
||||
- `ManifestTimestampUrl` - set the value to URL used to perform timestamp signature (i.e. `http://timestamp.verisign.com/scripts/timstamp.dll`). In order to perform timestamp signing successfully, the computer running the build should be online and able to access this URL.
|
||||
- `ManifestCertificateThumbprint` - set the value to certificate's SHA1 thumbprint (hexadecimal, without spaces, i.e. `f61b973226c502a732d24f41aa85e192b009e7c0`).
|
||||
- `ManifestTimestampRFC3161Url` - set the value to URL used to perform RFC3161 timestamp signature (i.e. `http://time.certum.pl`). In order to perform timestamp signing successfully, the computer running the build should be online and able to access this URL.
|
||||
|
||||
Please note that only Release builds are configured for timestamp signing. Debug configurations do not attempt to timestamp sign the resulting DLL and EXE files in order to speed up the building process and enable offline building.
|
||||
|
||||
|
@ -40,13 +40,7 @@
|
||||
<ItemGroup />
|
||||
<Target Name="Sign" Condition="'$(ManifestCertificateThumbprint)' != '' and ('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary')" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
|
||||
<Message Text="Signing output file..." />
|
||||
<!--
|
||||
To make Windows XP and Vista compliant signatures, the binaries have to be signed using SHA1.
|
||||
<SignFile> switches to SHA256 if the signing certificate is SHA256.
|
||||
Reverted to signtool.exe until we can drop Windows XP and Vista support.
|
||||
-->
|
||||
<!--<SignFile CertificateThumbprint="$(ManifestCertificateThumbprint)" SigningTarget="$(OutDir)$(TargetName)$(TargetExt)" />-->
|
||||
<Exec Command="signtool.exe sign /du "https://www.amebis.si" /sha1 "%ManifestCertificateThumbprint%" /fd sha1 /q "$(TargetPath)"" />
|
||||
<Exec Command="signtool.exe sign /du "https://www.amebis.si" /sha1 "%ManifestCertificateThumbprint%" /fd sha256 /q "$(TargetPath)"" />
|
||||
<Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
|
||||
</Target>
|
||||
</Project>
|
@ -42,13 +42,7 @@
|
||||
<ItemGroup />
|
||||
<Target Name="Sign" Condition="'$(ManifestCertificateThumbprint)' != '' and ('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary')" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
|
||||
<Message Text="Signing output file..." />
|
||||
<!--
|
||||
To make Windows XP and Vista compliant signatures, the binaries have to be signed using SHA1.
|
||||
<SignFile> switches to SHA256 if the signing certificate is SHA256.
|
||||
Reverted to signtool.exe until we can drop Windows XP and Vista support.
|
||||
-->
|
||||
<!--<SignFile CertificateThumbprint="$(ManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(OutDir)$(TargetName)$(TargetExt)" />-->
|
||||
<Exec Command="signtool.exe sign /du "https://www.amebis.si" /sha1 "%ManifestCertificateThumbprint%" /fd sha1 /t "%ManifestTimestampUrl%" /q "$(TargetPath)"" />
|
||||
<Exec Command="signtool.exe sign /sha1 "%ManifestCertificateThumbprint%" /fd sha256 /tr "%ManifestTimestampRFC3161Url%" /td sha256 /q "$(TargetPath)"" />
|
||||
<Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
|
||||
</Target>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user