Page 1 of 2
Digital signature exception
Posted: Thu Jan 24, 2013 7:50 am
by luczan
hi,
i'm trying to export my report to pdf with digital signature and i'm getting the exception:
Digital Signature error at step 1, code #80004005: Access is denied
at Stimulsoft.Report.Export.StiPdfExportService.ThrowDigitalSignError(Int32 step, String message, Boolean showCode)
at Stimulsoft.Report.Export.StiPdfExportService.ThrowDigitalSignError(Int32 step)
at Stimulsoft.Report.Export.StiPdfExportService.CreateSignature(Byte[] buf, Boolean getCertificateFromCryptoUI, String certificateID, Boolean useLocalMachineCertificates, Byte[] certificateData, String certificatePassword)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf1(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, StiExportService exportService, Stream stream, StiExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, Stream stream, StiExportSettings settings)
if my application runs as administrator (allowed only for test

), everything is ok /so problem is with read permission for certificates from local computer..- method Win32.CertOpenStore in StiPdfExportService/. Is there any way to give rights on this Certificates Store for a specific user or any setting in stiReport/StiPdfExportSettings to solve this issue?
regards,
marek
Re: Digital signature exception: Access is denied
Posted: Thu Jan 24, 2013 1:31 pm
by HighAley
Hello.
luczan wrote:i'm trying to export my report to pdf with digital signature and i'm getting the exception:
Digital Signature error at step 1, code #80004005: Access is denied
at Stimulsoft.Report.Export.StiPdfExportService.ThrowDigitalSignError(Int32 step, String message, Boolean showCode)
at Stimulsoft.Report.Export.StiPdfExportService.ThrowDigitalSignError(Int32 step)
at Stimulsoft.Report.Export.StiPdfExportService.CreateSignature(Byte[] buf, Boolean getCertificateFromCryptoUI, String certificateID, Boolean useLocalMachineCertificates, Byte[] certificateData, String certificatePassword)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf1(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, StiExportService exportService, Stream stream, StiExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, Stream stream, StiExportSettings settings)
if my application runs as administrator (allowed only for test

), everything is ok /so problem is with read permission for certificates from local computer..- method Win32.CertOpenStore in StiPdfExportService/. Is there any way to give rights on this Certificates Store for a specific user or any setting in stiReport/StiPdfExportSettings to solve this issue?
Please, check your user policy. Do you have access to the Certificates Store?
Thank you.
Re: Digital signature exception: Access is denied
Posted: Fri Jan 25, 2013 12:50 pm
by luczan
i checked it, but i can't set access to localMachine certificate store (only to concrete certificate).
... but after editing your code, application runs without exception:
StiPdfExportService.cs
method CreateSignature:
If (useLocalMachineCertificates)
{
//CERT_STORE_NAME = "Root";
CERT_SYSTEM_STORE = Win32.CERT_SYSTEM_STORE_LOCAL_MACHINE | Win32.CERT_STORE_READONLY_FLAG;
}
Can you tell me please how to set access to localMachine store for user without admininstrator rights?
thanks
marek
Re: Digital signature exception: Access is denied
Posted: Fri Jan 25, 2013 2:56 pm
by HighAley
Hello.
We didn't meet such problem before. We need time to make some tests.
We will let you know about results.
Thank you.
Re: Digital signature exception: Access is denied
Posted: Mon Jan 28, 2013 12:55 pm
by luczan
thank you
M.
Re: Digital signature exception: Access is denied
Posted: Tue Jan 29, 2013 11:03 am
by HighAley
Hello.
We couldn't reproduce your price, but we have added the flag.
Our next prerelease build will be available on February 1.
Thank you.
Re: Digital signature exception: Access is denied
Posted: Mon Jul 22, 2013 8:14 am
by luczan
hello,
i have another problem with digital signature:
System.Exception: Digital Signature error at step 3, code #80004005: Object was not found
at Stimulsoft.Report.Export.StiPdfExportService.ThrowDigitalSignError(Int32 step, String message, Boolean showCode)
at Stimulsoft.Report.Export.StiPdfExportService.ThrowDigitalSignError(Int32 step)
at Stimulsoft.Report.Export.StiPdfExportService.CreateSignature(Byte[] buf, Boolean getCertificateFromCryptoUI, String certificateID, Boolean useLocalMachineCertificates, Byte[] certificateData, String certificatePassword)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf1(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, StiExportService exportService, Stream stream, StiExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, Stream stream, StiExportSettings settings)
-certificate was installed to local machine
my tests:
1. certificate installed to local machine - FAILED (Digital Signature error at step 3...)
2. certificate is also installed to current user - OK
3. certificate is removed from current user (certificate is still installed to local machine) - OK
could you help me with this problem, pls?
thanks
Re: Digital signature exception
Posted: Tue Jul 23, 2013 6:57 am
by Alex K.
Hello,
We made some improvements in that direction about a some month ago. Please check the latest build.
Thank you.
Re: Digital signature exception
Posted: Tue Jul 23, 2013 11:16 am
by luczan
yes, i know about this improvements -
http://forum.stimulsoft.com/viewtopic.php?f=8&t=36129
my Stimulsoft version: 2013.2.1605.0 - I think, this version is correct.
Re: Digital signature exception
Posted: Wed Jul 24, 2013 6:24 am
by Alex K.
Hello,
1. certificate installed to local machine - FAILED (Digital Signature error at step 3...)
In your case the certificate is selected, but do not access to it. Please try to check the security settings.
Thank you.