microsoft / msix-packaging

MSIX SDK
MIT License
963 stars 163 forks source link

How to use `,` in Publisher name #593

Closed DRSchlaubi closed 11 months ago

DRSchlaubi commented 11 months ago

As an open source project the only way to go rn are Certums OSS certificates, which do require the CN tag to be set to Open Source Developer, <yourname>

So I have an Identitytag like this


  <Identity Name="dev.schlaubi.Tonbrett" Version="0.0.0.0" Publisher="CN=Open Source Developer, Michael Rittmeister, O=Open Source Developer, S=Bayern, C=DE" ProcessorArchitecture="x64" />`, however that fails validation as of the use of the `,`

  So how do I put a , in my CN?
florelis commented 11 months ago

You have to wrap the CN value in quotes, like CN="Open Source Developer, Michael Rittmeister", O=Open Source Developer, S=Bayern, C=DE (And possibly the O one too? I can't remember if spaces are allowed without quoting)

But since that is XML, you'll have to escape the quotes with &quot;

Publisher="CN=&quot;Open Source Developer, Michael Rittmeister&quot;, O=Open Source Developer, S=Bayern, C=DE"

DRSchlaubi commented 11 months ago

The subject line in my certificate is

E = michael@rittmeister.in
CN = Open Source Developer, Michael Rittmeister
O = Open Source Developer
L = Gauting
S = Bavaria
C = DE

So my Identity tag is

  <Identity Name="dev.schlaubi.Tonbrett" Version="0.0.0.0" Publisher="E=michael@rittmeister.in, CN=&quot;Open Source Developer, Michael Rittmeister&quot;, O=Open Source Developer, L=Gauting, S=Bavaria, C=DE" ProcessorArchitecture="x64" />

However signing fails with Error information: "Error: SignerSign() failed." (-2146889723/0x80091005) with afaik means that the Publisher is wrong

DRSchlaubi commented 11 months ago

I was using a wrong /fd value, thx for your reply

jim-jiang-github commented 6 days ago

I was using a wrong /fd value, thx for your reply

I got same error... I try the way you do, but I always get the error :Error information: "Error: SignerSign() failed." (-2147024885/0x8007000b) My certificate is: Thumbprint Subject


4FBEC69EB3E41C04FCB2E04041AA45AFD10E92BC CN="Jim Jiang, O=Sunia, Inc., C=US"

and the AppxManifest.xml is <Identity Name="SuniaPTE.LTD.AcerAssist" Publisher="CN=Jim Jiang, O=&quot;Sunia, Inc.&quot;, C=US" Version="1.0.0.0" ProcessorArchitecture="x64" />