[xmlsec] namespace prefixes on Signature

John Crowley johncrowley at aol.com
Wed Feb 15 13:25:46 PST 2006

On Feb 2, 2006, at 10:32 AM, Aleksey Sanin wrote:

> > Would it be possible to change xmlSecTmplSignatureCreate() to
> > allow the caller to specify a namespace prefix?
> Sure, nothing is impossible, it is only software :) I don't like
> the idea of changing the signature for existing function. But one
> of the options would be to create a new function that would set
> xmldsig, xmlenc, etc. prefixes globally for the whole application.
> If you create a patch then I'll be happy to apply it :)
> Aleksey

I have a question (or two) before submitting a patch.

First, it seems to me that xmlSecAddChild() should call  
xmlSearchNsByHref() rather than xmlSearchNs() particularly for the  
case of Signature and its child elements.  The logic of xmlSearchNs()  
seems to dislike searching against a namespace with a prefix attached  
when a prefix is not provided on the call.  I'm reluctant to add that  
to a patch since it could have unknown impact.

Second, the *easiest* patch for a namespace prefix is to create an  
xmlSecTmplSignatureCreateNs() function that has a prefix parameter  
and then have xmlSecTmplSignatureCreate() call that function with a  
NULL prefix value.  Some don't like that style though.  The only  
other alternative is to create a writable global string but that's a  
bit invasive too.

Lastly, a recent post mentioned you prefer patches based upon cvs.  I  
can't find mention of cvs on your site.




More information about the xmlsec mailing list