EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Problem in element "SigningCertificate"

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.
#3973
Posted: 10/08/2007 12:22:25
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

Hi,

the xml created by my signing application is invalid for the verification process of SignerDemo.

The difference between the file created by both applications is only in the signingCertificate element, where the SignerDemo file have the presence of xmlns="http://www.w3.org/2000/09/xmldsig#" in the various subelements.

How can i add this propertie to the signingCertificate?

In attach there are the 2 files created and compared.

thanks in advance


[ Download ]
#3974
Posted: 10/08/2007 13:14:19
by Dmytro Bogatskyy (EldoS Corp.)

For DigestMethod and DigestValue elements under SigningCertificate the namespace URI in version 1.1.1 is "http://uri.etsi.org/01903/v1.1.1#" , and from version 1.2.2 it should be "http://www.w3.org/2000/09/xmldsig#". So teste.xmlSigndemo.xml is correct.
Do you want to add namespace URI for existing element? Use property ElXMLElement.NamespaceURI
#3975
Posted: 10/09/2007 09:16:00
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

Quote
Bogatskyy wrote:
For DigestMethod and DigestValue elements under SigningCertificate the namespace URI in version 1.1.1 is "http://uri.etsi.org/01903/v1.1.1#" , and from version 1.2.2 it should be "http://www.w3.org/2000/09/xmldsig#". So teste.xmlSigndemo.xml is correct.
Do you want to add namespace URI for existing element? Use property ElXMLElement.NamespaceURI


thanks for the reply.

I am using version 1.3.2. As i can see, my signing process its similar to signing demo. The result of both process it´s equal (using definied options), exception to SigningCertificate element. My XML file don´t have the required namespace URI. I use the same code to add the certificate and i can´t find where the namespace is added, it looks automatic on Signer Demo.

Code

//ADD CERTIFICATE TO SIGNEDPROPERTIES ON SIGNINGCERTIFICATE
XAdESSigner.SigningCertificates = new SBCustomCertStorage.TElMemoryCertStorage();
XAdESSigner.SigningCertificates.Add(Cert, false);
                        
// create XAdESSigner.QualifyingProperties
XAdESSigner.Generate();


thanks
#3977
Posted: 10/09/2007 11:25:51
by Dmytro Bogatskyy (EldoS Corp.)

Quote
I am using version 1.3.2. As i can see, my signing process its similar to signing demo. The result of both process it´s equal (using definied options), exception to SigningCertificate element. My XML file don´t have the required namespace URI. I use the same code to add the certificate and i can´t find where the namespace is added, it looks automatic on Signer Demo.

Yes, the namespace URI should be added automatically depending of XAdES version.
Your code seems to be ok.
Do you set XAdESSigner.XAdESVersion before calling XAdESSigner.Generate or after?
#3979
Posted: 10/09/2007 12:08:15
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

i set XAdESSigner.XAdESVersion before XAdESSigner.Generate
#3980
Posted: 10/09/2007 12:25:21
by Dmytro Bogatskyy (EldoS Corp.)

It's strange.
Could you provide a part of your code that generate a signature?
#3983
Posted: 10/10/2007 05:26:35
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

yes, it´s very strange.

i send in attachment the code that generate the signature.

thanks


[ Download ]
#3990
Posted: 10/10/2007 13:18:11
by Dmytro Bogatskyy (EldoS Corp.)

Quote
i send in attachment the code that generate the signature.

Your code is working ok for me.
What version of SecureBlackbox are you using?
The latest one? In that case, please, check that your application references correct assemblies.
#3993
Posted: 10/11/2007 06:07:08
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

i use v122, the version 118 give me errors of the type:

Code
Error   1   'SBXMLSec.TElXMLReferenceList.this[int].get': cannot explicitly call operator or accessor   C:\Program Files\EldoS\SecureBlackbox.NET\Samples\C#\XMLBlackbox\Signer\MainForm.cs   1000   63   SimpleSigner_VS2005
#3995
Posted: 10/11/2007 06:30:43
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

i saw that was released 5.2.124, i will try that one
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

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