MSIX Packageing Tool / signtool certificate issues

%3CLINGO-SUB%20id%3D%22lingo-sub-224217%22%20slang%3D%22en-US%22%3EMSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-224217%22%20slang%3D%22en-US%22%3E%3CP%3E1)%20I%20have%20a%20valid%20(paid%20for)%20code%20signing%20certificate%20from%20a%20well%20known%20CA%20that%20has%20a%20password%20so%20I%20can't%20use%20the%20in%20tool%20signing%20(which%20is%20something%20you%20should%20support!).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%2017134%20SDK%20is%20present.%26nbsp%3B%20So%20I%20pulled%20the%20command%20out%20of%20the%20log%20file%20and%20modified%20as%20follows%20(but%20with%20the%20proper%20password)%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22C%3A%5CProgram%20Files%20(x86)%5CWindows%20Kits%5C10%5Cbin%5C10.0.17134.0%5Cx64%5Csigntool.exe%22%20sign%20%2Fa%20%2Fv%20%2Fdebug%20%2Ffd%20SHA256%20%2Ff%20%22C%3A%5CUsers%5CAdmin%5CDesktop%5Cstrongname.pfx%22%20%2Fp%20%22xxxThePasswordxxx%22%20%22C%3A%5CUsers%5CAdmin%5CDesktop%5CTMEdit%5CSetup_TMEdit.msix%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhich%20fails.%26nbsp%3B%20The%20relevant%20output%20being%3A%3C%2FP%3E%3CDIV%3EAfter%20EKU%20filter%2C%201%20certs%20were%20left.%3CBR%20%2F%3EAfter%20expiry%20filter%2C%201%20certs%20were%20left.%3CBR%20%2F%3EAfter%20Private%20Key%20filter%2C%201%20certs%20were%20left.%3CBR%20%2F%3EThe%20following%20certificate%20was%20selected%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Issued%20to%3A%20TMurgent%20Technologies%2C%20LLP%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Issued%20by%3A%20COMODO%20RSA%20Code%20Signing%20CA%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Expires%3A%26nbsp%3B%26nbsp%3B%20Mon%20Jun%2021%2019%3A59%3A59%202021%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SHA1%20hash%3A%20A5CD580A89C438FB9B87753BB05F383560EB366F%3C%2FDIV%3E%3CDIV%3E%3CBR%20%2F%3EThe%20following%20additional%20certificates%20will%20be%20attached%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Issued%20to%3A%20COMODO%20RSA%20Code%20Signing%20CA%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Issued%20by%3A%20COMODO%20RSA%20Certification%20Authority%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Expires%3A%26nbsp%3B%26nbsp%3B%20Mon%20May%2008%2019%3A59%3A59%202028%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SHA1%20hash%3A%20B69E752BBE88B4458200A7C0F4F5B3CCE6F35B47%3C%2FDIV%3E%3CDIV%3EDone%20Adding%20Additional%20Store%3CBR%20%2F%3ESignTool%20Error%3A%20An%20unexpected%20internal%20error%20has%20occurred.%3CBR%20%2F%3EError%20information%3A%20%22Error%3A%20SignerSign()%20failed.%22%20(-2147024846%2F0x80070032)%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%232%20Reading%20up%20on%20this%20we%20get%20to%20cause%20of%20issue%20number%202%3A%26nbsp%3B%20The%20name%20of%20the%20publisher%20in%20CN%20form%20in%20the%20manifest%20(input%20from%20the%20MSIX%20Manifest%20tool)%20must%20exactly%20match%20that%20of%20the%20certificate%3A%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EInside%20the%20certificate%2C%26nbsp%3B%20The%20publisher%20name%20is%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20CN%3DTMurgent%20Technologies%2C%20LLP%3C%2FDIV%3E%3CDIV%3Ewhich%2C%20unfortunately%2C%20is%20the%20legal%20name%20of%20the%20entity%20so%20that%20isn't%20changing!%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EThe%20MSIX%20Package%20Tool%20does%20not%20allow%20a%20comma%20in%20the%20input%20field.%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20450px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F38954iF75A57BD2D4FD231%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture.PNG%22%20title%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-225212%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-225212%22%20slang%3D%22en-US%22%3E%3CP%3EI%20spoke%20too%20soon...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEntering%20the%20escape%20works%20to%20get%20past%20the%20UI%20dialog%20and%20makes%20a%20package%20if%20you%20don't%20sign%20it.%20The%20AppXManifest%20ends%20up%20with%20the%20%5C2C%20in%20the%20publishing%20field%2C%20but%20then%20the%20signtool%20errors%20(8007000b)%20against%20it.%26nbsp%3B%20I'm%20not%20sure%20if%20the%20fault%20on%20that%20is%20the%20PackagingTool%20or%20signtool.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20think%20that%20the%20least%20confusing%20solution%20for%20everyone%20is%20to%20let%20the%20PackagingTool%20accept%20the%20comma%20(and%20other%20escape-worthy%20characters)%20and%20place%20them%20in%20the%20Publishing%20field%20as%20is%2C%20and%20then%20fix%20the%20signtool%20to%20understand%20and%20escape%20if%20necessary.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOf%20course%20the%20best%20solution%20might%20be%20to%20let%20me%20point%20to%20the%20certificate%20earlier%20in%20the%20PackagingTool%20and%20have%20it%20extract%20what%20it%20needs%20rather%20than%20allow%20us%20to%20mess%20this%20all%20up.%20Probably%20still%20need%20to%20fix%20signtool%2C%20but%20the%20more%20of%20this%20that%20can%20be%20automated%20the%20better.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-225183%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-225183%22%20slang%3D%22en-US%22%3E%3CP%3EEscaping%20in%20the%20dialog%20box%20as%20Bogdan%20suggested%20does%20indeed%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20the%20GUI%20of%20the%20tool%20should%20just%20accept%20the%20comma%20and%20escape%20it%20behind%20the%20scenes.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20addition%2C%20when%20there%20is%20documentation%20on%20all%20of%20this%2C%20the%20documentation%20should%20be%20clear%20about%20what%20to%20include%20in%20this%20field.%26nbsp%3B%20There%20will%20be%20confusion%20on%20if%20OU%3D%20parts%20should%20be%20included.%26nbsp%3B%20Just%20make%20it%20clear%20in%20the%20documentation%2C%20especially%20for%20people%20that%20don't%20deal%20in%20certificates%20regularly.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-225168%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-225168%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Bogdan%20-%20I'll%20give%20that%20a%20try.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-225093%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-225093%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Tim%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fprevious-versions%2Fwindows%2Fdesktop%2Fldap%2Fdistinguished-names%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAccording%20to%20MSFT%20docs%3C%2FA%3E%20comma%20(%22%2C%22)%20is%20a%20reserved%20character%20that%20must%20be%20escaped%2C%20as%20show%20in%20their%20examples%20from%20the%20linked%20article.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20seems%20that%20using%20%22%5C%2C%22%20is%20still%20not%20considered%20correct%20by%20the%20GUI%20of%20MSIX%20packaging%20tool%2C%20but%20it%20does%20not%20complain%20when%20using%20the%20hex%20value%20for%20comma%2C%20i.e.%20%22CN%3DTMurgent%20Technologies%20%5C2C%20LLP%22.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20don't%20have%20a%20test%20certificate%20at%20hand%20with%20a%20command%20in%20the%20publisher%20name%20to%20fully%20test%20it%2C%20but%26nbsp%3Baccording%20to%20their%20docs%20it%20should%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-225060%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-225060%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Thimothy%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ejust%20to%20clarify%3A%3C%2FP%3E%3CP%3EThis%20is%20the%20structure%20of%20my%20PKI%3A%3C%2FP%3E%3CP%3ECN%3DJohannes%20Freundorfer%2C%20OU%3DMyCustomOU%2C%20OU%3DMyOrg%2C%20DC%3DMyDomain%2C%20DC%3Ddom%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%3CSPAN%3Epplied%20to%20your%20case%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eis%20%22T%3C%2FSPAN%3E%3CSPAN%3EMurgent%20Technologies%2C%20LLP%22%20really%20your%20explicit%20Subject%20name%20(Including%20the%20%22%2C%22%20character%20)%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EMy%20current%20best%20guess%20is%2C%20that%20his%20can't%20match%20the%20schema.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2107407%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2107407%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Timothy%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20you%20find%20a%20solution%20to%20this%20issue%3F%3C%2FP%3E%3CP%3EI'm%20having%20the%20same%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%2C%3C%2FP%3E%3CP%3EMo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2107541%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2107541%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F896369%22%20target%3D%22_blank%22%3E%40Mo_Velayati%3C%2FA%3E%26nbsp%3BI%20am%20using%20a%20cert%20without%20a%20comma%20in%20the%20ID%20field.%26nbsp%3B%20Since%20I%20don't%20have%20to%20use%20my%20public%20CA%20code%20signing%20cert%20to%20upload%20to%20the%20Microsoft%20Store%2C%20a%20self-signed%20cert%20is%20OK%20for%20internal%20work.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEventually%2C%20I'll%20have%20to%20solve%20this%20if%20I%20want%20to%20host%20MSIX%20package%20installers%20on%20my%20website%2C%20but%20for%20now%20those%20are%20just%20MSIs.%20So%20I%20haven't%20looked%20at%20this%20to%20see%20if%20it%20was%20addressed%20in%20the%20tooling.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2107717%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2107717%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20Timothy%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20very%20surprised%20and%20there%20is%20no%20solution%20for%20this%20issue.%20I%20need%20to%20ask%20for%20a%20new%20signing%20cert%20with%20no%20commas%20in%20the%20subject.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2133583%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2133583%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F896369%22%20target%3D%22_blank%22%3E%40Mo_Velayati%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20found%20that%2C%20at%20least%20on%20newer%20Packaging%20Tool%20and%20newer%20OSs%2C%20it%20is%20now%20possible%20to%20sign%20with%20this%20certificate.%26nbsp%3B%20The%20key%20was%20to%20include%20the%20string%20in%20quotation%20marks%2C%20but%20also%20to%20include%20the%20entire%20subject%20line%2C%20and%20not%20just%20the%20CN%3D%20portion%20of%20it.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20was%20not%20necessary%20to%20replace%20the%20comma%20via%20%5C2c%20or%20%26amp%3Bcomma%3B%20syntax%20(in%20fact%20these%20don't%20work).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139661%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139661%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Timothy%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20AzureSignTool%20and%20although%20I%20have%20tried%20everything%20with%20regards%20to%20the%20Publisher%20attribute%2C%20I%20still%20can't%20get%20it%20to%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20give%20you%20more%20details%3A%3C%2FP%3E%3CP%3EI%20have%20%22%2C%22%20characters%20in%20CN%20and%20O%20so%20the%20publisher%20attribute%20for%20me%20is%20something%20like%20this%3A%3CBR%20%2F%3EPublisher%3D%22%3CSTRONG%3EO%3D%3C%2FSTRONG%3EA%20Company%2C%20INC.%2C%20%3CSTRONG%3ESERIALNUMBER%3D%3C%2FSTRONG%3E123456-78%2C%20%3CSTRONG%3EC%3D%3C%2FSTRONG%3EUS%2C%20%3CSTRONG%3ES%3D%3C%2FSTRONG%3ESTATE%2C%20%3CSTRONG%3EL%3D%3C%2FSTRONG%3ECITY%2C%20%3CSTRONG%3ESTREET%3D%3C%2FSTRONG%3EAddress%20more%20address%2C%20%3CSTRONG%3ECN%3D%3C%2FSTRONG%3EA%20Company%2C%20INC.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20putting%20the%20CN%20and%20O%20values%20in%20doable%20quotes%2C%20triple%20quotes%2C%20single%20quotes%20but%20nothing%20worked.%20Every%20time%20it's%20either%20the%20Package.appxmanifest%20file%20that%20complains%20about%20the%20value%20of%20the%20publisher%20not%20following%20the%20pattern%20or%20it's%20the%20azure%20pipeline%20that%20says%20the%20publisher%20doesn't%20match%20the%20signing%20cert.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20other%20issue%20is%20that%20in%20the%20signing%20cert%2C%20the%20state%20is%20written%20like%20ST%3DSTATE%20but%20my%20package.appxmanifest%20pattern%20only%20accepts%20S%3DSTATE.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20not%20sure%20what%20is%20exactly%20causing%20this%20issue%20but%20I've%20been%20trying%20for%20almost%203%20weeks%20and%20nothing%20has%20worked%20so%20far.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20have%20any%20ideas%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139727%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139727%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F896369%22%20target%3D%22_blank%22%3E%40Mo_Velayati%3C%2FA%3E%26nbsp%3BThe%20big%20issue%20I%20see%20with%20your%20example%20is%20that%20the%20Publisher%20field%20must%20start%20with%20the%20characters%20%22CN%3D%22%2C%20and%20as%20that%20field%20must%20exactly%20match%20the%20subject%20field%20on%20the%20certificate%2C%20there%20probably%20is%20no%20way%20to%20sign%20with%20that%20cert.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat%20said%2C%20I'm%20not%20working%20with%20the%20Azure%20signing%20service%20and%20haven't%20since%20they%20changed%20it.%26nbsp%3B%20But%20likely%20the%20underlying%20cause%20of%20your%20issue%20is%20the%20order%20of%20things%20in%20the%20cert.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETim%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139786%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139786%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20Tim%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'll%20try%20changing%20the%20order.%3C%2FP%3E%3CP%3EWhat%20tool%20do%20you%20use%20to%20sign%20your%20msix%20package%3F%3C%2FP%3E%3CP%3EAnd%20in%20the%20earlier%20reply%20where%20you%20mentioned%20that%20the%20key%20was%20to%20mention%20the%20string%20in%20quotation%20marks%2C%20what%20do%20you%20mean%20by%20the%20string%3F%20Do%20you%20mean%20the%20entire%20publisher%20value%20or%20the%20value%20for%20CN%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-Mo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139858%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139858%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F896369%22%20target%3D%22_blank%22%3E%40Mo_Velayati%3C%2FA%3E%26nbsp%3BI%20am%20using%20signtool.exe%20from%20the%20windows%20SDK%20from%20a%20script%20directly.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAttached%20image%20is%20an%20example%20of%20the%20identity%20portion%20of%20a%20manifest%20I%20recently%20signed%2C%20and%20another%20of%20the%20subject%20field%20as%20seen%20in%20the%20certificate%20manager%20(NOTE%3A%20certmgr%20doesn't%20display%20it%20in%20the%20correct%20form%20as%20in%20the%20cert%20file%2C%20but%20you%20can%20see%20the%20order).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECommas%20were%20not%20actually%20my%20issue%2C%20including%20the%20complete%20certificate%20subject%20in%20the%20Publisher%20field%20was.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20reference%20schema%20(ManifestTypes)%20for%20the%20manifest%20file%20is%20what%20imposes%20restrictions%20on%20what%20what%20is%20allowed%20in%20the%20Publisher%20field%2C%20and%20that%20is%20where%20the%20requirement%20that%20it%20start%20with%20CN%3D%20comes%20from.%26nbsp%3B%20SignTool%20is%20what%20imposes%20the%20matching%20between%20this%20publisher%20field%20and%20the%20subject%20field%20of%20the%20cert.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sign.PNG%22%20style%3D%22width%3A%20822px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F255280iB3B17D6E66AC3F53%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Sign.PNG%22%20alt%3D%22Sign.PNG%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Cert.PNG%22%20style%3D%22width%3A%20383px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F255281i56F9EF69589F9A9E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Cert.PNG%22%20alt%3D%22Cert.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2140311%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2140311%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20looked%20at%20the%20signing%20cert%20in%20certmgr%20just%20to%20figure%20out%20the%20order%20of%20the%20attributes%20and%20updated%20Package.appxmanifest%20based%20on%20that%20and%20still%20no%20luck.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20attachments%20you%20can%20see%20that%20I%20tried%20the%20publisher%20attribute%20two%20different%20ways%20and%20none%20of%20them%20worked.%20I'm%20starting%20to%20think%20that%20there's%20something%20wrong%20with%20the%20AzureSignTool.%20Are%20you%20using%20SignTool.exe%20with%20azure%20key%20vault%3F%20is%20that%20possible%3F%20My%20signing%20cert%20is%20in%20azure%20key%20vault.%20That's%20why%20I'm%20using%20AzureSignTool%20instead%20of%20SignTool.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMo%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2153782%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2153782%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F896369%22%20target%3D%22_blank%22%3E%40Mo_Velayati%3C%2FA%3E%26nbsp%3BI%20am%20not%20signing%20via%20Azure.%26nbsp%3B%20Ultimately%20they%20must%20use%20a%20version%20of%20signtool%2C%20and%20I%20suppose%20it%20is%20possible%20that%20this%20might%20not%20be%20the%20latest.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYour%20%232%20image%20looks%20correct%20to%20me%20for%20the%20Publisher%20field.%26nbsp%3B%20Assuming%20you%20have%20access%20to%20the%20files%20from%20the%20Ci%2FCD%20process%2C%20a%20way%20to%20troubleshoot%20may%20be%20to%20take%20your%20unsigned%20package%20to%20a%20Windows%20VM%20and%20manually%20signing%20via%20the%20latest%20signtool%20and%20your%20cert.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOutside%20of%20that%20you'll%20need%20Microsoft%20help.%26nbsp%3B%20Maybe%20tagging%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F73899%22%20target%3D%22_blank%22%3E%40John%20Vintzel%3C%2FA%3E%26nbsp%3Bwill%20get%20him%20to%20forward%20the%20thread%20to%20someone%20that%20can%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2157607%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2157607%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EThe%20publisher%20string%20entered%20by%20you%20needs%20to%20match%20exactly%20the%20string%20extracted%20from%20the%20cert.%20This%20Windows%20API%20function%20documentation%20lists%20some%20of%20the%20recommendations%20in%20the%20Remarks%20section%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fapi%2Fwincrypt%2Fnf-wincrypt-certnametostra%23remarks%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fapi%2Fwincrypt%2Fnf-wincrypt-certnametostra%23remarks%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ETo%20extract%20the%20right%20publisher%20from%20your%20cert%20subject%2C%20you%20could%20use%20the%20MSIX%20Packaging%20Tool's%20editor%20to%20sign%20a%20package%20and%20see%20what%20it%20puts%20in%20the%20manifest.%3CBR%20%2F%3EOr%20you%20could%20use%20the%20following%20C%23%20code%20or%20Powershell%20commands%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3EX509Certificate%20cert%20%3D%20new%20X509Certificate()%3B%0Acert.Import(certificatePath%2C%20certificatePassword%2C%20X509KeyStorageFlags.DefaultKeySet)%3B%0Astring%20publisher%20%3D%20cert.Subject%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E(New-Object%20System.Security.Cryptography.X509Certificates.X509Certificate2%20cert.pfx).Subject%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EReplace%20cert.pfx%20with%20your%20cert%20name.%20If%20it%20is%20password%20protected%2C%20use%20cert.pfx%2Cpassword.%3CBR%20%2F%3E%3CBR%20%2F%3ELet%20us%20know%20if%20this%20helps.%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2160830%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2160830%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F689635%22%20target%3D%22_blank%22%3E%40SahibiMiranshah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Sahibi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20cert%20is%20on%20azure%20key%20vault%20and%20I'm%20trying%20to%20sign%20directly%20from%20the%20key%20vault%20instead%20of%20downloading%20or%20importing%20the%20certificate.%20That's%20why%20I'm%20use%20AzureSignTool.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20tried%20the%20powershell%20scripts%20you%20mentioned%20and%20all%20I%20get%20is%20a%20simple%20string%20for%20the%20subject%20name.%20It%20doesn't%20include%20any%20of%20the%20OIDs%20meaning%20it's%20not%20in%20the%20correct%20format.%20So%20if%20the%20publisher%20for%20my%20cert%20is%20%3A%3CBR%20%2F%3E%3CSPAN%3EPublisher%3D%22%3C%2FSPAN%3E%3CSTRONG%3EO%3D%3C%2FSTRONG%3E%3CSPAN%3EA%20Company%2C%20INC.%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESERIALNUMBER%3D%3C%2FSTRONG%3E%3CSPAN%3E123456-78%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EC%3D%3C%2FSTRONG%3E%3CSPAN%3EUS%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ES%3D%3C%2FSTRONG%3E%3CSPAN%3ESTATE%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EL%3D%3C%2FSTRONG%3E%3CSPAN%3ECITY%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESTREET%3D%3C%2FSTRONG%3E%3CSPAN%3EAddress%20more%20address%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECN%3D%3C%2FSTRONG%3E%3CSPAN%3EA%20Company%2C%20INC.%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Eit%20would%20print%3A%20%3CSTRONG%3EA%20Company%2C%20INC.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20mostly%20interested%20to%20know%20what%20I%20should%20choose%20as%20my%20Publisher%20Identity%20in%20Packager.appxmanifest%20so%20it%20exactly%20matches%20the%20subject%20of%20the%20certificate.%20So%20far%20I%20have%20tried%20almost%20every%20possible%20way%20formatting%20but%20still%20no%20luck.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20the%20link%20you%20posted%20here%20I%20saw%20that%20if%20there%20are%20special%20characters%20such%20as%20comma%20in%20the%20subject%2C%20they%20have%20to%20be%20inside%20double%20quotes.%20I%20have%20tried%20that%20as%20well%20but%20I%20still%20get%20the%20same%20error%20saying%20that%20it%20doesn't%20match%20the%20subject.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20thoughts%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2161621%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2161621%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F896369%22%20target%3D%22_blank%22%3E%40Mo_Velayati%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EThe%20subject%20string%20in%20a%20cert%20must%20exactly%20match%20the%20string%20in%20the%20appxmanifest%20file.%20There%20is%20no%20workaround%20for%20this%20restriction.%3CBR%20%2F%3EYou%20could%20either%20update%20the%20appxmanifest%20Publisher%20field%2C%20for%20example%2C%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3EPublisher%3D%22CN%3DMicrosoft%20Corporation%2C%20O%3DMicrosoft%20Corporation%2C%20L%3DRedmond%2C%20S%3DWashington%2C%20C%3DUS%22%3CBR%20%2F%3E%3CDIV%3Eor%20acquire%20a%20new%20cert%20to%20match%20the%20Publisher%20in%20the%20appxmanifest%20file%20if%20you%20cannot%20change%20the%20appxmanifest.%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2162998%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2162998%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F689635%22%20target%3D%22_blank%22%3E%40SahibiMiranshah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20reply%2C%20Sahibi!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20understand%20that%20the%20publisher%20must%20match%20the%20subject.%20My%20question%20or%20I%20guess%20my%20issue%20is%20that%20I%20don't%20know%20how%20I%20should%20format%20the%20publisher%20in%20appxmanifest%20if%20there%20are%20special%20characters%20(comma%20in%20my%20case)%20in%20it.%20When%20I%20look%20at%20my%20signing%20cert%20subject%20I%20see%20this%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3ESERIALNUMBER%3D%3C%2FSTRONG%3E%3CSPAN%3E123456-78%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EC%3D%3C%2FSTRONG%3E%3CSPAN%3EUS%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EST%3D%3C%2FSTRONG%3E%3CSPAN%3ESTATE%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EL%3D%3C%2FSTRONG%3E%3CSPAN%3ECITY%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESTREET%3D%3C%2FSTRONG%3E%3CSPAN%3EAddress%20more%20address%2C%26nbsp%3B%3CSTRONG%3EO%3D%3C%2FSTRONG%3EA%20Company%2C%20INC.%2C%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECN%3D%3C%2FSTRONG%3E%3CSPAN%3EA%20Company%2C%20INC.%3CBR%20%2F%3ENotice%20that%20there%20are%20commas%20in%20%3CSTRONG%3EO%3C%2FSTRONG%3E%20and%20%3CSTRONG%3ECN%3C%2FSTRONG%3E%20values.%20How%20would%20you%20suggest%20I%20should%20format%20this%20in%20appxmanifest%20for%20the%20Publisher%20value%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EBest%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EMo%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2166455%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20Packageing%20Tool%20%2F%20signtool%20certificate%20issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2166455%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F896369%22%20target%3D%22_blank%22%3E%40Mo_Velayati%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20the%20certificate%20subject%20is%3CBR%20%2F%3E%3CSTRONG%3ESERIALNUMBER%3D%3C%2FSTRONG%3E%3CSPAN%3E123456-78%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EC%3D%3C%2FSTRONG%3E%3CSPAN%3EUS%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EST%3D%3C%2FSTRONG%3E%3CSPAN%3ESTATE%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EL%3D%3C%2FSTRONG%3E%3CSPAN%3ECITY%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESTREET%3D%3C%2FSTRONG%3E%3CSPAN%3EAddress%20more%20address%2C%26nbsp%3B%3CSTRONG%3EO%3D%3C%2FSTRONG%3EA%20Company%2C%20INC.%2C%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECN%3D%3C%2FSTRONG%3E%3CSPAN%3EA%20Company%2C%20INC.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethen%20this%20Publisher%20should%20work%3A%3C%2FP%3E%0A%3CP%3EPublisher%3D%22SERIALNUMBER%3D123456-78%2C%20C%3DUS%2C%20S%3DSTATE%2C%20L%3DCITY%2C%20STREET%3DAddress%20more%20address%2C%20O%3D%26amp%3Bquot%3BA%20Company%2C%20INC.%26amp%3Bquot%3B%2C%20CN%3D%26amp%3Bquot%3BA%20Company%2C%20INC.%26amp%3Bquot%3B%22%3C%2FP%3E%0A%3CP%3EI%20just%20tested%20signing%20a%20package%20with%20that%20exact%20publisher%20and%20a%20self%20signed%20certificate.%26nbsp%3BThings%20to%20note%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20order%20of%20the%20fields%20is%20the%20exact%20same%20(without%20CN%20at%20the%20start)%3C%2FLI%3E%0A%3CLI%3EST%20becomes%20S%3C%2FLI%3E%0A%3CLI%3EThe%20O%20and%20CN%20fields%20are%20quoted%20because%20they%20include%20commas%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIf%20that%20doesn't%20work%2C%20you%20can%20try%20using%20signtool.exe%20for%20finding%20the%20error%20(even%20if%20you%20end%20up%20using%20AzureSignTool%20after%20figuring%20it%20out).%20There%20are%20two%20things%20that%20you%20can%20do%20with%20signtool%20for%20debugging%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAdd%20the%20%2Fdebug%20flag.%20That%20may%20help%20if%20the%20issue%20is%20with%20the%20certificate%20(e.g.%20not%20enabled%20for%20signing%20or%20expired).%3C%2FLI%3E%0A%3CLI%3ESet%20the%20APPXSIP_LOG%20environment%20variable%20to%20a%20value%20from%201%20to%203%20depending%20on%20how%20much%20logging%20you%20want.%20This%20would%20tell%20you%20if%20there%20is%20a%20mismatch%20between%20the%20publisher%20and%20the%20certificate%20subject%2C%20and%20what%20is%20the%20correct%20value.%20For%20example%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3EERROR%3A%20%5BAppx%3A%3APackaging%3A%3ASipFunctionHelper%3A%3AVerifyManifestPublisherName%5D%20failed%20because%20signing%20certificate%20subject%20name%20(SERIALNUMBER%3D...%20%3CCERT%3E)%20does%20not%20match%20package%20manifest%20publisher%20(CN%3D...%20%3CPACKAGE%3E)%E2%80%8B%3C%2FPACKAGE%3E%3C%2FCERT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EYou%20may%20be%20able%20to%20do%20something%20similar%20with%20AzureSignTool%20but%20I'm%20not%20familiar%20with%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20do%20this%20you%20would%20need%20to%20have%20the%20certificate%20available%20in%20your%20machine%2C%20not%20in%20Azure%20Key%20Vault%20(only%20to%20debug).%20You%20can%20download%20your%20certificate%20or%20create%20a%20self%20signed%20certificate%20with%20the%20same%20subject.%20See%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fpackage%2Fcreate-certificate-package-signing%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECreate%20a%20certificate%20for%20package%20signing%20-%20MSIX%20%7C%20Microsoft%20Docs%3C%2FA%3E.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
MVP

