If you are publisher of a Revit add-in, you will have to sign your add-in with your own certificate.
To sign your add-in with your own certificate, you first need to purchase a digital signature from a digital certificate vendor. Once you obtain a certificate (cer) or Personal Information Exchange (pfx) file, you can sign your DLL(s) using signtool.
Alternatively, you can also use an online Authenticode signing service, such as Symantec's Secure App Service - https://www.symantec.com/code-signing/secure-app-service/.
The following is a non-exhaustive list of vendors that provide digital certificates:
You can use signtool.exe tool to sign your .NET dll. The tool is automatically installed with Visual Studio. To run the tool, use the Developer Command Prompt. The following is the format of the command line parameters:
signtool.exe sign /fd SHA256 /f <.pfx-file-name> /p <password> <file-to-sign>.dllWhere /fd is a flag for the file digest algorithm to use. Here we use SHA256. (SHA stands for Secure Hash Algorithm. The signtool default is SHA1. We recommend SHA256, which is a newer, more secure version.) <.pfx-file-name> is the name of .pfx (Personal Information Exchange) file you obtain from the vendor. <password> is the password that you specify when obtaining the pfx file. <file-to-sign>.dll is the name of the DLL that you want to sign.
For example, if you run the command in an arbitrary folder, the above command may look like this:
"C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool" sign /fd SHA256 /f "C:/Dev/MyCert.pfx" /p "password123" “C:/Dev/HelloRevit.dll”Once the DLL is signed with an authorized certification, Revit will no longer pop up a security warning dialog upon loading your add-in.
You can also include the command in the Post-Built Event section of Visual Studio for your application project properties.
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" /fd SHA256 sign /f
"C:\Autodesk\MyCert.pfx" /p MyPassword "$(TargetDir)$(TargetFileName)"It is also worth adding a time stamp while signing (/td and /tr switches in signtool.exe); otherwise the app becomes untrusted when the certificate expires. Adding the time stamp ensures the app is trusted forever as long as it was signed prior to expiration (unless the certificate gets revoked):
signtool.exe timestamp /td sha256 /tr <URL-of-time-stamp-server> <file-to-sign>.dllFor example, the following uses the verisign timestamp server:
signtool.exe timestamp /td sha256 /tr "http://sha256timestamp.ws.symantec.com/sha256/" HelloRevit.dll