How can I sign my Windows Store app from Window Store certificate?

本秂侑毒 提交于 2019-12-01 02:52:54

问题


I have just bought my developer account from the Windows Store, and I would like to sign my app before uploading. When I go inside the packaging and then I click on the choose certificate button, I see following options:

  1. Pick from certificate store
  2. Select from file
  3. Create test certificate.

I tested everything with the third option but the first option, pick from certificate store, gives me error like below:

No Certificate Available

No certificates meet the application criteria.

This is a screen capture of the error:

How am I supposed to get the certificate ? I thought like Apple iTunes I can create the certificate from the store and then I will use it or like Android self signing certificate.

I am using Visual Studio 2013..

Kindly help


回答1:


I believe you only need to sign your app if you are sideloading it. If you upload it to the Windows Store, Microsoft will sign the app for you.

From the MSDN article Submitting Your Windows 8 Apps:

Signing and publishing. In this final step, we'll sign the packages you submitted with a trusted certificate that matches the technical details of your developer account. This provides customers with the assurance that the app is certified by the Windows Store and hasn't been tampered with.




回答2:


You need a codesign certificate. Have a look at this blog post (from Hanselman) where you will find link to one of the CAs that you can buy codesign from.

In most cases you need to buy the codesign certificate but there are CAs (i.e. if you are open source developer) where you can get it for free. One of them is Cetrum CA (which I am currently using). Take a look here. The process of obtaining it is a torture, but the certificate itself is OK. (it doesn't work with all browsers - use FF, single signon needs to be done on every page and mails are in Polish language.)




回答3:


Not sure if this is related/helpful but FWIW I recently had to get a codesign certificate for my windows store app (for local testing/installs). The following command line scripts work for me in case they help anyone else.

Part 1: Generate the Cert

(Run these from Visual Studio 201x Command Prompt)

# 1) Generate .PVK and .CER
MakeCert /n "CN=YourMSPartnerPublisherIDString" /r /h 0 /eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /sv MyAppName.pvk MyAppName.cer

# 2) Generate .PFX
Pvk2Pfx /pvk  MyAppName.pvk /pi "password" /spc MyAppName.cer /pfx MyAppName.pfx /po "password"

Part 2: Create the APPX from EXE and sign the APPX w/the Cert

(Run these from Command Line as Administrator)

# 3) Generate APPX from EXE
# (Assumes you have your App EXE and valid AppManifest.xml in C:\MyAppFolder\AppxPackage folder)
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\makeappx.exe" pack /p "C:\MyAppFolder\MyAppName.appx" /d "C:\MyAppFolder\AppxPackage"

# 4) Sign APPX with Cert
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\signtool.exe" sign /fd sha256 /a /f "C:\MyAppFolder\CertMyAppName.pfx" /p password "C:\MyAppFolder\MyAppName.appx"


来源:https://stackoverflow.com/questions/30640652/how-can-i-sign-my-windows-store-app-from-window-store-certificate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!