YehudaKremer / msix

Create Msix installer for flutter windows-build files.
https://pub.dev/packages/msix
MIT License
279 stars 69 forks source link

[BUG] Signtool - Error information: "Error: SignerSign() failed." (-2147024885/0x8007000b) #274

Open mmattes opened 3 months ago

mmattes commented 3 months ago

:information_source: Info

Version: v3.16.7

:speech_balloon: Description

This is not really a bug it is more a wish to improve the documentation or to keep it as a reference for he future if others struggle with the same problem we were having.

We were struggeling a lot to get a signed msix with digicert the error we were facing was Error information: "Error: SignerSign() failed." (-2147024885/0x8007000b). In the end we found the issue the publisher in the pubspec.yaml needs to be in the correct order. We retrived it with the following commands.

Convert PEM to CER using OpenSSL (run this command in cmd or PowerShell) openssl x509 -inform PEM -in your_certificate.pem -outform DER -out your_certificate.cer

Import the certificate $certPath = "C:\path\to[your_certificate.cer](http://your_certificate.cer/)" $certStore = "Cert:\LocalMachine\My" Import-Certificate -FilePath $certPath -CertStoreLocation $certStore

Retrieve the certificate $cert = Get-ChildItem -Path $certStore | Where-Object { $_.Subject -like "Your Certificate Common Name" }

Display the distinguished name $cert.Subject

:scroll: Pubspec.yaml

N/A

kjxbyz commented 2 weeks ago

Same issue, how to solve it?

mmattes commented 2 weeks ago

Same issue, how to solve it?

See Initiatial issue where i also mentioned how we got it working.

kjxbyz commented 2 weeks ago

In the end we found the issue the publisher in the pubspec.yaml needs to be in the correct order.

Is this it? I don't understand what you mean.

mmattes commented 2 weeks ago

@kjxbyz do this.

`Convert PEM to CER using OpenSSL (run this command in cmd or PowerShell) openssl x509 -inform PEM -in your_certificate.pem -outform DER -out your_certificate.cer

Import the certificate $certPath = "C:\path\toyour_certificate.cer" $certStore = "Cert:\LocalMachine\My" Import-Certificate -FilePath $certPath -CertStoreLocation $certStore

Retrieve the certificate $cert = Get-ChildItem -Path $certStore | Where-Object { $_.Subject -like "Your Certificate Common Name" }

Display the distinguished name $cert.Subject`

The Output of the last command ist what needs to be in the pubspec.yaml