简体   繁体   中英

Signing office COM Add-in

I've developed an extension based on NetOffice. My office configuration requires applications to be signed by 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".

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

What's the appropriate method for signing the 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.

Some info that I found online:

First, create a .pfx file with pvk2pfx.exe:

  • "C:{PATH}\\pvk2pfx.exe" -pvk {PVK FILE NAME} -pi {cert owner name} -spc {SPC FILE NAME} -pfx {PFX FILE NAME}
  • eg: "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Bin\\pvk2pfx.exe" -pvk mypvkfile.pvk -pi companyname -spc myspcfile .spc -pfx mypfxfile .pfx

Then use the SignTool.exe utility:

  • signtool sign /f "C:{PATH}\\mypfxfile.pfx" /p {cert owner name} "C:{PATH}\\setup.exe"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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