Hi,

I'm a newbie in xml signature. I have look at the example : templatesign in order to sign a xml file with a key in a PEM file but i have the error : could not find <signature> node I don't undestand why a <signature> node is requiered because my first file can't have this node.
In the future i would like to make multiple signature and sign pdf files.
Thanks


Anais wrote:
ok that's good for you but nobody can help me about my xml signature ?

Thanks




I'd be happy to help if I could, but I'm not really sure what you are doing or what asking. It would be more helpful if you could provide more details of what your code is trying to do, or distill it down to more specific questions. Also not clear on whether you are using the Java or C++ versions of the library - although I now see templatesign.cpp in the C++ tree, so I assume the latter?


But to try and answer what you did ask: in order to sign something with XML Signature, you have to one way or another create a ds:Signature node, either in your existing document for an enveloped or enveloping signature, or possibly in another document if you're doing a detached signature, than then populate it with the relevant information. I'm not familiar with templatesign tool, but looks like that tool works by you feeding it a file with an semi-empty ds:Signature element and it computes and adds the relevant digest values for the References and and then the actual SignatureValue for the Signature. Not sure exactly what you have to supply there, though, I don't see much in the way of docs, unless I'm overlooking.

In any event, you have to know some of the basics of XML Signature in order to supply the right bits for that tool. If you haven't done so, I'd suggest taking a look at the XML Signature spec to get a sense of what it does and how it works.

--Brent

Reply via email to