electron-userland / electron-windows-store

:package: Turn Electron Apps into Windows AppX Packages
MIT License
677 stars 86 forks source link

Issue with Code Signing with CN that has Spaces / Special Characters #56

Closed jmarks1992 closed 7 years ago

jmarks1992 commented 7 years ago

I was able to generate almost the complete package (the whole .appx was created) but my package keeps failing on the final code signing step with "Error: SignerSign() failed. (-2147024885/0x8007000b). Looking this up online says that this means that the publisher does not match the certificate CN; however, having checked it a million times I am sure that they are the same. I can sign other arbitrary .exe files so my cert is definitely valid.

My CN does, however, have spaces and a trailing period (Quorum Analytics Inc.). Is there any chance that that's the issue / that something isn't getting escaped correctly?

felixrieseberg commented 7 years ago

Hey, thanks for reporting! We can probably get to the bottom of this fairly quickly - can you check out the AppXManifest.xml that is generated for you? It should show you what CN is specifically being used.

jmarks1992 commented 7 years ago

Yes -- it says <Identity Version="1.0.1.0" Publisher="CN=Quorum Analytics Inc." ProcessorArchitecture="x64" Name="Quorum">

I tried setting Publisher to "Quorum Analytics Inc." and that got me a different error (violates pattern constraint).

felixrieseberg commented 7 years ago

How about Publisher="CN=\"Quorum Analytics Inc.\""? That said, it should work just fine as it is, given that all samples contain CN=Microsoft Corporation. Could you try signing and building a little Hello World UWP appx - just to ensure that it works there?

jmarks1992 commented 7 years ago

No luck -- I also can't run the sign tool on the appx itself. And I looked at the CN spec -- periods are def allowed.

felixrieseberg commented 7 years ago

I'm sorry that this sucks for you, I'm just booking this as a "good news for Electron". I'd try to prong StackOverflow/Microsoft about this - this should certainly be possible. It's also possible that your certificates actually don't match.

Either way, it seems like this isn't a bug in this repo (so I'm closing it here, but do let me know if there's anything I can do!)