<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff size=2>Yes,
you are right. The PI node is included in the output.</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff
size=2>However, I was trying to understand exactly and "See" on what the digest
value is calculated.</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff size=2>I used
the Sign3 example included with XmlSec and some example code from the MSDN
library.</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff size=2>The
MSDN library is not using a certificate, just an RSA key, but that should not
matter for the digest value, just the signature value.</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff size=2>After
both the examples run, the canonicalized version of the source xml document is
the same in both cases. See below.</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff
size=2>However the digest value is different. Just so I could prove to myself
that I understand on what the digest is being calculated on,
</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff size=2>I took
the canonicalized form of the source document and used openssl on the command
line to calculate the digest. The result I got was the same</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff size=2>as the
one that I got from the .NET example. I then removed the PI from the
canonicalized document and used openssl on the command line to calculate the
digest again. This time it matched the value calculated from
XmlSec.</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff size=2>I hope
I have explained things more clearly.</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff size=2>Off
course maybe I am doing something wrong or am not understanding
something.</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff size=2>Here
is the canonicalized form of the source document (it is the same as generated
from .NET and from XmlSec):</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff
size=2><?xml-stylesheet type="text/xsl" href="myfile.xsl" ?><BR><sales
quarter="2001-01"><BR> <region
name="Northeast"><BR>
<units>374</units><BR>
<amount>12500.26</amount><BR>
</region><BR> <region
name="Southeast"><BR>
<units>512</units><BR>
<amount>17692</amount><BR>
</region><BR> <region
name="Southwest"><BR>
<units>161</units><BR>
<amount>8349.72</amount><BR>
</region><BR> <region
name="Northwest"><BR>
<units>465</units><BR>
<amount>15239.6</amount><BR>
</region><BR></sales><BR></FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=032281120-09102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=032281120-09102003>--
Sanjay</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=032281120-09102003></SPAN></FONT><FONT face=Arial color=#0000ff
size=2><SPAN class=032281120-09102003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=032281120-09102003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=032281120-09102003> </SPAN></FONT><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Aleksey Sanin
[mailto:aleksey@aleksey.com] <BR><B>Sent:</B> October 9, 2003 2:08
PM<BR><B>To:</B> Chugh, Sanjay<BR><B>Cc:</B>
xmlsec@aleksey.com<BR><B>Subject:</B> Re: [xmlsec] Different digest value
between .NET implementation and XmlSec?<BR><BR></DIV></FONT>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">xmlsec uses c14n code from LibXML2. If I
just do a c14n for your file then the processing <BR>instruction node "<SPAN
class=937574019-09102003><FONT face=Arial size=2><?xml-stylesheet
type="text/xsl" href="myfile.xsl" ?>" </FONT></SPAN>is included in
the <BR>output:<BR><BR> [aleksey@lsh
dev]$./libxml2/testC14N --with-comments a.xml<BR>
<?xml-stylesheet type="text/xsl" href="myfile.xsl"
?><BR> <sales
quarter="2001-01"><BR> ...<BR>
</sales><BR><BR>It would be helpfull if you can give a more detailed
example with explanations how are you<BR>doing signatures in both xmlsec and
.net cases.<BR><BR><SPAN class=937574019-09102003><FONT face=Arial size=2>With
best regards,<BR>Aleksey<BR><BR></BLOCKQUOTE></FONT></SPAN></BODY></HTML>