Jun 30 2020 12:56 PM
Jun 30 2020 12:56 PM
I created a MSIX file and later signing the package with this command
signtool sign /fd SHA256 /v /sm /s My /n "ABC Corporation" /t http://timestamp.digicert.com file.msix
But signing failed with this error:
Sign tool Error: This file format cannot be signed because it is not recognized.
Appreciate any suggestions to resolve this issue
Jul 02 2020 07:14 AM
@Sri-Boddupalli While I'm not sure about the syntax (I normally use an external pfx file instead of the certificate store), so I'm not sure of syntax for getting from the store. But consider these ideas:
Jul 09 2020 07:32 AM
Thanks @TIMOTHY MANGAN appreciate your input
Subject Name matched with Manifest file CN name verified it. Just to reassure I exported the certificate installed by our team in the store as a .cer file and imported it during the MSIX pacakging process. Which do not sign the package but automatically generates the correct publisher information.
Also I tried using the Digicert Utility tool to sign the package(GUI method) and getting below error. Is this a generic error message or specific to my scenario not sure.
One thing I noticed is it does not have .MSIX file in the drop down selection of file type we are signing shown in below. Does this mean our code signing certificate is not supporting MSIX file type? after all the error message we got while using the signtool was "The file format cannot be signed because it is not recognized"
Jul 09 2020 09:51 AM
If the Digicert utility doesn't recognise .msix, you can try renaming the file to .appx and then sign it. Ultimately I assume this utility is calling the Microsoft signtool.exe utility to perform the signing.
There is no difference on the file extension; the difference between a UWP app and a MSIX one is internal to the manifest file rather than the file name extension.
Jul 09 2020 09:52 AM
You might also just leave the timestamp off for a test and make sure that it is not the cause.
Jul 12 2020 03:01 PM
You could perform some steps to eliminate a few things:
(1) Start with testing if the certificate you have is valid for code signing. Are you able to sign any executable with it? (download 7-zip EXE from the official website and try to sign it). If you get an error at this point, then there is something probably wrong with your certificate. After all, one of the error codes your reported was
The form specified for the subject is not one supported or known by the specified trust provider.
(2) If signing works for EXE, then it should (with the version you have) work for MSIX as well. You should try to validate your MSIX then - how did you create it? Can you use makeappx.exe to unpack it, and then pack it again? It should do some semantic validation to ensure that the manifest is correct and some values are in place.
(3) Try to create a new self-signed certificate and sign the MSIX in question, with the SDK you have. This can also exclude any potential issues with MSIX file.
You can use my freeware tool MSIX Hero (msixhero.net) for points (2) and (3), or use the following links and resources explaining how to perform them manually:
Jul 13 2020 04:34 AM
Jul 13 2020 08:50 AM
Thank you guys for your valuable suggestions, appreciate your time on this.
1) Change the Path to Signtool Location below
C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64
2) Sign the Package using this command
.\signtool.exe sign /v /sm /s My /n "ABC Corporation" /fd SHA256 /t http://timestamp.digicert.com "<FileLocation>\File.msix"
It was so frustrating to fight with AD team on getting the .PFX file with Password. I understand their security concerns but without that we are pretty much helpless. @John Vintzel @Sharla_Akers Any better explanation I can come up with, if our AD team ask why exactly we need .PFX file instead of installing the certificate in cert store and using that? OR if you could develop a Signtool GUI utility that would be wonderful
Apr 08 2021 10:20 AM