EldoS | Feel safer!

Software components for data protection, secure storage and transfer

XML digital signature in Silverlight 4 and 5

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
Posted: 03/14/2012 16:45:47
by Redman  (Basic support level)
Joined: 03/14/2012
Posts: 8


Is it possible to sign an XML from Silverlight with a certificate in Windows Certification Store? I guess it is only possible with SL5 but not SL4. Can you give me an example please?
The second question is it possible to sign XML from Silverlight (4 or 5) with a certificate on a smart card?

Thanks for your answers!
Posted: 03/15/2012 04:19:16
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Both functions are available only in Silverlight 5 and only for trusted out-of-browser applications. Regard the samples, the code will be as close as possible to the one for desktop applications. So you can use desktop samples as a reference.
Posted: 03/15/2012 04:51:39
by Redman  (Basic support level)
Joined: 03/14/2012
Posts: 8

I created a simple application in SL5, with "Require elevated trust when running in-browser" checked and Application.Current.HasElevatedPermissions returns TRUE.
Below is the code:

TElX509CertificateValidator certificateValidator = new TElX509CertificateValidator();

It fails on the last line with the following error:

Unable to load DLL 'coredll.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I tried running it in-browser and out-of-browser... Do you know what I'm doing wrong?
Posted: 03/15/2012 05:00:17
by Eugene Mayevski (EldoS Corp.)

you are referencing wrong DLL. Coredll is referenced by .NET CF assemblies. Silverlight references other set of assemblies.

Sincerely yours
Eugene Mayevski
Posted: 03/15/2012 05:09:13
by Redman  (Basic support level)
Joined: 03/14/2012
Posts: 8

I checked again and all assemblies are from SILVERLIGHT_50 folder:

  • SILVERLIGHT_50\SecureBlackbox.dll
  • SILVERLIGHT_50\SecureBlackbox.Charsets.dll
  • SILVERLIGHT_50\SecureBlackbox.HTTP.dll
  • SILVERLIGHT_50\SecureBlackbox.HTTPCommon.dll
  • SILVERLIGHT_50\SecureBlackbox.HTTPServer.dll
  • SILVERLIGHT_50\SecureBlackbox.SMIME.dll
  • SILVERLIGHT_50\SecureBlackbox.XML.dll
  • SILVERLIGHT_50\SecureBlackbox.XMLSecurity.dll
  • SILVERLIGHT_50\SecureBlackbox.ZIP.dll
Posted: 03/15/2012 05:35:10
by Eugene Mayevski (EldoS Corp.)

You are right and I was wrong -- "coredll" text is found in silverlight assemblies, though there's no reference to such DLL anywhere in the code or in project files. I am wondering how the stuff works for other users. We will check the issue and let you know a bit later today.

Sincerely yours
Eugene Mayevski
Posted: 03/15/2012 05:37:09
by Redman  (Basic support level)
Joined: 03/14/2012
Posts: 8

Ok,thank you for your help.
Posted: 03/15/2012 06:13:36
by Eugene Mayevski (EldoS Corp.)

I have found where the problem can come from. We will fix it in the evening and refresh files on the site.

Sincerely yours
Eugene Mayevski
Posted: 03/15/2012 08:44:29
by Redman  (Basic support level)
Joined: 03/14/2012
Posts: 8

Please inform me here when the new version will be avaliable. Thank you.
Posted: 03/16/2012 05:15:44
by Redman  (Basic support level)
Joined: 03/14/2012
Posts: 8

I would like to inform you that it now works ok, thank you!

Now I have another question, not directly connected to Silverlight. I have created the Silverlight XML signer/verifier demo based on the SimpleSigner sample that you provide. The only problem I have (or mayve my lack of knowlage on digital signing) is that after I sign an XML and after than change some value in a child node the Verify function still says: Signature and references validated successfully. Am I doing something wrong or this is not the way to check if the content wasn't modified?
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.



Topic viewed 6023 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!