How is the "most suitable" certificate chosen? Wrong certificate on build server - Advanced Installer Community
AlexV
Posts: 2
Joined: Thu Apr 02, 2020 10:43 am

How is the "most suitable" certificate chosen? Wrong certificate on build server

Hi, can anyone give any specifics on what makes a certificate the "most suitable"? Recently the installer is being signed with a "Windows Azure Tools" certificate instead of our own code signing certificate, and I need to know how to make sure it uses the correct certificate.

Manually choosing the certificate is not an option, because the installer is edited on a dev machine (which does not have the code signing certificate) and built on the build server (which does have the certificate, but is not used for editing the installer).
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: How is the "most suitable" certificate chosen? Wrong certificate on build server

Hello Alex and welcome to Advanced installer forums,

First of all, please note that Advanced Installer uses the SignTool.exe tool in order to sign your files.

When the "most suited certificate" option is used, a command line similar to the following is used:

Code: Select all

signtool.exe /sign /a
Based on the "sign Command Options" article:
/a Automatically selects the best signing certificate. Sign Tool will find all valid certificates that satisfy all specified conditions and select the one that is valid for the longest time. If this option is not present, Sign Tool expects to find only one valid signing certificate.
Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AlexV
Posts: 2
Joined: Thu Apr 02, 2020 10:43 am

Re: How is the "most suitable" certificate chosen? Wrong certificate on build server

Hi, thanks for the information. It doesn't look like that's something I will be able to use, I can't ensure that the correct certificate has a longer validity than the wrong ones. It seems there's no in-between setting of being able to specify criteria for a certificate without specifying the exact certificate matched by thumbprint, or just taking any certificate at all with the longest validity.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: How is the "most suitable" certificate chosen? Wrong certificate on build server

You are always welcome, Alex!
It seems there's no in-between setting of being able to specify criteria for a certificate without specifying the exact certificate matched by thumbprint
You are right, indeed. This is how the SignTool.exe tool is working - you either specify the certificate or the one with the highest availability will be choosen.

Please let me know if there is anything else I could help you with and I will gladly assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”