EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Problem in element "SigningCertificate"

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#3996
Posted: 10/11/2007 06:59:17
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

ok, i discovered that "http://www.w3.org/2000/0­9/xmldsig#" is present when i simple sign a file.

but when i sign and add a timestamp the namespace dont appear.

Quote
Bogatskyy wrote:
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.


in the code that i attached before, u tried to add a timestamp?
#3997
Posted: 10/11/2007 08:11:00
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

overview:

i am using v124 now.

Im am testing SimpleSigner, only add some lines to add the certificate to SignedProperties.

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


If i sign without TimeStamp the xml output is correct.
If i sign with TimeStamp the xml output is incorrect: the SigningCertificate elements dont have the namespace ande the SignaturePolicyIdentifier element disappear (if set as implied).

Am i doing anything wrong?

thanks
#3998
Posted: 10/11/2007 15:38:25
by Dmytro Bogatskyy (EldoS Corp.)

I think, I reproduced this.
Please, try with attached assembly (it is for .Net 2.0 version 5.2.124), you will need to replace existing one in the GAC.

Quote
the SignaturePolicyIdentifierelement disappear (if set as implied)

SignaturePolicyIdentifier element is not required from version 1.2.2, if XAdES form is not XAdES-EPES.
So, in your case, when you added TimeStamp (XAdES-T) element SignaturePolicyIdentifier become optional.
If you want to include this element, add following line:
XAdESSigner.QualifyingProperties.SignedProperties.SignedSignatureProperties.SignaturePolicyIdentifier.SignaturePolicyImplied = true;

Thank you.


[ Download ]
#4027
Posted: 10/16/2007 05:10:58
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

Quote
Bogatskyy wrote:
Quote
the SignaturePolicyIdentifierelement disappear (if set as implied)

SignaturePolicyIdentifier element is not required from version 1.2.2, if XAdES form is not XAdES-EPES.
So, in your case, when you added TimeStamp (XAdES-T) element SignaturePolicyIdentifier become optional.
If you want to include this element, add following line:
XAdESSigner.QualifyingProperties.SignedProperties.SignedSignatureProperties.SignaturePolicyIdentifier.SignaturePolicyImplied = true;


Yes, it works thanks.

Quote
Bogatskyy wrote:
I think, I reproduced this.
Please, try with attached assembly (it is for .Net 2.0 version 5.2.124), you will need to replace existing one in the GAC.


I replace the assembly in the references of SimpleSigner to the assembly that you attached, but it produce the same result.
#4030
Posted: 10/16/2007 05:35:50
by Dmytro Bogatskyy (EldoS Corp.)

Quote
I replace the assembly in the references of SimpleSigner to the assembly that you attached, but it produce the same result.

Please, check that this assembly loaded in output tab.
#4031
Posted: 10/16/2007 05:40:58
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

Quote
Bogatskyy wrote:
Quote
I replace the assembly in the references of SimpleSigner to the assembly that you attached, but it produce the same result.

Please, check that this assembly loaded in output tab.


'SimpleSigner.vshost.exe' (Managed): Loaded 'C:\Program Files\EldoS\SecureBlackbox.NET\Samples\C#\XMLBlackbox\Signer\bin\Debug\SecureBlackbox.XML.dll', No symbols loaded.

after i replaced the assembly in project references i rebuilded the project, in this way i imagine that the assembly referenced by output its the newer one, right?
#4032
Posted: 10/16/2007 06:55:24
by Dmytro Bogatskyy (EldoS Corp.)

Should be the right one. You can compare assemblies, for example by date.
So, in new saved file the prefix for DigestMethod element under CertDigest didn't changed to "ds"?
Could you post a code for your save method.
#4033
Posted: 10/16/2007 07:56:02
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

no changes. In attachment i send 2 printscrens with the differences between a signed document time stamped and the same document signed without signature.

I inclede the mainform code too, i only add proxy information and the lines 879 880 and 892.


[ Download ]
#4035
Posted: 10/16/2007 08:36:05
by Dmytro Bogatskyy (EldoS Corp.)

In the withTimestamp xml, the DigestMethod and etc. under xades:Cert has a default namespace uri equal to "http://www.w3.org/2000/09/xmldsig#", because it was set so in the Signature element and wasn't overridden later.
In the sample comment the line:
XAdESSigner.QualifyingProperties.XAdESPrefix = "xades";
And check the changes.

P.S. As for withoutTimestamp xml, in following example xmlns="..." not necessary, but it ok with it. I will check this.
#4036
Posted: 10/16/2007 08:36:20
by Nuno Guedes (Basic support level)
Joined: 08/13/2007
Posts: 87

i discovered that if i comment the line

Code
XAdESSigner.QualifyingProperties.XAdESPrefix = "xades";


the "ds" appear.
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

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