xml-security-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matej Kafadar" <ma...@setcce.org>
Subject XPath Filter
Date Mon, 29 Mar 2004 12:02:11 GMT
Hi,

How to set XPath string to sign only node(and sub nodes) of /a/b/c in
document

<a>
 <b>
  <c>123</c> <!-- this node i would like to sign -->
 </b>
 <c>caca</c>
 <d>qwer</d>
 <f>
  <a>
   <b>
    <c>fffff</c>
   </b>
  </a>
 </f>
 <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="issuer">
  <ds:SignedInfo>
   <ds:CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
   <ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
   <ds:Reference URI="">
    <ds:Transforms>
     <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
      <ds:XPath>????????</ds:XPath>
     </ds:Transform>
    </ds:Transforms>
    <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <ds:DigestValue>...</ds:DigestValue>
   </ds:Reference>
  </ds:SignedInfo>
  <ds:SignatureValue> ...</ds:SignatureValue>
 </ds:Signature>
</a>


If i use "<ds:XPath>/a/b/c</ds:XPath>", I sign whole document. How to sign
only /a/b/c node?

Thanks

    M.


Mime
View raw message