使用自定义代码签名证书为UWP-Apps提供信息

时间:2016-11-01 11:59:25

标签: certificate xamarin.forms uwp codesign xamarin.uwp

使用Xamarin.Forms UWP创建公司内部应用程序的要求到底是什么?我可以编译* .appxbundle-Package但是由于证书错误,没有人可以安装它。如果我尝试使用StartSSL的正常代码签名证书来签署包,我收到以下错误:

  

Manifest Designer无法导入证书。

     

您选择的证书无效,因为它是   要么已过期,要么有其他问题。有关更多信息,请参阅:   https://go.microsoft.com/fwlink/?LinkID=241478

我们的其他桌面应用程序使用相同的证书和signtool,所以我猜证书是可以的。 signtool用于其他.NET程序集(如WPF项目)的用法:

"C:\Program Files (x86)\Windows Kits\10\bin\x86\signtool.exe" sign /f "..\..\..\..\..\Finaltec\Framework\Signing.pfx" /p ... /tr "http://timestamp.globalsign.com/scripts/timestamp.dll" "$(TargetPath)"

签署UWP应用程序是否有任何特殊要求,以便任何人都可以安装它?使用的证书是Class 3 StartSSL代码签名证书,有效期至2020年6月。如果我尝试使用Visual Studio生成的测试证书安装应用程序,我收到根证书不受信任和安装的消息过程将被取消。即使我在获得相同的结果错误之前安装了证书手册。

代码签名证书信息:

  • 名称:CVA Computer - Visualisierung und Animation GmbH
  • 地址:Beckebohnen 2
  • Zip,城市:31618 Liebenau
  • 州,国家:Niedersachsen,DE
  • 电话:+ 49-502398110
  • 电子邮件:info@cva.de
  • 到期日:2017-04-14

Package.appxmanifest内容:

<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
  <Identity Name="f736c883-f105-4d30-a719-4bf328872f5e" Publisher="CN=CVA Computer - Visualisierung und Animation GmbH" Version="1.0.1.0" />
  <mp:PhoneIdentity PhoneProductId="f736c883-f105-4d30-a719-4bf328872f5e" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
  <Properties>
    <DisplayName>CVA.COS_App</DisplayName>
    <PublisherDisplayName>CVA Computer - Visualisierung und Animation GmbH</PublisherDisplayName>
    <Logo>Assets\StoreLogo.png</Logo>
  </Properties>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
  </Dependencies>
  <Resources>
    <Resource Language="x-generate" />
  </Resources>
  <Applications>
    <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="FPCL.WIndows.App">
      <uap:VisualElements DisplayName="CVA.COS_App" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="CVA.COS_App" BackgroundColor="#f4f4f4">
        <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
        </uap:DefaultTile>
        <uap:SplashScreen Image="Assets\SplashScreen.png" />
        <uap:InitialRotationPreference>
          <uap:Rotation Preference="portrait" />
          <uap:Rotation Preference="landscape" />
          <uap:Rotation Preference="portraitFlipped" />
          <uap:Rotation Preference="landscapeFlipped" />
        </uap:InitialRotationPreference>
      </uap:VisualElements>
    </Application>
  </Applications>
  <Capabilities>
    <Capability Name="internetClient" />
    <Capability Name="privateNetworkClientServer" />
    <DeviceCapability Name="webcam" />
  </Capabilities>
</Package>

1 个答案:

答案 0 :(得分:0)

  
    

如果我尝试使用StartSSL的常规代码签名证书对包进行签名,则会出现以下错误

  

如果我们想要唱UWP应用,则需要代码签名证书。您从StartSSL获得的证书用于客户端身份验证,您可以检查增强型密钥用法字段:

可用代码签名证书:

enter image description here

来自StartSSL的证书:

enter image description here

另请参阅:What is special about a code signing certificate?Intro to certificates

------ 2016年11月16日更新------

请参阅https://go.microsoft.com/fwlink/?LinkID=241478

上的验证证书部分

看起来这张证书违反了我加粗的句子:

  

验证必须增强密钥用法属性的值   包含代码签名,也可能包含终身签名。的不限   其他EKU被禁止

他们的截图(下方)显示了增强型密钥Codeignatur和 Kernelmodus-Codesignatur

screenshot