Digital certificate

Stimulsoft Reports.WEB discussion
Post Reply
Nicolai_Petrov
Posts: 11
Joined: Mon Jun 25, 2012 10:50 am

Digital certificate

Post by Nicolai_Petrov »

Hello again!

Is it possible to add a digital certificate that i have in a database field to a web report so it adds to the PDF when exporting?

Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Digital certificate

Post by Andrew »

Hello,

Unfortunately, on the current moment our product works only with certificates that are stored in the Windows Certificate Store.

Thank you.
Nicolai_Petrov
Posts: 11
Joined: Mon Jun 25, 2012 10:50 am

Digital certificate

Post by Nicolai_Petrov »

Does it work with the certificate stored on the client side? Do you have any documentation for this?

Thanks! :biggrin:
Nicolai_Petrov
Posts: 11
Joined: Mon Jun 25, 2012 10:50 am

Digital certificate

Post by Nicolai_Petrov »

Hello,

I've read the documentation within the manual and imnot sure i get it.

In the doc i read:

Important! In web applications this way cannot be used, because the menu of selecting a certificate
is displayed on a computer on what the export is in process, in other words on the server. So the user
cannot see and cannot do anything with it. In other words the export endlessly waits when the certificate
will be selected.


Reading this i assume i can't let the user decide which certificate to add to the Pdf, it was one of the options for us..

But the best option would be to have this data from the certificate stored in our databases, and so the client would add his certificate in his profile menu, then we add it to his register and depending the user executing we provide in the datasource the appropiate certificate.

One last option would be to have all the certificates from our clients stored in our server then somehow decide which certificate we must add to the pdf depending on the user.

Thanks in advance

Nico.:waaaht:
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Digital certificate

Post by HighAley »

Hello, Nicolai.
Nicolai_Petrov wrote:I've read the documentation within the manual and imnot sure i get it.

In the doc i read:

Important! In web applications this way cannot be used, because the menu of selecting a certificate
is displayed on a computer on what the export is in process, in other words on the server. So the user
cannot see and cannot do anything with it. In other words the export endlessly waits when the certificate
will be selected.


Reading this i assume i can't let the user decide which certificate to add to the Pdf, it was one of the options for us..

But the best option would be to have this data from the certificate stored in our databases, and so the client would add his certificate in his profile menu, then we add it to his register and depending the user executing we provide in the datasource the appropiate certificate.

One last option would be to have all the certificates from our clients stored in our server then somehow decide which certificate we must add to the pdf depending on the user.
We have added two new properties to the PDF export settings:
1. CertificateData. Here you could set your certificate file as binary raw data.
2. CertificatePassword.

Look at the sample code:

Code: Select all

FileStream fs = new FileStream(@"c:\certificate.pfx", FileMode.Open);
byte[] buf = new byte[fs.Length];
fs.Read(buf, 0, buf.Length);

StiPdfExportSettings es = new StiPdfExportSettings();
es.UseDigitalSignature = true;
es.GetCertificateFromCryptoUI = false;
es.SubjectNameString = "YourSubjectName";
es.CertificateData = buf;
es.CertificatePassword = "yourPassword";

StiReport report = new StiReport();
report.Load("yourReport.mrt");
report.Render();
report.ExportDocument(StiExportFormat.Pdf, @"c:\test.pdf", es);
We have tested this code with pfx certificate.

New properties will be available in our next prerelease build next week.

Thank you.
Nicolai_Petrov
Posts: 11
Joined: Mon Jun 25, 2012 10:50 am

Digital certificate

Post by Nicolai_Petrov »

GREAT !!

THANKS !!

We will test it on next prerelease and tell you the outcome.

Nico. :biggrin:
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Digital certificate

Post by HighAley »

Hello.

We are waiting for your reply. Next prerelease build will be available on 5 of July.

Thank you.
Nicolai_Petrov
Posts: 11
Joined: Mon Jun 25, 2012 10:50 am

Re: Digital certificate

Post by Nicolai_Petrov »

Is the prerelease build already online ?

Nico.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Digital certificate

Post by HighAley »

Hello.
Nicolai_Petrov wrote:Is the prerelease build already online ?
You could find a trial version here http://stimulsoft.com/ReportsWebDownloads.aspx or if you are a regestered user then in the Registered Users Area.

Thank you.
Post Reply