How to sign EXE using signtool with Verisign SPC and PVK on the command line?
run “signtool signwizard” to start the signing wizard.
- File Selection: Choose the EXE you wish to sign (ie, yaosansi.com.exe)
- Signing Options: Choose “Custom”
- Signature Certificate: Click “Select from File” and choose “mycredentials.spc”
- Private Key: Select “Private key file on disk” and choose “myprivatekey.pvk”
- Leave CSP at “Microsoft Strong Cryptographic Provider”
- Leave Provider Type at “RSA FULL”
- Private Key Password: Enter “xxxxxxxxxx”
- Hash Algorithm: Leave it at ‘sha1’
- Additional Certificates:
- Leave it at “All certificates in the certification path, including the root”
- Leave it at “No additional certificates”
- Data Description: Enter the following:
- Description:yaosansi.com
- Web Location: http://www.yaosansi.com
Digital Signature Wizard:
- Enable “Add a timestamp to the data”
Timestamp service URL: http://timestamp.verisign.com/scripts/timstamp.dll
这里还有两个免费的时间戳服务器a.http://timestamp.wosign.com/timestamp
b.http://timestamp.comodoca.com/authenticodeNote: This enables the signature to work forever; not sure what this means but the Verisign guy was pretty excited about it
- Review and click OK
- Enter private key password: Enter “xxxxxxxxxxx”
- Done!