[xmlsec] sing an xml on an specific element

Aleksey Sanin aleksey at aleksey.com
Sun Jul 18 09:50:34 PDT 2010


I believe you need this

http://www.w3.org/TR/xmldsig-filter2/

For examples, look at this test:

tests/merlin-xpath-filter2-three/sign-spec.tmpl

Aleksey


On 7/18/2010 9:34 AM, Luiz Rafael Culik Guimaraes wrote:
> Hi
>
> im using xmlsec to sing successfully xml files,
> but now i need to sing an xml stating on an specific tag
>
> taking the xml bellow, i need only to sign infNFe tag
> <?xml version="1.0" encoding="UTF-8"?>
> <NFe xmlns="http://www.portalfiscal.inf.br/nfe"
> xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <infNFe Id="Nfe30080701077180000172010010987654314566976037" versao="1.10">
> ... // many other tags inside with info
> </infNFe>
> </NFe>
>
>
> and the resulting xml should be
>
> <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
> <infNFe Id="Nfe30080701077180000172010010987654314566976037""
> versao="1.01">
> ...// many other tags inside with info
> </infNFe>
> <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
> .
> </NFe>
>
> any suggestion, ive done my signature code based on sign3.c sample
>
> Regards and thanks in advance
> Luiz
>
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec


More information about the xmlsec mailing list