![]() |
Thawte Code Signing will nicht
Hallo,
vor 2 Jahren habe ich über Thawte ein Code-Sign-Zertifikat erworben. Irgendwie habe ich damals aus dem Zertifikat eine SPC und PVK Datei erzeugt und damals mit folgendem Script meine EXE'n signiert (BAT Datei):
Delphi-Quellcode:
Das lief super. Jetzt musste das Zertifikat erneut werden. Das ist soweit durch, blöderweise weiß ich nicht mehr, wie ich aus dem Zertifikat die SPC/PVK Dateien erzeuge. Ich habe es mit einigen Beispielen aus dem Internet versucht und auch die Dateien bekommen. Wenn ich jedoch mit obigem Script eine EXE signieren möchte, dann muss ich A) ein Kennwort eingeben (das kenne ich). Aber B), ist die Datei dann auf anderen Rechnern nicht signiert bzw die Signatur ist ungültig, weil angeblich irgendwelche Informationen fehlen. Auf meinem Rechner ist sie signiert, ich denke es liegt daran, dass ich das Ursprungszertifikat installiert habe.
signcode -spc mycert.spc -v mykey.pvk -t "http://timestamp.verisign.com/scripts/timstamp.dll" -p "Microsoft Strong Cryptographic Provider" -a sha1 %1
Egal was ich runterlade (Windows SDK, .NET Framework usw.) ... Es will nicht klappen. Hat jemand eine Idee oder ein gutes How-To? |
AW: Thawte Code Signing will nicht
Du solltest auf das neue signtool aus dem SDK wechseln.
Dort kannst du mit /f auch eine PFX Datei angeben.
Code:
signtool sign /?
Usage: signtool sign [options] <filename(s)> Use the "sign" command to sign files using embedded signatures. Signing protects a file from tampering, and allows users to verify the signer (you) based on a signing certificate. The options below allow you to specify signing parameters and to select the signing certificate you wish to use. Certificate selection options: /a Select the best signing cert automatically. SignTool will find all valid certs that satisfy all specified conditions and select the one that is valid for the longest. If this option is not present, SignTool will expect to find only one valid signing cert. /ac <file> Add an additional certificate, from <file>, to the signature block. /c <name> Specify the Certificate Template Name (Microsoft extension) of the signing cert. /f <file> Specify the signing cert in a file. If this file is a PFX with a password, the password may be supplied with the "/p" option. If the file does not contain private keys, use the "/csp" and "/k" options to specify the CSP and container name of the private key. /i <name> Specify the Issuer of the signing cert, or a substring. /j <dll> Name of the DLL that provides attributes of the signature. /jp <param> Parameter to be passed to the DLL. /n <name> Specify the Subject Name of the signing cert, or a substring. /p <pass.> Specify a password to use when opening the PFX file. /r <name> Specify the Subject Name of a Root cert that the signing cert must chain to. /s <name> Specify the Store to open when searching for the cert. The default is the "MY" Store. /sm Open a Machine store instead of a User store. /sha1 <h> Specify the SHA1 hash of the signing cert. /u <usage> Specify the Enhanced Key Usage that must be present in the cert. The parameter may be specified by OID or by string. The default usage is "Code Signing" (1.3.6.1.5.5.7.3.3). /uw Specify usage of "Windows System Component Verification" (1.3.6.1.4.1.311.10.3.6). Private Key selection options: /csp <name> Specify the CSP containing the Private Key Container. /kc <name> Specify the Key Container Name of the Private Key. /snk <file> Specify the SNK file containing the SN Private Key. /sncsp <name> Specify the CSP containing the SN Private Key Container. /snkc <name> Specify the Key Container Name of the SN Private Key. /snks <1 | 2> Specify the SN Private Key to be used (1 = AT_KEYEXCHANGE, 2 = AT_SIGNATURE, default is AT_SIGNATURE). Signing parameter options: /d <desc.> Provide a description of the signed content. /du <URL> Provide a URL with more information about the signed content. /t <URL> Specify the timestamp server's URL. If this option is not present, the signed file will not be timestamped. A warning is generated if timestamping fails. Other options: /ph Generate page hashes for executable files if supported. /nph Suppress page hashes for executable files if supported. The default is determined by the SIGNTOOL_PAGE_HASHES environment variable and by the wintrust.dll version. /q No output on success and minimal output on failure. As always, SignTool returns 0 on success, 1 on failure, and 2 on warning. /v Print verbose success and status messages. This may also provide slightly more information on error. |
AW: Thawte Code Signing will nicht
Alles ok, habe das SDK runtergeladen und nur "Tools" installiert, da war das neue Signtool drin. Mit folgender Kommandozeile hat es auf den ersten Blick geklappt (für die Nachwelt :)). Teste es jetzt mal auf anderen Rechnern, die noch kein Zertifikat von mir gesehen haben:
signtool sign /f mycert.pfx -t "http://timestamp.verisign.com/scripts/timstamp.dll" %1 Vielen Dank!!! |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:52 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz