jaklug
Posts: 11
Joined: 2018-08-28
|
It seems that my code signing certificate isn't supported by Add-in Express for Office and .NET. When I run adxpubliher with it, I get this output:
Publisher: Preparing files...
Done.
Publisher: Checking the certificate...
Publisher failed. Invalid provider type specified.
Publisher error (stack trace): at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()
at AddinExpress.Projects.Common.Certificate.HasPrivateKey(X509Certificate2 cert)
at AddinExpress.Deployment.ClickTwicePublisher.ValidateCertificate(X509Certificate2 cert, String hashOrPath)
at AddinExpress.Deployment.ClickTwicePublisher.Run()
at AddinExpress.Deployment.Program.Main(String[] args)
When I try using the VS plugin to set the signing options, when I select my certificate from the store I get a dialog saying "Add-in Express Visual Studio Package encountered an exception. You can get morwe information by examining the add-in-express-package-log.txt log file."
The contents of the log file are:
<LogEntry Date="2022-03-11 11:48:10" Severity="Exception" Source="AddinExpress.Projects.Common.SignForm.LoadCertificateFromStore" ProcessId="28968">
<Exception Type="System.Security.Cryptography.CryptographicException" Source="AddinExpress.Projects.Common.SignForm.ValidateCertificate">
<Message>Only certificates using CSP Storage Provider are supported. </Message>
<StackTrace> at AddinExpress.Projects.Common.SignForm.ValidateCertificate(X509Certificate2 cert, String hashOrPath)
at AddinExpress.Projects.Common.SignForm.LoadCertificateFromStore(String hash)</StackTrace>
</Exception>
</LogEntry>
Why don't you support CNG certificates? This particular certificate is only about a year old. It should work with any current signing application.
Thanks,
Joe |
|
Andrei Smolin
Add-in Express team
Posts: 18830
Joined: 2006-05-11
|
|
jaklug
Posts: 11
Joined: 2018-08-28
|
Thanks for the response. However, in the workaround, I still need to supply a certificate in this step:
"C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Bin\adxpublisher.exe" /OutputType=ClickTwice /WorkingDirectory="D:\Temp\MyAddin89\MyAddin89\Configs\ClickTwice\1033\1.0.0" /ConfigFile="adxpublisher.exe.config"
Can I execute adxpublisher.exe without setting a certificate in the config file? And if I still need a certificate, how does the workaround help?
Joe |
|
Andrei Smolin
Add-in Express team
Posts: 18830
Joined: 2006-05-11
|
Hello Joe,
Andrei Smolin writes:
I still need to supply a certificate in this step
Use a test certificate; Add-in Express allows you to create a new certificate. The subsequent steps overtrite the test certificate on binaries.
Regards from Poland (CET),
Andrei Smolin
Add-in Express Team Leader |
|