1) I have a valid (paid for) code signing certificate from a well known CA that has a password so I can't use the in tool signing (which is something you should support!).

 

The 17134 SDK is present.  So I pulled the command out of the log file and modified as follows (but with the proper password):

 

"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\signtool.exe" sign /a /v /debug /fd SHA256 /f "C:\Users\Admin\Desktop\strongname.pfx" /p "xxxThePasswordxxx" "C:\Users\Admin\Desktop\TMEdit\Setup_TMEdit.msix"

 

Which fails.  The relevant output being:

After EKU filter, 1 certs were left.
After expiry filter, 1 certs were left.
After Private Key filter, 1 certs were left.
The following certificate was selected:
    Issued to: TMurgent Technologies, LLP
    Issued by: COMODO RSA Code Signing CA
    Expires:   Mon Jun 21 19:59:59 2021
    SHA1 hash: A5CD580A89C438FB9B87753BB05F383560EB366F

The following additional certificates will be attached:
    Issued to: COMODO RSA Code Signing CA
    Issued by: COMODO RSA Certification Authority
    Expires:   Mon May 08 19:59:59 2028
    SHA1 hash: B69E752BBE88B4458200A7C0F4F5B3CCE6F35B47
Done Adding Additional Store
SignTool Error: An unexpected internal error has occurred.
Error information: "Error: SignerSign() failed." (-2147024846/0x80070032)
 
