简体   繁体   English

签署办公室COM加载项

[英]Signing office COM Add-in

I've developed an extension based on NetOffice. 我已经开发了基于NetOffice的扩展。 My office configuration requires applications to be signed by Trusted Publishers. 我的办公室配置要求应用程序必须由Trusted Publishers签名。 I tried signing the output DLL with signtool.exe, with a valid certificate, but unfortunately, Office says "There is no digital signature available". 我尝试使用有效的证书用signtool.exe对输出DLL进行签名,但是不幸的是,Office表示“没有可用的数字签名”。

The option can be enabled via: 可以通过以下方式启用该选项:

File → Options → Trust Center → Trust Center Settings → Add-ins → Require application Add-ins to be signed by Trusted Publisher 文件→选项→信任中心→信任中心设置→加载项→要求应用程序加载项由Trusted Publisher签名

What's the appropriate method for signing the DLL? 签名DLL的​​合适方法是什么?

When using VSTO, ClickOnce handles the signing, also there's a .manifest file that is created for the DLL, I'm not sure if its required or not but I'm unable to create one for my class library. 使用VSTO时,ClickOnce会处理签名,并且还会为DLL创建一个.manifest文件,我不确定是否需要它,但无法为我的类库创建一个。

Some info that I found online: 我在网上找到的一些信息:

First, create a .pfx file with pvk2pfx.exe: 首先,使用pvk2pfx.exe创建一个.pfx文件:

  • "C:{PATH}\\pvk2pfx.exe" -pvk {PVK FILE NAME} -pi {cert owner name} -spc {SPC FILE NAME} -pfx {PFX FILE NAME} “ C:{PATH} \\ pvk2pfx.exe” -pvk {PVK文件名} -pi {证书所有者名} -spc {SPC文件名} -pfx {PFX文件名}
  • eg: "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Bin\\pvk2pfx.exe" -pvk mypvkfile.pvk -pi companyname -spc myspcfile .spc -pfx mypfxfile .pfx 例如:“ C:\\ Program Files \\ Microsoft SDKs \\ Windows \\ v7.1 \\ Bin \\ pvk2pfx.exe” -pvk mypvkfile.pvk -pi公司名称 -spc myspcfile .spc -pfx mypfxfile .pfx

Then use the SignTool.exe utility: 然后使用SignTool.exe实用程序:

  • signtool sign /f "C:{PATH}\\mypfxfile.pfx" /p {cert owner name} "C:{PATH}\\setup.exe" signtool登录/ f“ C:{PATH} \\ mypfxfile.pfx” / p {证书所有者名称}“ C:{PATH} \\ setup.exe”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM