I'm trying to generate a self-signed code-signing certificate to sign an Excel XLL Add-In, using makecert and pvk2pfx. I've been following the process described in this answer. I understand makecert is deprecated, however I'm on Windows 7 so apparently the recommendation is to continue using this tool.
All goes well with the Root CA and code-signing certificate generation (I think).
makecert -r -pe -n "CN=My CA" -ss CA -sr CurrentUser ^
-a sha256 -cy authority -sky signature -sv MyCA.pvk MyCA.cer
certutil -user -addstore Root MyCA.cer
makecert -pe -n "CN=My SPC" -a sha256 -cy end ^
-sky signature ^
-ic MyCA.cer -iv MyCA.pvk ^
-sv MySPC.pvk MySPC.cer
I convert the certificate and key into a PFX file
pvk2pfx -pvk MySPC.pvk -spc MySPC.cer -pfx MySPC.pfx -f
And sign my XLL:
signtool sign /v /f MySPC.pfx /t http://timestamp.digicert.com TestProject-AddIn64-packed.xll
However, when I try to load the Add-In in Excel, it gives me the following warning:
Even though the certificate details seem to be ok when I click the Show signature details button
Does anybody have a clue what is going wrong and how I can fix this?