#2 Reading up on this we get to cause of issue number 2:  The name of the publisher in CN form in the manifest (input from the MSIX Manifest tool) must exactly match that of the certificate:
 
Inside the certificate,  The publisher name is
          CN=TMurgent Technologies, LLP
which, unfortunately, is the legal name of the entity so that isn't changing!
 
The MSIX Package Tool does not allow a comma in the input field. 
Capture.PNG

 

 

20 Replies

Hi Thimothy,

 

just to clarify:

This is the structure of my PKI:

CN=Johannes Freundorfer, OU=MyCustomOU, OU=MyOrg, DC=MyDomain, DC=dom

 

Applied to your case:

is "TMurgent Technologies, LLP" really your explicit Subject name (Including the "," character )?

 

My current best guess is, that his can't match the schema.

 

 

 

 

Hi Tim,

 

According to MSFT docs comma (",") is a reserved character that must be escaped, as show in their examples from the linked article.

 

It seems that using "\," is still not considered correct by the GUI of MSIX packaging tool, but it does not complain when using the hex value for comma, i.e. "CN=TMurgent Technologies \2C LLP".

I don't have a test certificate at hand with a command in the publisher name to fully test it, but according to their docs it should work.

Thanks Bogdan - I'll give that a try.

Escaping in the dialog box as Bogdan suggested does indeed work.

 

