EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How can I sign a XML file with RSA-SHA1

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#26107
Posted: 08/13/2013 09:26:31
by Jacob jvandiermen (Standard support level)
Joined: 08/09/2013
Posts: 55

Hallo Eugene,

Also when I use your pfx file or mine pfx file I get a invalid secret key error.

Regards,

Jacob
#26108
Posted: 08/13/2013 11:49:00
by Dmytro Bogatskyy (EldoS Corp.)

Hello,

To create an enveloped signature with SimpleSigner sample you should:
1. Select an xml document, then load it.
2. In a tree select an element (with a default options this element will be signed and a Signature element will be placed under this element).
3. Click "Sign" button
4. Keep default options and set only "Key File" with a test certificate: "SecureBlackbox\Extra\Certificates\cert_no_pwd.pfx"
(if you are using "SecureBlackbox\Extra\Certificates\cert.pfx" certificate, then you would need to enter passphrase: "password")
5. Click "OK" button and ignore any exception that may occur. Signing should complete.
6. "Save XML" document.

Quote
Sorry forgot to include the xml file! Change the extension from xml to txt otherwise the mailing system will reject the file.
...
When I use the cert.pfx file and I sign the xml file how can I assign the output value to the value of the node dsig:SignatureValue.

Thank you for the sample. I think I got it what you trying to achieve.
TElXMLSigner component signs an xml document according to XML-DSig standard. This means that it will create a Signature element and all required child elements (like SignedInfo, SignatureValue and etc.). So, you don't need to create them by your self. You need to specify what data to sign, how to transform it, where to place a signature, what signing key to use and etc.
#26121
Posted: 08/14/2013 03:09:36
by Jacob jvandiermen (Standard support level)
Joined: 08/09/2013
Posts: 55

Hello Eugene,

I tried your instructions for signing the xml. I got a error saying that the signed data saved to fail. Furthermore I ignored the exceptions for Invalid secret key , Invalid certificate data, Invalid file format. When I save the xml file I see that for the KeyInfo tag the data for RSAKeyValue and X509Certificate
is filled in. For the Reference tag a DigestValue is calculated and filled in. But the SignatureValue tag is empty with no RSA SHA1 value

Regards,

Jacob
#26125
Posted: 08/14/2013 08:04:51
by Dmytro Bogatskyy (EldoS Corp.)

Quote
I got a error saying that the signed data saved to fail.

What exactly an error message says?
Did you try a test certificate or your own?
What Delphi version and SecureBlackbox version are you using?
#26132
Posted: 08/15/2013 02:38:50
by Jacob jvandiermen (Standard support level)
Joined: 08/09/2013
Posts: 55

Hello Dmytro,

Here are the details:
SecureBlackbox - version 7.2.169 - Released February 1, 2010
Delphi 2010

I used your certificate in SecureBlackbox\Extra\Certificates\
Both cert_no_pwd.pfx & cert.pfx.

Error message that I get : Signed data saving failed. (Access violation at adress 005E623B in module SimpleSigner.exe Read of adress 6769533C)
#26134
Posted: 08/15/2013 06:24:03
by Dmytro Bogatskyy (EldoS Corp.)

Hello Jacob,

Quote
SecureBlackbox - version 7.2.169 - Released February 1, 2010
Delphi 2010

This version is quite old. And I'm not sure if Delphi 2010 was fully supported at this time.
Could you please try with the latest version ( https://www.eldos.com/sbb/download-prerelease.php ).
#26135
Posted: 08/15/2013 08:16:37
by Jacob jvandiermen (Standard support level)
Joined: 08/09/2013
Posts: 55

Hello Dmytro,

I already tried the Delphi 2010 prerelease.
I have trouble installing de packages!
When I try to open project SecBBoxD14.groupproj to compile and install the components it gives me error that it can't find the .dpk files in the Packages directory!
Therefore I can't compile, build and install the components!

Regards,

Jacob
#26138
Posted: 08/15/2013 12:58:07
by Ken Ivanov (EldoS Corp.)

Hello Jacob,

Thank you for reporting the problem.

1) Could you please confirm that you chose to install Delphi 2010 set of files during the installation process?

2) Could you also confirm there's a SecBBoxD14.groupproj file in the \Packages directory, but no BaseBBoxD14.dpk and BaseBBoxD14.dproj files?
#26139
Posted: 08/15/2013 13:11:10
by Ken Ivanov (EldoS Corp.)

Jacob,

I seem to have misread your message, sorry. If you are installing an evaluation version of the product, only the packages in pre-compiled form (*.bpl) are installed. DPK files are installed with source code version only. So you should install the components from the BPL files provided.
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 4559 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!