AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Thawte Code Signing will nicht

Ein Thema von greenmile · begonnen am 24. Jun 2011 · letzter Beitrag vom 24. Jun 2011
Antwort Antwort
greenmile

Registriert seit: 17. Apr 2003
1.107 Beiträge
 
Delphi 10.3 Rio
 
#1

Thawte Code Signing will nicht

  Alt 24. Jun 2011, 10:07
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):

signcode -spc mycert.spc -v mykey.pvk -t "http://timestamp.verisign.com/scripts/timstamp.dll" -p "Microsoft Strong Cryptographic Provider" -a sha1 %1 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.

Egal was ich runterlade (Windows SDK, .NET Framework usw.) ... Es will nicht klappen. Hat jemand eine Idee oder ein gutes How-To?
  Mit Zitat antworten Zitat
generic

Registriert seit: 24. Mär 2004
Ort: bei Hannover
2.415 Beiträge
 
Delphi XE5 Professional
 
#2

AW: Thawte Code Signing will nicht

  Alt 24. Jun 2011, 10:14
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.
Coding BOTT - Video Tutorials rund um das Programmieren - https://www.youtube.com/@codingbott
  Mit Zitat antworten Zitat
greenmile

Registriert seit: 17. Apr 2003
1.107 Beiträge
 
Delphi 10.3 Rio
 
#3

AW: Thawte Code Signing will nicht

  Alt 24. Jun 2011, 10:32
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!!!

Geändert von greenmile (24. Jun 2011 um 11:01 Uhr)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:10 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz