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!

qustodio
Posts: 1
Joined: Thu Oct 22, 2015 1:11 pm

Dual Sign (SHA1/SHA2)

Hi to everyone,

I'm trying to build a product and MSI file that they are digitally signed with SHA1/SHA2 for platforms from Windows XP up to Windows 10. My product has some Exe, Dll and drivers files that I have to sign with SHA1 and SHA2 certificates (dual sign) to ensure that they will run fine into all targeted OS.

AFAIK, I cannot dual-sign a MSI file, so following the recommendation found here (http://social.technet.microsoft.com/wik ... .aspx#H1_A) I can sign a MSI file with a SHA2 code signing certificate while maintaining a SHA1 file hash to ensure that the MSI file will be digitally certified for all platforms.

My question is, there are some way to dual-sign (SHA1 and SHA2) files included into MSI using Advanced Installer?

Now, I'm using Advanced Installer 9.9 (that only supports SHA1) but installing the latest trial version I can see that it supports SHA1 or SHA2 sign digest but I don't know how to get the dual-sign works.
As an alternative I can remove the sign process included in Advanced Installer and sign all my files with an external script before launching the MSI build.

Kind regards and thanks in advance.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Dual Sign (SHA1/SHA2)

Hello and welcome to our forums,

Unfortunately, we don't have the option to dual sign the installation files, nor the built setup package. However, as a workaround you can enable our option to sign the installation files using "Signtool.exe" tool. Just go to "File menu -> Options -> External Tools" and check the "Use an external tool" option.

When this option is used, at build time Advanced Installer simply calls the specified "Signtool.exe" with a specific command line to sign, in turn, all files configured to be signed.

Now, if you want to use a dual sign command line for SignTool, then you can create your own small application wrapper over the Windows SignTool and add it in our "External Tools" configuration dialog. All would you have to do within your application code will be to parse the received parameters list, extract the filenames and further call Windows SignTool with the desired command line.

You can proceed like this:

1. create your own small application (also named "Signtool.exe" and which should have a 10.0.1 or greater file version) which when called parse the received parameters, extract the filenames and further call the Windows SignTool.exe with the desired command line to dual sign the files

2. open Advanced Installer, go to "File menu -> Options -> External Tools" and set your custom "Signtool.exe" in the "SignTool.exe" field

3. rebuild your project

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ghauer
Posts: 3
Joined: Tue Jan 12, 2016 5:31 pm

Re: Dual Sign (SHA1/SHA2)

I followed the advice an created my own signtool.exe to dual-sign all the setup files

only the .msi and .mst files can't be double signed, so i followed the suggestion from Microsoft to sign the .msi with the sha-256 file and the timestamp server for sha-1

my problem is now, that i receive an error message when executing the setup:
Unmatching digital signature between EXE bootstraper and MSI database

is there an option to overcome this problem?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Dual Sign (SHA1/SHA2)

Hi and welcome to our forums,

Starting with version 12.7 of Advanced Installer, scheduled for release in the following weeks, Advanced Installer will have support for dual signing.
This means you no longer need to build your wrapper, Advanced Installer will handle everything for you, including solving the problem you encountered.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ghauer
Posts: 3
Joined: Tue Jan 12, 2016 5:31 pm

Re: Dual Sign (SHA1/SHA2)

hi Bogdan,

too bad, for the moment i am stuck with version 9.8

is there a solution for this version too?
(like just replacing the setup.exe program?)

during testing, there did arise a second problem:
our dual-signed setup package did create a smartscreen error message on windows 8 before the setup even launched
when i signed the same setup with only the SHA-256 certificate, there was no smartscreen warning

so if i upgrade to 12.7 installer, will i still have the smartscreen problem on windows 8 or does your new signing process also solve this issue?

regards
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Dual Sign (SHA1/SHA2)

Hello,
too bad, for the moment i am stuck with version 9.8

is there a solution for this version too?
(like just replacing the setup.exe program?)
No, I'm afraid the dual signing support will be available to be used only for AI 12.7 and higher versions.
during testing, there did arise a second problem:
our dual-signed setup package did create a smartscreen error message on windows 8 before the setup even launched
when i signed the same setup with only the SHA-256 certificate, there was no smartscreen warning

so if i upgrade to 12.7 installer, will i still have the smartscreen problem on windows 8 or does your new signing process also solve this issue?
I'm not quite sure, but most probably yes. There is the Windows system which handle the smart screen Windows feature. All Advanced Installer will do will be to call the "SignTool.exe" windows tool with a dual signing command line.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Dual Sign (SHA1/SHA2)

Hello,
so if i upgrade to 12.7 installer, will i still have the smartscreen problem on windows 8 or does your new signing process also solve this issue?
I've talked with our development team about this issue and they confirmed me that if you will use the dual-signing process (which will be available in our next AI 12.7) the smart screen issue will disappear. Please note that the dual-signing operation implies you to use a SHA-256 certificate.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ghauer
Posts: 3
Joined: Tue Jan 12, 2016 5:31 pm

Re: Dual Sign (SHA1/SHA2)

thank you Daniel for this info

just to verify that last few words:
is the SHA-256 used twice for the dual-signing process, or do i have to have 2 certificates, the SHA-1 and the SHA-256 one?

tnx for your efforts
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Dual Sign (SHA1/SHA2)

You're welcome.

No, you don't have to use two certificates. You will need only one SHA-256 certificate type. This certificate will be used to add two digital signatures to your installation files:
1. one generated using a SHA-1 digest algorithm
2. and the second using a SHA-256 digest algorithm

If there is anything we can assist you with just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Dual Sign (SHA1/SHA2)

Hello,

Advanced Installer 12.7 version including the dual signing support was released on February 4th, 2016.

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

Return to “Building Installers”