How to extend or create a new a cer certificate for package signing or re-signing UWP for sideloading?
How-I-fixed-it?
- Lookup the CN (Publisher Name) from the old certificate (the new one needs to have the same CN)
- Command window in current dirctory of the appx
- 1. Create a new certificate to self-sign you UWP app using the MakeCert in the Windows Kits SDK, e.g. "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\MakeCert" /n CN=YOUR_PUBLISHER_NAME /r /h 0 /eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /e "12/31/2100" /sv Test.pvk Test.cer
- Convert the certificate to pfx format (using the password you entered when promted by the signtool), e.g. "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\Pvk2Pfx" /pvk Test.pvk /pi "pwd" /spc Test.cer /pfx Test.pfx /po "pwd"
- Sign the appx, e.g. "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\SignTool.exe" sign /fd sha256 /f "Test.pfx" /p pwd "FULL_PATH_TO_MY.appx"
Found the solution here:
https://blogs.msdn.microsoft.com/wsdevsol/2014/02/12/create-a-windows-store-appx-package-and-sign-it/