[xmlsec] selecting strart node from command line
Jan-Olof Andersson
jan-olof.andersson@blcc.biz
Wed, 24 Sep 2003 16:43:00 -0400
This is a multi-part message in MIME format.
------=_NextPart_000_0046_01C382BA.EAA1B520
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Aleksey,
I believe that it is defined... Please correct me if I am wrong. I send you
the document. It is the last part market with red that I want to sign...
>From what I have been reading the /EnvioDTE/Signature/ parth should reply
all content under that level in order to initiate the signature...
Best regards
Jan-Olof
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE test [
<!ATTLIST SetDTE
ID ID #IMPLIED
>
<!ATTLIST Documento
ID ID #IMPLIED
>
]>
<EnvioDTE xmlns="http://www.sii.cl/SiiDte"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sii.cl/SiiDte EnvioDTE_v03.xsd"
version="0.3">
<SetDTE ID="SetDoc">
<Caratula version="1.0">
<RutEmisor>77730090-3</RutEmisor>
<RutEnvia>7880442-4</RutEnvia>
<RutReceptor>96699670-6</RutReceptor>
<FchResol>2003-08-20</FchResol>
<NroResol>0</NroResol>
<TmstFirmaEnv>2003-07-23T20:52:43</TmstFirmaEnv>
<SubTotDTE>
<TpoDTE>33</TpoDTE>
<NroDTE>1</NroDTE>
</SubTotDTE>
</Caratula>
<DTE version="1.0">
<Documento ID="F15T33">
<Encabezado>
<IdDoc>
<TipoDTE>33</TipoDTE>
<Folio>15</Folio>
<FchEmis>2003-07-23</FchEmis>
<FmaPago>1</FmaPago>
</IdDoc>
<Emisor>
<RUTEmisor>77730090-3</RUTEmisor>
<RznSoc>MARKETPLACE Market
Place</RznSoc>
<GiroEmis>??? Giro
??????</GiroEmis>
<Acteco>111111</Acteco>
<CdgSIISucur>222222</CdgSIISucur>
<DirOrigen>??? DirOrig
???</DirOrigen>
<CmnaOrigen>?? CmnaOrig
???</CmnaOrigen>
</Emisor>
<Receptor>
<RUTRecep>96699670-6</RUTRecep>
<RznSocRecep>Inversiones
Calima S.A.</RznSocRecep>
<GiroRecep>Vicuna
Mackenna</GiroRecep>
<DirRecep>1949</DirRecep>
<CmnaRecep>LA
FLORIDA</CmnaRecep>
<CiudadRecep>SANTIAGO</CiudadRecep>
</Receptor>
<Totales>
<MntNeto>15857145000</MntNeto>
<IVA>2854286100</IVA>
<MntTotal>18711431100</MntTotal>
</Totales>
</Encabezado>
<Detalle>
<NroLinDet>1</NroLinDet>
<CdgItem>
<TpoCodigo>INT1</TpoCodigo>
<VlrCodigo>011</VlrCodigo>
</CdgItem>
<NmbItem>4060835</NmbItem>
<DscItem>MATERIAL 1 PARA PRUEBAS
CLIENTE MARKETPLACE</DscItem>
<QtyItem>3</QtyItem>
<PrcItem>1428571.000</PrcItem>
<MontoItem>4285713000</MontoItem>
<NroLinDet>2</NroLinDet>
<CdgItem>
<TpoCodigo>INT1</TpoCodigo>
<VlrCodigo>011</VlrCodigo>
</CdgItem>
<NmbItem>4060836</NmbItem>
<DscItem>MATERIAL 2 PARA PRUEBAS
CLIENTE MARKETPLACE</DscItem>
<QtyItem>3</QtyItem>
<PrcItem>964286.000</PrcItem>
<MontoItem>2892858.000</MontoItem>
<NroLinDet>3</NroLinDet>
<CdgItem>
<TpoCodigo>INT1</TpoCodigo>
<VlrCodigo>011</VlrCodigo>
</CdgItem>
<NmbItem>4060836</NmbItem>
<DscItem>MATERIAL 2 PARA PRUEBAS
CLIENTE MARKETPLACE</DscItem>
<QtyItem>9</QtyItem>
<PrcItem>964286.000</PrcItem>
<MontoItem>8678574.000</MontoItem>
</Detalle>
<TED version="1.0">
<DD>
<RE>77730090-3</RE>
<TD>33</TD>
<F>15</F>
<FE>2003-07-23</FE>
<RR>96699670-6</RR>
<RSR>Inversiones Calima
S.A.</RSR>
<MNT>18711431.100</MNT>
<IT1>MATERIAL 1 PARA PRUEBAS
CLIENTE MARKETPLACE</IT1>
<CAF version="1.0">
<DA>
<RE>77730090-3</RE>
<RS>PORTALES
PUNTO COM S A</RS>
<TD>33</TD>
<RNG>
<D>1</D>
<H>50</H>
</RNG>
<FA>2003-09-27</FA>
<RSAPK>
<M>2pcQKtkhi3vNKQb0HmjDCs3sW2ObM5PjTZ3atHcWZonDfvKZU4mUtMUFsIa4cNLB8ch18SMza
7+6fhPZwedimQ==</M>
<E>Aw==</E>
</RSAPK>
<IDK>100</IDK>
</DA>
<FRMA
algoritmo="SHA1withRSA">Zca82vAP5KcHTgyoHB9tAWUK+X1MlRz+6Hyt1k8xhMLzfKmfom7f
OxSrsoe2q/z+HFbBARNRohGL6vsKTsU5Vg==</FRMA>
</CAF>
<TSTED>2003-07-23T20:52:43</TSTED>
</DD>
<FRMT
algoritmo="SHA1withRSA">U5kyGQsHkLi3HlL6A4sG18MP8W3T7EN74euGmQb+8rQdzDZDS6L/
Dkamd//vnE+hduDBDxzMZP3cvV1TYk7oIQ==</FRMT>
</TED>
<TmstFirma>2003-09-01T10:05:42</TmstFirma>
</Documento>
<Signature
xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#F15T33">
<Transforms>
<Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue/>
</Reference>
</SignedInfo>
<SignatureValue/>
<KeyInfo>
<KeyValue/>
</KeyInfo>
</Signature>
</DTE>
</SetDTE>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#SetDoc">
<Transforms>
<Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue/>
</Reference>
</SignedInfo>
<SignatureValue/>
<KeyInfo>
<KeyValue/>
</KeyInfo>
</Signature>
</EnvioDTE>
-----Original Message-----
From: xmlsec-admin@aleksey.com [mailto:xmlsec-admin@aleksey.com]On
Behalf Of Aleksey Sanin
Sent: den 24 september 2003 15:01
To: jan-olof.andersson@blcc.biz; xmlsec@aleksey.com
Subject: [xmlsec] selecting strart node from command line
Your XPath expression have to select a single start node. The error
tells you that
the xpath expressiong you have used selected multiple or no nodes at
all. In your case
I would *guess* that you got no nodes because you did not specify namespaces
(and /dsig:Signature and /Signature xpath expression select different
nodes). Also
please note that for signatures, start node is expected to be
<dsig:Signature/> node.
BTW, there is a good XPath tutorial with a lot of examples:
http://www.zvon.org
You might want to look at it if you need to quickly find an Xpath expression
for your needs.
Aleksey
Jan-Olof Andersson wrote:
>Let me explain a little bit more...
>
>I want to make the signing to start later in the document with the signing.
>So I try to use xpath. But it always complains that I give the command in a
>wrong way...
>
>How should I write?
>
>Best regards
>
>
D:\Archivos de programa\GnuWin32\xmlsec\libxmlsec-1.1.1.win32\lib>xmlsec
sign
--pkcs12 certificado.pfx --output signed_xml.xml --pwd xxxxx --node-xpath
/EnvioDTE/Signature/SignedInfo resum_caf_invoice_10.xml
Error: xpath expression evaluation does not return a single node as expected
Error: failed to load template "resum_caf_invoice_10.xml"
Error: failed to sign file "resum_caf_invoice_10.xml"
_______________________________________________
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec
------=_NextPart_000_0046_01C382BA.EAA1B520
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR></HEAD>
<BODY>
<P><FONT size=3D2>Aleksey,<BR><BR>I believe that it is defined... Please =
correct=20
me if I am wrong. I send you the document. It is the last part market =
with red=20
that I want to sign...</FONT></P>
<DIV><FONT size=3D2>From what I have been reading the =
/EnvioDTE/Signature/ parth=20
should reply all content under that level in order to initiate the=20
signature...</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2><FONT face=3DArial color=3D#0000ff>Best=20
regards</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial =
color=3D#0000ff></FONT></FONT> </DIV>
<DIV><FONT size=3D2><FONT face=3DArial =
color=3D#0000ff>Jan-Olof</FONT></DIV>
<P><BR><BR><BR><BR><?xml version=3D"1.0"=20
encoding=3D"ISO-8859-1"?><BR><!DOCTYPE test=20
[<BR> <!ATTLIST=20
SetDTE<BR> ID ID=20
#IMPLIED<BR>><BR> =
<!ATTLIST=20
Documento<BR> ID ID=20
#IMPLIED<BR>><BR>]><BR><EnvioDTE xmlns=3D"<A=20
href=3D"http://www.sii.cl/SiiDte" =
target=3D_blank>http://www.sii.cl/SiiDte</A>"=20
xmlns:xsi=3D"<A href=3D"http://www.w3.org/2001/XMLSchema-instance"=20
target=3D_blank>http://www.w3.org/2001/XMLSchema-instance</A>"=20
xsi:schemaLocation=3D"<A href=3D"http://www.sii.cl/SiiDte"=20
target=3D_blank>http://www.sii.cl/SiiDte</A> EnvioDTE_v03.xsd"=20
version=3D"0.3"><BR> =
<SetDTE=20
ID=3D"SetDoc"><BR> &nbs=
p; =20
<Caratula=20
version=3D"1.0"><BR> &n=
bsp; &nb=
sp; =20
<RutEmisor>77730090-3</RutEmisor><BR> =
&=
nbsp; =20
<RutEnvia>7880442-4</RutEnvia><BR> &nb=
sp; &nbs=
p; =20
<RutReceptor>96699670-6</RutReceptor><BR> &n=
bsp; &nb=
sp; =20
<FchResol>2003-08-20</FchResol><BR> &n=
bsp; &nb=
sp; =20
<NroResol>0</NroResol><BR>  =
; =
=20
<TmstFirmaEnv>2003-07-23T20:52:43</TmstFirmaEnv><BR> &nb=
sp; &nbs=
p; =20
<SubTotDTE><BR> &nbs=
p;  =
; =20
<TpoDTE>33</TpoDTE><BR> &n=
bsp; &nb=
sp; &nbs=
p;=20
<NroDTE>1</NroDTE><BR> &nb=
sp; &nbs=
p; =20
</SubTotDTE><BR> &nb=
sp; =20
</Caratula><BR> &nbs=
p; =20
<DTE=20
version=3D"1.0"><BR> &n=
bsp; &nb=
sp; =20
<Documento=20
ID=3D"F15T33"><BR> &nbs=
p;  =
; =20
<Encabezado><BR> &nb=
sp; &nbs=
p;  =
; =20
<IdDoc><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<TipoDTE>33</TipoDTE><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<Folio>15</Folio><BR> &nbs=
p;  =
; =
&=
nbsp; =20
<FchEmis>2003-07-23</FchEmis><BR> &nbs=
p;  =
; =
&=
nbsp; =20
<FmaPago>1</FmaPago><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
</IdDoc><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
<Emisor><BR> &=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; =20
<RUTEmisor>77730090-3</RUTEmisor><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<RznSoc>MARKETPLACE Market=20
Place</RznSoc><BR> &=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; =20
<GiroEmis>??? Giro=20
??????</GiroEmis><BR> &nbs=
p;  =
; =
&=
nbsp; =20
<Acteco>111111</Acteco><BR> &nbs=
p;  =
; =
&=
nbsp; =20
<CdgSIISucur>222222</CdgSIISucur><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<DirOrigen>??? DirOrig=20
???</DirOrigen><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<CmnaOrigen>?? CmnaOrig=20
???</CmnaOrigen><BR>  =
; =
&=
nbsp; =20
</Emisor><BR> =
&=
nbsp; &n=
bsp; =20
<Receptor><BR>  =
; =
&=
nbsp; &n=
bsp; =20
<RUTRecep>96699670-6</RUTRecep><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<RznSocRecep>Inversiones Calima=20
S.A.</RznSocRecep><BR> &nb=
sp; &nbs=
p;  =
; =
=20
<GiroRecep>Vicuna=20
Mackenna</GiroRecep><BR> &=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; =20
<DirRecep>1949</DirRecep><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<CmnaRecep>LA=20
FLORIDA</CmnaRecep><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<CiudadRecep>SANTIAGO</CiudadRecep><BR> &nbs=
p;  =
; =
=20
</Receptor><BR> &nbs=
p;  =
; =
=20
<Totales><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<MntNeto>15857145000</MntNeto><BR> &nb=
sp; &nbs=
p;  =
; =
=20
<IVA>2854286100</IVA><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<MntTotal>18711431100</MntTotal><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
</Totales><BR>  =
; =
=20
</Encabezado><BR> &n=
bsp; &nb=
sp; =20
<Detalle><BR> =
&=
nbsp; &n=
bsp; =20
<NroLinDet>1</NroLinDet><BR> &nb=
sp; &nbs=
p;  =
; =20
<CdgItem><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<TpoCodigo>INT1</TpoCodigo><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<VlrCodigo>011</VlrCodigo><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
</CdgItem><BR>  =
; =
&=
nbsp; =20
<NmbItem>4060835</NmbItem><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
<DscItem>MATERIAL 1 PARA PRUEBAS CLIENTE=20
MARKETPLACE</DscItem><BR> =
&=
nbsp; &n=
bsp; =20
<QtyItem>3</QtyItem><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
<PrcItem>1428571.000</PrcItem><BR> &nb=
sp; &nbs=
p;  =
; =20
<MontoItem>4285713000</MontoItem><BR> =
&=
nbsp; &n=
bsp; =20
<NroLinDet>2</NroLinDet><BR> &nb=
sp; &nbs=
p;  =
; =20
<CdgItem><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<TpoCodigo>INT1</TpoCodigo><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<VlrCodigo>011</VlrCodigo><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
</CdgItem><BR>  =
; =
&=
nbsp; =20
<NmbItem>4060836</NmbItem><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
<DscItem>MATERIAL 2 PARA PRUEBAS CLIENTE=20
MARKETPLACE</DscItem><BR> =
&=
nbsp; &n=
bsp; =20
<QtyItem>3</QtyItem><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
<PrcItem>964286.000</PrcItem><BR> &nbs=
p;  =
; =
=20
<MontoItem>2892858.000</MontoItem><BR>  =
; =
&=
nbsp; =20
<NroLinDet>3</NroLinDet><BR> &nb=
sp; &nbs=
p;  =
; =20
<CdgItem><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<TpoCodigo>INT1</TpoCodigo><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<VlrCodigo>011</VlrCodigo><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
</CdgItem><BR>  =
; =
&=
nbsp; =20
<NmbItem>4060836</NmbItem><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
<DscItem>MATERIAL 2 PARA PRUEBAS CLIENTE=20
MARKETPLACE</DscItem><BR> =
&=
nbsp; &n=
bsp; =20
<QtyItem>9</QtyItem><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
<PrcItem>964286.000</PrcItem><BR> &nbs=
p;  =
; =
=20
<MontoItem>8678574.000</MontoItem><BR>  =
; =
&=
nbsp; =20
</Detalle><BR>  =
; =
=20
<TED=20
version=3D"1.0"><BR> &n=
bsp; &nb=
sp; &nbs=
p; =20
<DD><BR>  =
; =
&=
nbsp; &n=
bsp;=20
<RE>77730090-3</RE><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<TD>33</TD><BR> &nbs=
p;  =
; =
&=
nbsp; =20
<F>15</F><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<FE>2003-07-23</FE><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<RR>96699670-6</RR><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<RSR>Inversiones Calima=20
S.A.</RSR><BR>  =
; =
&=
nbsp; &n=
bsp; =20
<MNT>18711431.100</MNT><BR> &nbs=
p;  =
; =
&=
nbsp; =20
<IT1>MATERIAL 1 PARA PRUEBAS CLIENTE=20
MARKETPLACE</IT1><BR> &nbs=
p;  =
; =
&=
nbsp; =20
<CAF=20
version=3D"1.0"><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<DA><BR>  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; =20
<RE>77730090-3</RE><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
=20
<RS>PORTALES PUNTO COM S=20
A</RS><BR> &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; =20
<TD>33</TD><BR> &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; =20
<RNG><BR> &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp;=20
<D>1</D><BR> &=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
=20
<H>50</H><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; =20
</RNG><BR> &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; =20
<FA>2003-09-27</FA><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
=20
<RSAPK><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp;=20
<M>2pcQKtkhi3vNKQb0HmjDCs3sW2ObM5PjTZ3atHcWZonDfvKZU4mUtMUFsIa4cNLB=
8ch18SMza7+6fhPZwedimQ=3D=3D</M><BR> &=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
=20
<E>Aw=3D=3D</E><BR> =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; =20
</RSAPK><BR> &=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<IDK>100</IDK><BR> &=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; =20
</DA><BR> &nbs=
p;  =
; =
&=
nbsp; =20
<FRMA=20
algoritmo=3D"SHA1withRSA">Zca82vAP5KcHTgyoHB9tAWUK+X1MlRz+6Hyt1k8xhMLz=
fKmfom7fOxSrsoe2q/z+HFbBARNRohGL6vsKTsU5Vg=3D=3D</FRMA><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
</CAF><BR> &nb=
sp; &nbs=
p;  =
; =
=20
<TSTED>2003-07-23T20:52:43</TSTED><BR>  =
; =
&=
nbsp; =20
</DD><BR> &nbs=
p;  =
; =
=20
<FRMT=20
algoritmo=3D"SHA1withRSA">U5kyGQsHkLi3HlL6A4sG18MP8W3T7EN74euGmQb+8rQd=
zDZDS6L/Dkamd//vnE+hduDBDxzMZP3cvV1TYk7oIQ=3D=3D</FRMT><BR> &n=
bsp; &nb=
sp; &nbs=
p; =20
</TED><BR> &nb=
sp; &nbs=
p; =20
<TmstFirma>2003-09-01T10:05:42</TmstFirma><BR> &nb=
sp; &nbs=
p; =20
</Documento><BR> &nb=
sp; &nbs=
p; =20
<Signature xmlns=3D"<A href=3D"http://www.w3.org/2000/09/xmldsig"=20
target=3D_blank>http://www.w3.org/2000/09/xmldsig</A>#"><BR> &nbs=
p;  =
; =
=20
<SignedInfo><BR> &nb=
sp; &nbs=
p;  =
; =20
<CanonicalizationMethod Algorithm=3D"<A=20
href=3D"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"=20
target=3D_blank>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</A>"/>=
<BR> &nb=
sp; &nbs=
p;  =
; =20
<SignatureMethod Algorithm=3D"<A=20
href=3D"http://www.w3.org/2000/09/xmldsig#rsa-sha1"=20
target=3D_blank>http://www.w3.org/2000/09/xmldsig#rsa-sha1</A>"/><BR>&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; =20
<Reference=20
URI=3D"#F15T33"><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<Transforms><BR> &nb=
sp; &nbs=
p;  =
; =
=20
<Transform Algorithm=3D"<A=20
href=3D"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"=20
target=3D_blank>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</A>"/>=
<BR> &nb=
sp; &nbs=
p;  =
; =20
</Transforms><BR> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =20
<DigestMethod Algorithm=3D"<A =
href=3D"http://www.w3.org/2000/09/xmldsig#sha1"=20
target=3D_blank>http://www.w3.org/2000/09/xmldsig#sha1</A>"/><BR> =
; =
&=
nbsp; &n=
bsp; =20
<DigestValue/><BR> &=
nbsp; &n=
bsp; &nb=
sp; =20
</Reference><BR> &nb=
sp; &nbs=
p; =20
</SignedInfo><BR> &n=
bsp; &nb=
sp; =20
<SignatureValue/><BR> &nbs=
p;  =
; =20
<KeyInfo><BR> =
&=
nbsp; &n=
bsp; =20
<KeyValue/><BR> &nbs=
p;  =
; =20
</KeyInfo><BR>  =
; =
=20
</Signature><BR> &nb=
sp; =20
</DTE><BR> =20
</SetDTE><BR><FONT=20
color=3D#ff0000> <Signature =
xmlns=3D"</FONT><A href=3D"http://www.w3.org/2000/09/xmldsig" =
target=3D_blank><FONT=20
color=3D#ff0000>http://www.w3.org/2000/09/xmldsig</FONT></A><FONT=20
color=3D#ff0000>#"><BR>  =
; =20
<SignedInfo><BR> &nb=
sp; &nbs=
p; <BR> &=
nbsp; &n=
bsp;=20
<CanonicalizationMethod Algorithm=3D"</FONT><A=20
href=3D"http://www.w3.org/TR/2001/REC-xml-c14n-20010315" =
target=3D_blank><FONT=20
color=3D#ff0000>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</FONT></A=
><FONT=20
color=3D#ff0000>"/><BR>  =
; =
=20
<SignatureMethod Algorithm=3D"</FONT><A=20
href=3D"http://www.w3.org/2000/09/xmldsig#rsa-sha1" =
target=3D_blank><FONT=20
color=3D#ff0000>http://www.w3.org/2000/09/xmldsig#rsa-sha1</FONT></A><FON=
T=20
color=3D#ff0000>"/> &nb=
sp; &nbs=
p; <BR><BR> &nb=
sp; &nbs=
p; =20
<Reference=20
URI=3D"#SetDoc"><BR> &n=
bsp; &nb=
sp; =20
<Transforms><BR> &nb=
sp; &nbs=
p;  =
; =20
<Transform Algorithm=3D"</FONT><A=20
href=3D"http://www.w3.org/TR/2001/REC-xml-c14n-20010315" =
target=3D_blank><FONT=20
color=3D#ff0000>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</FONT></A=
><FONT=20
color=3D#ff0000>"/><BR>  =
; =
=20
</Transforms><BR> &n=
bsp; &nb=
sp; =20
<DigestMethod Algorithm=3D"</FONT><A=20
href=3D"http://www.w3.org/2000/09/xmldsig#sha1" target=3D_blank><FONT=20
color=3D#ff0000>http://www.w3.org/2000/09/xmldsig#sha1</FONT></A><FONT=20
color=3D#ff0000>"/><BR>  =
; =
=20
<DigestValue/><BR> &=
nbsp; &n=
bsp; =20
</Reference><BR> &nb=
sp; =20
</SignedInfo><BR> &n=
bsp; =20
<SignatureValue/><BR> &nbs=
p; =20
<KeyInfo><BR> =
&=
nbsp; =20
<KeyValue/><BR> &nbs=
p; =20
</KeyInfo><BR> =20
</Signature></FONT><BR></EnvioDTE><BR><BR>-----Original=20
Message-----<BR>From: xmlsec-admin@aleksey.com [<A=20
href=3D"mailto:xmlsec-admin@aleksey.com">mailto:xmlsec-admin@aleksey.com<=
/A>]On<BR>Behalf=20
Of Aleksey Sanin<BR>Sent: den 24 september 2003 15:01<BR>To:=20
jan-olof.andersson@blcc.biz; xmlsec@aleksey.com<BR>Subject: [xmlsec] =
selecting=20
strart node from command line<BR><BR><BR>Your XPath expression have to =
select a=20
single start node. The error<BR>tells you that<BR>the xpath expressiong =
you have=20
used selected multiple or no nodes at<BR>all. In your case<BR>I would =
*guess*=20
that you got no nodes because you did not specify namespaces<BR>(and=20
/dsig:Signature and /Signature xpath expression select =
different<BR>nodes).=20
Also<BR>please note that for signatures, start node is expected to=20
be<BR><dsig:Signature/> node.<BR><BR>BTW, there is a good XPath =
tutorial=20
with a lot of examples:<BR> <A =
href=3D"http://www.zvon.org" =
target=3D_blank>http://www.zvon.org</A><BR>You might=20
want to look at it if you need to quickly find an Xpath =
expression<BR>for your=20
needs.<BR><BR>Aleksey<BR><BR><BR>Jan-Olof Andersson =
wrote:<BR><BR>>Let me=20
explain a little bit more...<BR>><BR>>I want to make the signing =
to start=20
later in the document with the signing.<BR>>So I try to use xpath. =
But it=20
always complains that I give the command in a<BR>>wrong=20
way...<BR>><BR>>How should I write?<BR>><BR>>Best=20
regards<BR>> <BR>><BR><BR>D:\Archivos de=20
programa\GnuWin32\xmlsec\libxmlsec-1.1.1.win32\lib>xmlsec<BR>sign<BR>-=
-pkcs12=20
certificado.pfx --output signed_xml.xml --pwd xxxxx=20
--node-xpath<BR>/EnvioDTE/Signature/SignedInfo=20
resum_caf_invoice_10.xml<BR>Error: xpath expression evaluation does not =
return a=20
single node as expected<BR>Error: failed to load template=20
"resum_caf_invoice_10.xml"<BR>Error: failed to sign file=20
"resum_caf_invoice_10.xml"<BR><BR><BR>___________________________________=
____________<BR>xmlsec=20
mailing list<BR>xmlsec@aleksey.com<BR><A=20
href=3D"http://www.aleksey.com/mailman/listinfo/xmlsec"=20
target=3D_blank>http://www.aleksey.com/mailman/listinfo/xmlsec</A><BR></P=
></FONT></BODY></HTML>
------=_NextPart_000_0046_01C382BA.EAA1B520--