SignTool Error: An unexpected internal error has occurred. (0x80080209)

2

I'm trying to sign appx file, but have this error:

SignTool Error: An unexpected internal error has occurred.
Error information: "Error: SignerSign() failed." (-2146958839/0x80080209)

I found that the error means: The SIP_SUBJECTINFO structure used to sign the package didn't contain the required data

Any idea how to fix it?

The certificate is made using commands:

MakeCert /n "CN=..." /r /h 0 /eku 1.3.6.1.5.5.7.3.3 /pe /sv MyKey.pvk MyKey.cer
Pvk2Pfx /pvk MyKey.pvk /pi 123456 /spc MyKey.cer /pfx MyKey.pfx /po 123456

And used as:

signtool.exe sign -f MyKey.pfx -p "123456" -fd SHA256 -v my.appx

But result is as already mentioned:

The following certificate was selected:
    Issued to: ...
    Issued by: ...
    Expires:   Sun Jan 01 01:59:59 2040
    SHA1 hash: 7D760C6DF55749803CF0E0DF0F9615F607822B12

Done Adding Additional Store
SignTool Error: An unexpected internal error has occurred.
Error information: "Error: SignerSign() failed." (-2146958839/0x80080209)

As a note I should add, that application is signed as an output from DesktopAppConverter.exe, but I need to repack it and the signing is not working even when I use the auto-generated pfx file used by the converter.

signtool
makecert
desktop-app-converter
asked on Stack Overflow Apr 12, 2018 by Oldes

1 Answer

1

Ok... so I found that I was probably using some wrong signtool.exe. I found location of the tool which is used with the DesktopAppConverter in its log. In my case it is:

"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\signtool.exe"

With this file the signing is successful.

answered on Stack Overflow Apr 12, 2018 by Oldes

User contributions licensed under CC BY-SA 3.0