But the GUI of the tool should just accept the comma and escape it behind the scenes. 

 

In addition, when there is documentation on all of this, the documentation should be clear about what to include in this field.  There will be confusion on if OU= parts should be included.  Just make it clear in the documentation, especially for people that don't deal in certificates regularly.

I spoke too soon...

 

Entering the escape works to get past the UI dialog and makes a package if you don't sign it. The AppXManifest ends up with the \2C in the publishing field, but then the signtool errors (8007000b) against it.  I'm not sure if the fault on that is the PackagingTool or signtool.

 

I would think that the least confusing solution for everyone is to let the PackagingTool accept the comma (and other escape-worthy characters) and place them in the Publishing field as is, and then fix the signtool to understand and escape if necessary.

 

Of course the best solution might be to let me point to the certificate earlier in the PackagingTool and have it extract what it needs rather than allow us to mess this all up. Probably still need to fix signtool, but the more of this that can be automated the better.

@TIMOTHY MANGAN 

 

Hi Timothy,

 

Did you find a solution to this issue?

I'm having the same problem.

 

Best,

Mo

@Mo_Velayati I am using a cert without a comma in the ID field.  Since I don't have to use my public CA code signing cert to upload to the Microsoft Store, a self-signed cert is OK for internal work. 

 

Eventually, I'll have to solve this if I want to host MSIX package installers on my website, but for now those are just MSIs. So I haven't looked at this to see if it was addressed in the tooling.

