We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Sign failing

I have an install package where all it does is sign an executable and package it up.

When AdvancedInstaller runs inside of team city I get this:


The digital signing of the APPDIR\CertTester.exe file failed. Error message: 'digisign.exe error. The certificate is missing or it cannot be used for signing.'
[13:24:07][Step 1/1]
Last edited by MLiss@Cetrus.com on Tue Apr 18, 2017 7:44 pm, edited 2 times in total.
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Sign failing

When I run AdvancedInstaller OUTSIDE of TeamCity:

Checking builds status
Build required.

[ DefaultBuild ]
Building package (en): C:\Source\Trunk\4.0\CertTester\Cert Tester-SetupFiles\Cert Tester.msi
Preparing files
Creating CAB file(s)
Creating MSI database
Inserting CAB file(s) into MSI
Writing Summary Information
Signing MSI
Done Adding Additional Store
Successfully signed: C:\Source\Trunk\4.0\CertTester\Cert Tester-SetupFiles\Cert Tester.msi
Build time: 7 sec.

Total build time: 7 sec.

Build finished successfully.
Last edited by MLiss@Cetrus.com on Tue Apr 18, 2017 7:44 pm, edited 1 time in total.
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Sign failing

When I use sign tool on the command line on the same machine, I get this:

Signtool success
C:\Source\Trunk\4.0\CertTester>signtool sign /v /ac CetrusPublic.cer /f CetrusPrivate.pfx /p <password> /tr http://timestamp.comodoca.com/rfc3161 binaries\C
ertTester.exe
The following certificate was selected:
Issued to: CETRUS LLC
Issued by: COMODO RSA Code Signing CA
Expires: Sat May 27 18:59:59 2017
SHA1 hash: 6C3AD72C794D4427493699E8F33FF6B97143E16F

Cross certificate chain (using machine store):
Issued to: COMODO RSA Certification Authority
Issued by: COMODO RSA Certification Authority
Expires: Mon Jan 18 18:59:59 2038
SHA1 hash: AFE5D244A8D1194230FF479FE2F897BBCD7A8CB4

Issued to: COMODO RSA Code Signing CA
Issued by: COMODO RSA Certification Authority
Expires: Mon May 08 18:59:59 2028
SHA1 hash: B69E752BBE88B4458200A7C0F4F5B3CCE6F35B47

Issued to: CETRUS LLC
Issued by: COMODO RSA Code Signing CA
Expires: Sat May 27 18:59:59 2017
SHA1 hash: 6C3AD72C794D4427493699E8F33FF6B97143E16F

Done Adding Additional Store
Successfully signed: binaries\CertTester.exe

Number of files successfully Signed: 1
Number of warnings: 0
Number of errors: 0


And when I verify:
C:\Source\Trunk\4.0\CertTester>signtool verify /pa /v /debug Binaries\CertTester.exe

Verifying: Binaries\CertTester.exe
Signature Index: 0 (Primary Signature)
Hash of file (sha1): 0B1DB639CD30C51D7BCFC2ABCB7A62FC4DCB98F3

Signing Certificate Chain:
Issued to: COMODO RSA Certification Authority
Issued by: COMODO RSA Certification Authority
Expires: Mon Jan 18 18:59:59 2038
SHA1 hash: AFE5D244A8D1194230FF479FE2F897BBCD7A8CB4

Issued to: COMODO RSA Code Signing CA
Issued by: COMODO RSA Certification Authority
Expires: Mon May 08 18:59:59 2028
SHA1 hash: B69E752BBE88B4458200A7C0F4F5B3CCE6F35B47

Issued to: CETRUS LLC
Issued by: COMODO RSA Code Signing CA
Expires: Sat May 27 18:59:59 2017
SHA1 hash: 6C3AD72C794D4427493699E8F33FF6B97143E16F

The signature is timestamped: Tue Apr 18 13:17:59 2017
Timestamp Verified by:
Issued to: UTN-USERFirst-Object
Issued by: UTN-USERFirst-Object
Expires: Tue Jul 09 13:40:36 2019
SHA1 hash: E12DFB4B41D7D9C32B30514BAC1D81D8385E2D46

Issued to: COMODO SHA-1 Time Stamping Signer
Issued by: UTN-USERFirst-Object
Expires: Tue Jul 09 13:40:36 2019
SHA1 hash: 03A5B14663EB12023091B84A6D6A68BC871DE66B


Successfully verified: Binaries\CertTester.exe

Number of files successfully Verified: 1
Number of warnings: 0
Number of errors: 0
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Sign failing

When I run Digisign from the command line:

C:\Program Files (x86)\Caphyon\Advanced Installer\bin\x86>digisign sign /f c:\Source\trunk\4.0\Cert\Cert\CetrusPublic.cer /pvk c:\Source\trunk\4.0\cert\cer
t\CetrusPrivate.pfx /p <password> c:\Source\Trunk\4.0\CertTester\Binaries\CertTester.exe

it succeeds:
Certificate: Subject[CETRUS LLC] Issuer[COMODO RSA Code Signing CA]
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Sign failing

I have a ticket with TeamCity as well:

https://teamcity-support.jetbrains.com/ ... 995?page=1
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Sign failing

I event went so far as to put my certificate under source control in the project directory where it is used, so TeamCity would download the correct certificates... still no luck
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Sign failing

Here is the entire project:
Attachments
CertTester.zip
(13.91 KiB) Downloaded 541 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Sign failing

Hello Mike,

Most likely this happens because the "Digital Signature" page is not configured properly. You should pickup your .pfx file in the "Certificate" field and then for password select the "automatically(store encrypted password in project file)" option.
Print5.png
Print5.png (11.44 KiB) Viewed 9160 times
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Sign failing

Daniel,

Thanks... it turned out our certificate was missing some chaining information.

As soon as we rebuilt the certificate... everything worked again.

(this was on a new machine)
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Sign failing

You're always welcome.

I'm glad you sorted things out.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”