EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Set object id (XADES_BES )

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#23958
Posted: 03/06/2013 06:04:22
by Ernesto Alconada (Basic support level)
Joined: 11/01/2012
Posts: 25

Hello, we are trying to obtain a XADES-BES signature, and we are getting something like this:
Code
         <ds:Object>
                   <etsi:QualifyingProperties xmlns:etsi="http://uri.etsi.org/01903/v1.2.2#" Target="#SignatureUsuario">
                            ….
                   </etsi:QualifyingProperties>

         </ds:Object>


but we need something like this:
Code
         <ds:Object Id=”XADES”>
                   <etsi:QualifyingProperties xmlns:etsi="http://uri.etsi.org/01903/v1.2.2#" Target="#SignatureUsuario">
                            ….
                   </etsi:QualifyingProperties>
         </ds:Object>

Could anybody help us?
#23959
Posted: 03/06/2013 06:15:57
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

You should use TElXMLDOMElement.SetAttribute to do this.

Please refer to our sample project and find

Code
...
El.SetAttribute(...);
...


line of code is <Sign> button handler.

Could you clarify what SBB edition do you use (VCL, .NET, Java). Then I'll be able to give your more detailed answer.
#23960
Posted: 03/06/2013 06:23:31
by Ernesto Alconada (Basic support level)
Joined: 11/01/2012
Posts: 25

We have VCL Edition. Thanks
#23961
Posted: 03/06/2013 06:33:33
by Vsevolod Ievgiienko (EldoS Corp.)

Then you should look at the sample from \EldoS\SecureBlackbox.VCL\Samples\Delphi\XMLBlackbox\Signer folder.

Please find MainForm.pas:btnSignClick method. This part of code is responsible for IDs:

Code
...
        Ref.URINode := TElXMLDOMNode(tvXML.Selected.Data);
        El := TElXMLDOMElement(tvXML.Selected.Data);
        if El.AttribStrings['Id'] <> '' then
          Ref.URI := '#' + El.AttribStrings['Id']
        else
        if El.ParentNode is TElXMLDOMDocument then
          Ref.URI := ''
        else
        begin
          El.AttribStrings['Id'] := 'id-' + IntToStr(SBRndGenerate(MaxInt));
          Ref.URI := '#' + El.AttribStrings['Id'];
        end;
      end
...
#23962
Posted: 03/06/2013 06:38:07
by Dmytro Bogatskyy (EldoS Corp.)

Quote
Hello, we are trying to obtain a XADES-BES signature, and we are getting something like this:

This object created on the fly. And there is no property to change an Id at the moment.
The only solution, is to use OnFormatElement event. Or, you can modify Object element after signing, as it is not signed.
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

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