@TIMOTHY MANGAN 

 

Thanks Timothy,

 

I am very surprised and there is no solution for this issue. I need to ask for a new signing cert with no commas in the subject.

@Mo_Velayati 

I have found that, at least on newer Packaging Tool and newer OSs, it is now possible to sign with this certificate.  The key was to include the string in quotation marks, but also to include the entire subject line, and not just the CN= portion of it. 

 

It was not necessary to replace the comma via \2c or , syntax (in fact these don't work).

@TIMOTHY MANGAN 

 

Hi Timothy,

 

I am using AzureSignTool and although I have tried everything with regards to the Publisher attribute, I still can't get it to work.

 

To give you more details:

I have "," characters in CN and O so the publisher attribute for me is something like this:
Publisher="O=A Company, INC., SERIALNUMBER=123456-78, C=US, S=STATE, L=CITY, STREET=Address more address, CN=A Company, INC."

 

I have tried putting the CN and O values in doable quotes, triple quotes, single quotes but nothing worked. Every time it's either the Package.appxmanifest file that complains about the value of the publisher not following the pattern or it's the azure pipeline that says the publisher doesn't match the signing cert.

 

The other issue is that in the signing cert, the state is written like ST=STATE but my package.appxmanifest pattern only accepts S=STATE.

 

I'm not sure what is exactly causing this issue but I've been trying for almost 3 weeks and nothing has worked so far.

 

Do you have any ideas?

@Mo_Velayati The big issue I see with your example is that the Publisher field must start with the characters "CN=", and as that field must exactly match the subject field on the certificate, there probably is no way to sign with that cert.

 

That said, I'm not working with the Azure signing service and haven't since they changed it.  But likely the underlying cause of your issue is the order of things in the cert.

 

Tim

@TIMOTHY MANGAN 

 

Thanks Tim,

 

I'll try changing the order.

What tool do you use to sign your msix package?

And in the earlier reply where you mentioned that the key was to mention the string in quotation marks, what do you mean by the string? Do you mean the entire publisher value or the value for CN?

 

-Mo

@Mo_Velayati I am using signtool.exe from the windows SDK from a script directly.

 

Attached image is an example of the identity portion of a manifest I recently signed, and another of the subject field as seen in the certificate manager (NOTE: certmgr doesn't display it in the correct form as in the cert file, but you can see the order).

 

Commas were not actually my issue, including the complete certificate subject in the Publisher field was. 

The reference schema (ManifestTypes) for the manifest file is what imposes restrictions on what what is allowed in the Publisher field, and that is where the requirement that it start with CN= comes from.  SignTool is what imposes the matching between this publisher field and the subject field of the cert.

 

Sign.PNGCert.PNG

 

@TIMOTHY MANGAN 

 

I looked at the signing cert in certmgr just to figure out the order of the attributes and updated Package.appxmanifest based on that and still no luck.

 

In the attachments you can see that I tried the publisher attribute two different ways and none of them worked. I'm starting to think that there's something wrong with the AzureSignTool. Are you using SignTool.exe with azure key vault? is that possible? My signing cert is in azure key vault. That's why I'm using AzureSignTool instead of SignTool.

 

Mo

 

 

@Mo_Velayati I am not signing via Azure.  Ultimately they must use a version of signtool, and I suppose it is possible that this might not be the latest.

 

Your #2 image looks correct to me for the Publisher field.  Assuming you have access to the files from the Ci/CD process, a way to troubleshoot may be to take your unsigned package to a Windows VM and manually signing via the latest signtool and your cert.

 

Outside of that you'll need Microsoft help.  Maybe tagging @John Vintzel will get him to forward the thread to someone that can help.

@TIMOTHY MANGAN 
The publisher string entered by you needs to match exactly the string extracted from the cert. This Windows API function documentation lists some of the recommendations in the Remarks section https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certnametostra#remarks 

To extract the right publisher from your cert subject, you could use the MSIX Packaging Tool's editor to sign a package and see what it puts in the manifest.
Or you could use the following C# code or Powershell commands:

X509Certificate cert = new X509Certificate();
cert.Import(certificatePath, certificatePassword, X509KeyStorageFlags.DefaultKeySet);
string publisher = cert.Subject;

 

(New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 cert.pfx).Subject

Replace cert.pfx with your cert name. If it is password protected, use cert.pfx,password.

Let us know if this helps.

@SahibiMiranshah 

 

Hi Sahibi,

 

My cert is on azure key vault and I'm trying to sign directly from the key vault instead of downloading or importing the certificate. That's why I'm use AzureSignTool. 

I tried the powershell scripts you mentioned and all I get is a simple string for the subject name. It doesn't include any of the OIDs meaning it's not in the correct format. So if the publisher for my cert is :
Publisher="O=A Company, INC., SERIALNUMBER=123456-78, C=US, S=STATE, L=CITY, STREET=Address more address, CN=A Company, INC."

 

it would print: A Company, INC.

 

I am mostly interested to know what I should choose as my Publisher Identity in Packager.appxmanifest so it exactly matches the subject of the certificate. So far I have tried almost every possible way formatting but still no luck. 

 

I the link you posted here I saw that if there are special characters such as comma in the subject, they have to be inside double quotes. I have tried that as well but I still get the same error saying that it doesn't match the subject.

 

Any thoughts?

@Mo_Velayati 
The subject string in a cert must exactly match the string in the appxmanifest file. There is no workaround for this restriction.
You could either update the appxmanifest Publisher field, for example, 

Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
or acquire a new cert to match the Publisher in the appxmanifest file if you cannot change the appxmanifest.

@SahibiMiranshah 

 

Thanks for reply, Sahibi!

 

I understand that the publisher must match the subject. My question or I guess my issue is that I don't know how I should format the publisher in appxmanifest if there are special characters (comma in my case) in it. When I look at my signing cert subject I see this:

SERIALNUMBER=123456-78, C=US, ST=STATE, L=CITY, STREET=Address more address, O=A Company, INC.,  CN=A Company, INC.
Notice that there are commas in O and CN values. How would you suggest I should format this in appxmanifest for the Publisher value?

 

Best,

Mo