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!

ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Software signing - Could not extract digital certificate from

Recently updated our software signing certificate and tested it.
To test it i exported the public and private certificate into a pfx file.
Then i used signtool from the command line to sign a dll file with the pfx password, timestamp and sha256 swtiches on.
This worked fine and the file was signed ok.

Next step was to then do the same with Advanced Explorer - we've been doing this with Advanced INstaller 12.7.2 for many years.
So updated the test model project with the new Digital signature path, password and ensured the timestamp was correct.

During the build process i am getting 'Could not extract digital certificate from' error message and the build process stops.

Any help would be greately appreciated.
Thanks.
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Software signing - Could not extract digital certificate from

Hello,

Can you please make sure that your exported certificate has the private key included? Please have a look on the Error when signing install thread where the same issue is debated.

If that does not help, can you please open Advanced Installer, go to "File" menu -> "Settings" -> "External Tools" and let us know which SignTool file path do you have set in the "SignTool.exe" field? Also, on what Windows OS version do you run your build operation?

Also, are you able to reproduce this in a sample project by using a test certificate? If so, please send us the resources by email e-mail at support at advancedinstaller dot com.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: Software signing - Could not extract digital certificate from

Yes the exported PFX does include the private key.

C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool.exe

OS Version is Windows 8 Workstation.

Yes, i chould be able to provide a test example - will work on this just now.

Additionally, if i use a command line and signtool, i can sign our msi, exe, dll and cab files with no issues.
I have also tried building the project as an msi and signing works ok in Advanced installer.

If i try the same by building an exe then i get the following error:
Preparing files... done.
Creating CAB file(s)... error.
Could not extract digital certificate from [E:\New.Certificates\ACodeSigning221214.pfx]

Best regards,
Ian
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Software signing - Could not extract digital certificate from

Hello Ian,

I have replied to you over the email.

Let's continue the conversation there.

For others facing this scenario, I will update this tread once we have a resolution on this.

Best regards.
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: Software signing - Could not extract digital certificate from

Hello Liviu,

I haven't seen your email yet but will keep checking. Please could you try sending again?

Best regards,
Ian
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Software signing - Could not extract digital certificate from

Hello Ian,

I've sent you the reply two times. Can you please verify the spam/junk folder?

Anyway, here is the content:

Can you please try to import the certificate in the personal store and see if the behavior still persist? Note that Microsoft recommends importing the certificate in the store and automatically use it from here every time a package is being digitally signed, instead of manually selecting the certificate file.

In this case, the option "Use from Personal certificate store" should be used in Advanced Installer's Digital Signature page.

Just double click on the certificate to start the Certification Import Wizard. When prompted, please select the Current User option.

Let me know if that helped.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: Software signing - Could not extract digital certificate from

Ok,

The certificate is imported into the Computer Account, Personal certificate store.

In the Digital Signature dialogue window when i select Use from Personal certificate store and then try to choose the certificate, the application displays (Not Responding) accross the top bar.

Just a note, we have been using the 'Use file from disk' option for many years.

Best regards,
Ian
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: Software signing - Could not extract digital certificate from

Would it be possible to call the support team at all. I've narrowed it down now quite considerably.
Are there any detailed debug logs that i can use?

Best regards,
Ian
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Software signing - Could not extract digital certificate from

Hello Ian,

I'm afraid that we only do support over the forum and email, not live support, as time does not permit it.

And this is because most of the time it is really difficult to investigate technical issues on the fly. Usually we need to investigate and replicate the issues on our own side, have to debate the behaviors and scenarios with our dev team too, and so on.

Can you tell me if outside of Advanced Installer you sign with the same signtool displayed in the "External Tools" menu? (C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool.exe)
Just a note, we have been using the 'Use file from disk' option for many years.
I suggested this because you are using a fairly old version, and at the time this was the Windows recommendation. Also, this solution helped a few customers in the past. In the latest releases you have the option to specify a custom signtool and add your custom command line, but in the 12.7.2 version this was not available.

Other customers said that updating their SDK to the latest version and then rebooting solved the problem.

Can you please forward to me your .AIP (setup project) file or a sample project where you can reproduce this using a test certificate, by email e-mail at support at advancedinstaller dot com?

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: Software signing - Could not extract digital certificate from

Hello Liviu,

Further testing has shown that this error only occurs when creating a Single Exe setup (resources inside).
Testing of all other scenarios appears to be ok and the build completes.

Also found that I was not able to change the CAB size under Advanced CAB layout. When i did make it bigger but within the paramaters
that were shown in the popup, it would complain and reduce it to 650Mb again. Not sure if this is related.

Which SDk are we referring too?

Also, our current certificate runs out quite soon so i need to resolve this asap.

Best regards,
Ian
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: Software signing - Could not extract digital certificate from

Further testing.

It appears that if i create a new Advanced Installer project and then build it, it signs as expected using the same code signing certificate.
Scratch that, there were no files to sign - when i add a file to sign then rebuild, i get the same error - Could no extract digital certificate from [path]certificate.pfx



If i try to change the certificate on an existing project then try to build it, it fails to sign.
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Software signing - Could not extract digital certificate from

Hello Ian,

I have already replied to your emails.

Let's continue the email conversation until we reach a conclusion.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”