[xmlsec] XMLSEC Reference URI question

Moultrie, Ferrell (ISSAtlanta) FMoultrie@iss.net
Thu, 25 Jul 2002 09:59:24 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C233E3.7B697A4E
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C233E3.7B697A4E"


------_=_NextPart_001_01C233E3.7B697A4E
Content-Type: text/plain

Aleksey:
  Ok .. we've reworked the XPath and xmlsec's buffer start/end now shows the
correct data (only the selected Contact key and the <Signature> block is
omittied). Still, it won't verify. I'd greatly appreciate it if you could
take one more look and see if you see any other reasons why things might not
be working as expected. The command used was:
xmlsec verify --print-all --trusted new_export.pem test_allkey_06.xml
I've attached the XML file, the PubKey cert and the program output. I'm also
trying to find out if the signing stuff on the web server can provide any
more details on what/how it did when building the signature -- but I've
never touched any of that stuff so I'm having to work through our web folks
for that information.
Thanks!
  Ferrell

-----Original Message-----
From: Aleksey Sanin [mailto:aleksey@aleksey.com] 
Sent: Wednesday, July 24, 2002 10:23 PM
To: Moultrie, Ferrell (ISSAtlanta)
Cc: 'xmlsec@aleksey.com'; Dodd, Tim (ISS Atlanta)
Subject: Re: [xmlsec] XMLSEC Reference URI question


Well, "failing to validate reference" simply means that the digests values
do not 
match. In this particular case, when Apache calculated digested the c14n
output
both digest and signature values (content of <dsig:DigestValue> and
<dsig:SignatureValue>
elements)  were *not known* yet. Since as we found this XPath transform
includes 
*all* nodes from the input document when you are veryfing the document, 
both <dsig:DigestValue> and <dsig:SignatureValue> elements (and the content
of these
elements:  the actual base64 encoded digest and signature values!) are
*included* 
in the digested data. 
And of course, the "sign" and "verify" digests are different because the
digested 
data are different :)

This explains why XMLSec fails to validate this document and also shows that

any *correct* implementation of XPath transform MUST fail to validate it.
Since you wrote that Apache has no problems with validating this document I
suspect 
that Apache does not implement the XPath transform correctly :)

Probably you can find our more if you can get the c14n output (just before
digesting)
from Apache (something similar to --print-all option in xmlsec). I am sorry
but
I could not help you with it since I gave up on installing Apache toolkit
long time ago (this 
was the main reason why I wrote XMLSec library :) ).

Aleksey




Moultrie, Ferrell (ISSAtlanta) wrote:


Aleksey:
  Yes -- you're right. I even recall reading a discussion about this in the
discussion of enveloped signatures in the specification. I wondered at the
time why they used the convoluted XPath count function rather than a more
direct approach -- now I get it. 
  In any event - I suspect that Apache is actually still signing/verifying
the entire document just like XMLSEC is *trying* to do. So .. I should be
able to verify this document also using XMLSEC. Do you have any idea from
the sample our it's output as to why it fails to validate the Reference?
This is *always* the hard part of digital signature work -- when it doesn't
work -- figuring out *why* it failed. What bit is wrong where ...
Thanks!
  Ferrell

-----Original Message-----
From: Aleksey Sanin [mailto:aleksey@aleksey.com <mailto:aleksey@aleksey.com>
] 
Sent: Wednesday, July 24, 2002 9:22 PM
To: Moultrie, Ferrell (ISSAtlanta)
Cc: 'xmlsec@aleksey.com <mailto:xmlsec@aleksey.com> '; Dodd, Tim (ISS
Atlanta)
Subject: Re: [xmlsec] XMLSEC Reference URI question


Hi, Moultrie!

I think that there is a "bug" in the document you provided and Apache
toolkit incorrectly implemented XPath transform. According to the XMLDSig 
spec (http://www.w3.org/TR/xmldsig-core/#sec-XPath
<http://www.w3.org/TR/xmldsig-core/#sec-XPath> ) the XPath transform
is evaluated as follows:

    > In other words, the input node-set should be equivalent to the one
that would be created by 
    > the following process:
    >   1. Initialize an XPath evaluation context by setting the initial
node equal to the input XML 
    >   document's root node, and set the context position and size to 1.
    >   2. Evaluate the XPath expression (//. | //@* | //namespace::*)
    > The evaluation of this expression includes all of the document's nodes
(including comments) in the 
    > node-set representing the octet stream.
    > The transform output is also an XPath node-set. The XPath expression
appearing in the XPath 
    > parameter is evaluated once for each node in the input node-set. The
result is converted to a 
    > boolean. If the boolean is true, then the node is included in the
output node-set. If the boolean is 
    > false, then the node is omitted from the output node-set. 

In our case, the XPath expression in the XPath parameter is
"/ISSKeys/Contacts/Contact"
Evaluating this XPath expression returns a non-empty node set and according
to the 
XPath spec (http://www.w3.org/TR/1999/REC-xpath-19991116#booleans
<http://www.w3.org/TR/1999/REC-xpath-19991116#booleans> ) it is converted 
to boolean by a call to the boolean() function. From the same spec,
(http://www.w3.org/TR/1999/REC-xpath-19991116#function-boolean
<http://www.w3.org/TR/1999/REC-xpath-19991116#function-boolean> ) 
the boolean() function *always* returns true for non-empty node set:
     > a node-set is true if and only if it is non-empty 
For the document you sent me, this means that the XPath expression from the
XPath 
parameter will be "true"  for *all* nodes and *all* nodes should be included
in the output.
And this is exactly what XMLSec library returns!

I totally agree with you that such behavior is absolutely not intuitive and
can cause errors.
XMLDSig working group is now developing a new XPath transform spec (XPath
filter 2) and 
this particular issue is fixed there. However, this new spec is not stable
right now and changes
almost every day so I could not recommend to use it in production yet. 


Aleksey



Moultrie, Ferrell (ISSAtlanta) wrote:


xmlsec verify --print-all --trusted new_export.pem test_allkey_04.xml



I've included the PEM-formatted public key, the XML test document and the

output captured from running the 07/12/02 build of xmlsec plus the one fix

you sent me earlier. Let me know if you need anything else.

Thanks!

  Ferrell



-----Original Message-----

From: Aleksey Sanin [mailto:aleksey@aleksey.com <mailto:aleksey@aleksey.com>
] 

Sent: Wednesday, July 24, 2002 5:48 PM

To: Moultrie, Ferrell (ISSAtlanta)

Cc: 'xmlsec@aleksey.com <mailto:xmlsec@aleksey.com> '; Dodd, Tim (ISS
Atlanta)

Subject: Re: [xmlsec] XMLSEC Reference URI question





I am not sure I clear understand what kind of problem do you have. Will you

mind to send me the file you have problems with?



Thanks,



Aleksey



Moultrie, Ferrell (ISSAtlanta) wrote:



  

Aleksey:

 Ok, I've tried to use an XPath Transform to limit the data being 

verified. Unfortunately, it doesn't appear to work. Here's what I see 

happening in the

code:



xmlSecTransformXPathReadNode( ) [xpath.c:203] takes the input 

xmlSecTransformPtr and upcasts it to a xmlSecXmlTransformPtr. It then 

stores the parsed XPath string and the "here" node reference in the 

xmlSecXmlTransform object it points to (at least there's checking of 

the pointer assignment sanity here).



The caller, xmlSecTransformRead, returns to its caller 

xmlSecTransformNodeRead with the pointer to the object containing the 

XPath transform information. The transform is further passed back to 

xmlSecTransformsNodeRead which calls xmlSecTransformStateUpdate which 

discovers that the transform type is xmlSecTransformTypeXml and call 

xmlSecTransformCreateXml. This routine, because the file is already 

parsed and both curFirstBinTransform and curC14NTransform in the state 

object are NULL, does nothing and returns!



This results in the XPath Transform information being parsed and saved 

but otherwise ignored. The <Signature> block contains the following 

transform which is parsed and ignored in the above case:



 <sig:Transform 

Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"
<http://www.w3.org/TR/1999/REC-xpath-19991116> >

 <sig:XPath>/ISSKeys/Contacts/Contact</sig:XPath> 

 </sig:Transform>



The result is that adding an XPath transform like above, is ignored. 

This works properly with the Apache Java tools so I believe that it's a 

legal way to construct a reference. Eventually, I'd intended to change 

the XPath reference to a here()-relative reference to solve my compound 

document problem but this seemed like a quick/easy test -- 

unfortunately it's not working.



Is this a bug, or, have I missed something else? Since Apache properly 

verifies this signature and the code in xmlSecTransformCreateXml seems 

to be missing any knowledge of this transform, I'm guessing that it's a 

bug -- but I'll appreciate your advice on how to proceed!



Thanks!

 Ferrell



=====================================

Ferrell Moultrie (ferrell@iss.net <mailto:ferrell@iss.net> )

Software Engineer



Internet Security Systems, Inc.

6303 Barfield Road

Atlanta, Georgia 30328

Phone:  404-236-2600

Direct: 404-236-2849

Fax:    404-236-2632

http://www.iss.net <http://www.iss.net> 



Internet Security Systems -- The Power to Protect 

=====================================

_______________________________________________

xmlsec mailing list

xmlsec@aleksey.com <mailto:xmlsec@aleksey.com>
http://www.aleksey.com/mailman/listinfo/xmlsec
<http://www.aleksey.com/mailman/listinfo/xmlsec> 

 



    





  


  _____  


xmlSecSignedInfoRead: failed to validate "Reference"

= XMLDSig Result (validate)

== result: FAIL

== sign method: http://www.w3.org/2000/09/xmldsig#rsa-sha1
<http://www.w3.org/2000/09/xmldsig#rsa-sha1> 

== KEY

=== method: RSAKeyValue

=== key name: NULL

=== key type: Public

=== key origin: x509

=== X509 Certificate

==== Subject Name: /C=US/O=Web Developer/OU=IT/CN=ISS Keygen Test

==== Issuer Name: /C=US/O=Web Developer/OU=IT/CN=ISS Keygen Test

==== Issuer Serial: 3CEF18C2

== SIGNED INFO REFERENCES

=== REFERENCE 

==== ref type: SignedInfo Reference

==== result: FAIL

==== digest method: http://www.w3.org/2000/09/xmldsig#sha1
<http://www.w3.org/2000/09/xmldsig#sha1> 

==== uri: 

==== type: NULL

==== id: NULL

==== start buffer:

<ISSKeys Source="ISS Atlanta">

	

	<Contacts>

		<Contact>

			<Keys Address1="2626 Somewhere Lane" Address2="suite
200A" City="Atlanta" Country="US" Email="keys@iss.net" <mailto:keys@iss.net>
Fax="778-555-1212" Phone="777.555.1212" PostCode="30064"
Weburl="http://web.fubar.net" <http://web.fubar.net> ></Keys>

			<CustomerRelations Address1="1313 k nowwhere Lane"
Address2="suite 300A" City="Atlanta" Country="US"
Email="customer_relations@iss.net" <mailto:customer_relations@iss.net>
Fax="778-555-7799" Phone="77 7.555.7788" PostCode="30064"
Weburl="http://web.customer_relations_iss.net"
<http://web.customer_relations_iss.net> ></CustomerRelations>

			<Support Address1="1234 Anvil Rd." Address2="suite
440B" City="Atlanta" Country="US" Email="support@iss.net"
<mailto:support@iss.net>  Fax="778-555-7755" Phone="777.555.7744"
PostCode="3 0064" Weburl="http://web.suport_iss.net"
<http://web.suport_iss.net> ></Support>

			<Version>1.0</Version>

			<OCN>163444</OCN>

			<Source>ISS Atlanta</Source>

			<Serial>AC

C64BB4-A53D-AC83-3E6F-E0AB737DEC9D</Serial>

			<Timestamp>2000-06-14 10:34:09</Timestamp>

			<sig:Signature
xmlns:sig="http://www.w3.org/2000/09/xmldsig#"
<http://www.w3.org/2000/09/xmldsig#> >

				<sig:SignedInfo>

					<sig:CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
<http://www.w3.org/TR/2001/REC-xml-c14n-20010315>
></sig:CanonicalizationMethod>

					<sig:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
<http://www.w3.org/2000/09/xmldsig#rsa-sha1> ></sig:SignatureMethod>

					<sig:Reference URI="">

						<sig:Transforms>

							<sig:Transform
Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"
<http://www.w3.org/TR/1999/REC-xpath-19991116> >

	
<sig:XPath>/ISSKeys/Contacts/Contact</sig:XPath>

							</sig:Transform>

							<sig:Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
<http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments>
></sig:Transform>

						</sig:Transforms>

						<sig:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"
<http://www.w3.org/2000/09/xmldsig#sha1> ></sig:DigestMethod>

	
<sig:DigestValue>3tPX5xUmcKYHkG3Mv8TBAAYjBIU=</sig:DigestValue>

					</sig:Reference>

				</sig:SignedInfo>

	
<sig:SignatureValue>GpbCX9juwQ6k4Hs5j19MSXdtAdxeY9cK06Hb17ugq7f6sIy71gafWWNJ
1Na/TKGCrABlgrXWH2VR

asYcPMEmi1RZKDPUzmPAjznKRozjZTS3nn2BrAl1EKLugiqYmer+IG8SOXXTDSiwbmphtsXK+emU

FpUVVxfjLrmk8h6hd4k=</sig:SignatureValue>

				<sig:KeyInfo>

					<sig:X509Data>

						<sig:X509Certificate>

MIICCjCCAXMCBDzvGMIwDQYJKoZIhvcNAQEEBQAwTDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDVdl

YiBEZXZlbG9wZXIxCzAJBgNVBAsTAklUMRgwFgYDVQQDEw9JU1MgS2V5Z2VuIFRlc3QwHhcNMDIw

NTI1MDQ1MzIyWhcNMjcwMTE0MDQ1MzIyWjBMMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNV2ViIERl

dmVsb3BlcjELMAkGA1UECxMCSVQxGDAWBgNVBAMTD0lTUyBLZXlnZW4gVGVzdDCBnzANBgkqhkiG

9w0BAQEFAAOBjQAwgYkCgYEAy6ACsVtGJ69fkeKxJUlZqUP4FJFDIrkrUEi04c8UAAmC6jxu9+mM

uLD+766Ztrjp/2anYX0QS7ReD+Q78ky3a0nmPDIpAzv8P7tUCBc6Yq11w5c1yHSNDdLPxLlX6+JT

nUXnmXMsfAyC2cnoevc38gfEEkEJnS4iCzUC7WHsNgMCAwEAATANBgkqhkiG9w0BAQQFAAOBgQBy

08EvqGY4QL5GYhuT5Lx26t7V0Tk9bKxzh9YKxtyTLux0sqDFcAQWu1UpjPSOLwgNhE+uaS+CuyIK

wsSzMx84gOIk7/fOS5F7oRk2ouC0QPPhY0iT2wXi9Zhvd6CifjNwvCdDe0tinSeQNfvpo0FSlg8c

GL2eqXYylPEeMvZ5aw==

</sig:X509Certificate>

					</sig:X509Data>

					<sig:KeyValue>

						<sig:RSAKeyValue>

							<sig:Modulus>

y6ACsVtGJ69fkeKxJUlZqUP4FJFDIrkrUEi04c8UAAmC6jxu9+mMuLD+766Ztrjp/2anYX0QS7Re

D+Q78ky3a0nmPDIpAzv8P7tUCBc6Yq11w5c1yHSNDdLPxLlX6+JTnUXnmXMsfAyC2cnoevc38gfE

EkEJnS4iCzUC7WHsNgM=

</sig:Modulus>

	
<sig:Exponent>AQAB</sig:Exponent>

						</sig:RSAKeyValue>

					</sig:KeyValue>

				</sig:KeyInfo>

			</sig:Signature>

		</Contact>

	</Contacts>

	<EndUsers>

		<EndUser Address1="666 Rockets way" Address2="Apt. B"
City="Scienceville" CompanyName="Spacely Sprockets" Country="US"
Email="gjetson@sprokets.net" <mailto:gjetson@sprokets.net>  PostCode=""
State="Disturbed" SubjectName=FAIL

"George Jetson" Title="Whipping Boy">

			<Version>1.0</Version>

			<OCN>163444</OCN>

			<Source>ISS Atlanta</Source>

			<Serial>CE8135D7-8D27-4BC4-BCA6-2DBDE703B6A

E</Serial>

			<Timestamp>2000-06-14 10:34:09</Timestamp>

		</EndUser>

	</EndUsers>

	<LicensedModules>

		<LicensedModule ContactInfo="ACC64BB4-
A53D-AC83-3E6F-E0AB737DEC9D"
EndUserInfo="CE8135D7-8D27-4BC4-BCA6-2DBDE703B6AE" Identity="RO"
LicenseExpiration="2003-06-14" LicenseType="evaluation" Limit="2147483647"
LimitOutOfMaintenance="0" MaintenanceExpiration="2003-06-14">

			<Version>1.0</Version>

			<OCN>163444</OCN>

			<Source>ISS Atlanta</Source>

	
<Serial>F61BD0F3-D5D9-2F90-A24D-BF989200D712</Serial>

			<Timestamp>2000-06-14 10:34:09</Timestamp>

		</LicensedModule>

	</LicensedModules>

</ISSKeys>

==== end buffer:

= Status:

== Signatures ok: 0

== Signatures fail: 1

== SignedInfo Ref ok: 0

== SignedInfo Ref fail: 1

== Manifest Ref ok: 0

== Manifest Ref fail: 0

Error: operation failed






------_=_NextPart_001_01C233E3.7B697A4E
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1050" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=471475413-25072002><FONT face=Arial color=#0000ff 
size=2>Aleksey:</FONT></SPAN></DIV>
<DIV><SPAN class=471475413-25072002><FONT face=Arial color=#0000ff size=2>&nbsp; 
Ok .. we've reworked the XPath and xmlsec's buffer start/end now shows the 
correct data (only the selected Contact key and the &lt;Signature&gt; block is 
omittied). Still, it won't verify. I'd greatly appreciate it if you could take 
one more look and see if you see any other reasons why things might not be 
working as expected. The command used was:</FONT></SPAN></DIV>
<DIV><SPAN class=471475413-25072002><FONT face=Arial color=#0000ff size=2>xmlsec 
verify --print-all --trusted new_export.pem 
test_allkey_06.xml</FONT></SPAN></DIV>
<DIV><SPAN class=471475413-25072002><FONT face=Arial color=#0000ff size=2>I've 
attached the XML file, the PubKey cert and the program output. I'm also trying 
to find out if the signing stuff on the web server can provide any more details 
on what/how it did when building the signature -- but I've never touched any of 
that stuff so I'm having to work through our web folks for that 
information.</FONT></SPAN></DIV>
<DIV><SPAN class=471475413-25072002><FONT face=Arial color=#0000ff 
size=2>Thanks!</FONT></SPAN></DIV>
<DIV><SPAN class=471475413-25072002><FONT face=Arial color=#0000ff size=2>&nbsp; 
Ferrell</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Aleksey Sanin 
  [mailto:aleksey@aleksey.com] <BR><B>Sent:</B> Wednesday, July 24, 2002 10:23 
  PM<BR><B>To:</B> Moultrie, Ferrell (ISSAtlanta)<BR><B>Cc:</B> 
  'xmlsec@aleksey.com'; Dodd, Tim (ISS Atlanta)<BR><B>Subject:</B> Re: [xmlsec] 
  XMLSEC Reference URI question<BR><BR></FONT></DIV>Well, "failing to validate 
  reference" simply means that the digests values do not <BR>match. In this 
  particular case, when Apache calculated digested the c14n output<BR>both 
  digest and signature values (content of &lt;dsig:DigestValue&gt; and 
  &lt;dsig:SignatureValue&gt;<BR>elements)&nbsp; were *not known* yet. Since as 
  we found this XPath transform includes <BR>*all* nodes from the input document 
  when you are veryfing the document, <BR>both &lt;dsig:DigestValue&gt; and 
  &lt;dsig:SignatureValue&gt; elements (and the content of these<BR>elements: 
  &nbsp;the actual base64 encoded digest and signature values!) are *included* 
  <BR>in the digested data. <BR>And of course, the "sign" and "verify" digests 
  are different because the digested <BR>data are different :)<BR><BR>This 
  explains why XMLSec fails to validate this document and also shows that 
  <BR>any *correct* implementation of XPath transform MUST fail to validate 
  it.<BR>Since you wrote that Apache has no problems with validating this 
  document I suspect <BR>that Apache does not implement the XPath transform 
  correctly :)<BR><BR>Probably you can find our more if you can get the c14n 
  output (just before digesting)<BR>from Apache (something similar to 
  --print-all option in xmlsec). I am sorry but<BR>I could not help you with it 
  since I gave up on installing Apache toolkit long time ago (this <BR>was the 
  main reason why I wrote XMLSec library :) 
  ).<BR><BR>Aleksey<BR><BR><BR><BR><BR>Moultrie, Ferrell (ISSAtlanta) wrote:<BR>
  <BLOCKQUOTE 
  cite=mid121184A7DB1F9143BB5E3FACCB54875703FAC8@atlmaiexcp02.iss.local 
  type="cite">
    <META content="MSHTML 6.00.2800.1050" name=GENERATOR>
    <DIV><SPAN class=538434501-25072002><FONT face=Arial color=#0000ff 
    size=2>Aleksey:</FONT></SPAN></DIV>
    <DIV><SPAN class=538434501-25072002><FONT face=Arial color=#0000ff 
    size=2>&nbsp; Yes -- you're right. I even recall reading a discussion about 
    this in the discussion of enveloped signatures in the specification. I 
    wondered at the time why they used the convoluted XPath count function 
    rather than a more direct approach -- now I get it. </FONT></SPAN></DIV>
    <DIV><SPAN class=538434501-25072002><FONT face=Arial color=#0000ff 
    size=2>&nbsp; In any event - I suspect that Apache is actually still 
    signing/verifying the entire document just like XMLSEC is *trying* to do. So 
    .. I should be able to verify this document also using XMLSEC. Do you have 
    any idea from the sample our it's output as to why it fails to validate the 
    Reference? This is *always* the hard part of digital signature work -- when 
    it doesn't work -- figuring out *why* it failed. What bit is wrong where 
    ...</FONT></SPAN></DIV>
    <DIV><SPAN class=538434501-25072002><FONT face=Arial color=#0000ff 
    size=2>Thanks!</FONT></SPAN></DIV>
    <DIV><SPAN class=538434501-25072002><FONT face=Arial color=#0000ff 
    size=2>&nbsp; Ferrell</FONT></SPAN></DIV>
    <BLOCKQUOTE style="MARGIN-RIGHT: 0px">
      <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
      face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Aleksey 
      Sanin [<A class=moz-txt-link-freetext 
      href="mailto:aleksey@aleksey.com">mailto:aleksey@aleksey.com</A>] 
      <BR><B>Sent:</B> Wednesday, July 24, 2002 9:22 PM<BR><B>To:</B> Moultrie, 
      Ferrell (ISSAtlanta)<BR><B>Cc:</B> '<A class=moz-txt-link-abbreviated 
      href="mailto:xmlsec@aleksey.com">xmlsec@aleksey.com</A>'; Dodd, Tim (ISS 
      Atlanta)<BR><B>Subject:</B> Re: [xmlsec] XMLSEC Reference URI 
      question<BR><BR></FONT></DIV>Hi, Moultrie!<BR><BR>I think that there is a 
      "bug" in the document you provided and Apache<BR>toolkit incorrectly 
      implemented XPath transform. According to the XMLDSig <BR>spec (<A 
      class=moz-txt-link-freetext 
      href="http://www.w3.org/TR/xmldsig-core/#sec-XPath">http://www.w3.org/TR/xmldsig-core/#sec-XPath</A>) 
      the XPath transform<BR>is evaluated as follows:<BR><BR>&nbsp;&nbsp;&nbsp; 
      &gt; In other words, the input node-set should be equivalent to the one 
      that would be created by <BR>&nbsp;&nbsp;&nbsp; &gt; the following 
      process:<BR>&nbsp;&nbsp;&nbsp; &gt; &nbsp; 1. Initialize an XPath 
      evaluation context by setting the initial node equal to the input XML 
      <BR>&nbsp;&nbsp;&nbsp; &gt; &nbsp; document's root node, and set the 
      context position and size to 1.<BR>&nbsp;&nbsp;&nbsp; &gt; &nbsp; 2. 
      Evaluate the XPath expression <CODE>(//. | //@* | 
      //namespace::*)</CODE><BR>&nbsp;&nbsp;&nbsp; &gt; The evaluation of this 
      expression includes all of the document's nodes (including comments) in 
      the <BR>&nbsp;&nbsp;&nbsp; &gt; node-set representing the octet 
      stream.<BR>&nbsp;&nbsp;&nbsp; &gt; The transform output is also an XPath 
      node-set. The XPath expression appearing in the <CODE>XPath</CODE> 
      <BR>&nbsp;&nbsp;&nbsp; &gt; parameter is evaluated once for each node in 
      the input node-set. The result is converted to a <BR>&nbsp;&nbsp;&nbsp; 
      &gt; boolean. If the boolean is true, then the node is included in the 
      output node-set. If the boolean is <BR>&nbsp;&nbsp;&nbsp; &gt; false, then 
      the node is omitted from the output node-set. <BR><BR>In our case, the 
      XPath expression in the XPath parameter is 
      "/ISSKeys/Contacts/Contact"<BR>Evaluating this XPath expression returns a 
      non-empty node set and according to the <BR>XPath spec (<A 
      class=moz-txt-link-freetext 
      href="http://www.w3.org/TR/1999/REC-xpath-19991116#booleans">http://www.w3.org/TR/1999/REC-xpath-19991116#booleans</A>) 
      it is converted <BR>to boolean by a call to the boolean() function. From 
      the same spec, (<A class=moz-txt-link-freetext 
      href="http://www.w3.org/TR/1999/REC-xpath-19991116#function-boolean">http://www.w3.org/TR/1999/REC-xpath-19991116#function-boolean</A>) 
      <BR>the boolean() function *always* returns true for non-empty node 
      set:<BR>&nbsp;&nbsp;&nbsp; &nbsp;&gt; a node-set is true if and only if it 
      is non-empty <BR>For the document you sent me, this means that the XPath 
      expression from the XPath <BR>parameter will be "true" &nbsp;for *all* 
      nodes and *all* nodes should be included in the output.<BR>And this is 
      exactly what XMLSec library returns!<BR><BR>I totally agree with you that 
      such behavior is absolutely not intuitive and can cause errors.<BR>XMLDSig 
      working group is now developing a new XPath transform spec (XPath filter 
      2) and <BR>this particular issue is fixed there. However, this new spec is 
      not stable right now and changes<BR>almost every day so I could not 
      recommend to use it in production yet. 
      <BR><BR><BR>Aleksey<BR><BR><BR><BR>Moultrie, Ferrell (ISSAtlanta) 
      wrote:<BR>
      <BLOCKQUOTE 
      cite=mid121184A7DB1F9143BB5E3FACCB54875703FAC4@atlmaiexcp02.iss.local 
      type="cite"><PRE wrap="">xmlsec verify --print-all --trusted new_export.pem test_allkey_04.xml

I've included the PEM-formatted public key, the XML test document and the
output captured from running the 07/12/02 build of xmlsec plus the one fix
you sent me earlier. Let me know if you need anything else.
Thanks!
  Ferrell

-----Original Message-----
From: Aleksey Sanin [<A class=moz-txt-link-freetext href="mailto:aleksey@aleksey.com">mailto:aleksey@aleksey.com</A>] 
Sent: Wednesday, July 24, 2002 5:48 PM
To: Moultrie, Ferrell (ISSAtlanta)
Cc: '<A class=moz-txt-link-abbreviated href="mailto:xmlsec@aleksey.com">xmlsec@aleksey.com</A>'; Dodd, Tim (ISS Atlanta)
Subject: Re: [xmlsec] XMLSEC Reference URI question


I am not sure I clear understand what kind of problem do you have. Will you
mind to send me the file you have problems with?

Thanks,

Aleksey

Moultrie, Ferrell (ISSAtlanta) wrote:

  </PRE>
        <BLOCKQUOTE type="cite"><PRE wrap="">Aleksey:
 Ok, I've tried to use an XPath Transform to limit the data being 
verified. Unfortunately, it doesn't appear to work. Here's what I see 
happening in the
code:

xmlSecTransformXPathReadNode( ) [xpath.c:203] takes the input 
xmlSecTransformPtr and upcasts it to a xmlSecXmlTransformPtr. It then 
stores the parsed XPath string and the "here" node reference in the 
xmlSecXmlTransform object it points to (at least there's checking of 
the pointer assignment sanity here).

The caller, xmlSecTransformRead, returns to its caller 
xmlSecTransformNodeRead with the pointer to the object containing the 
XPath transform information. The transform is further passed back to 
xmlSecTransformsNodeRead which calls xmlSecTransformStateUpdate which 
discovers that the transform type is xmlSecTransformTypeXml and call 
xmlSecTransformCreateXml. This routine, because the file is already 
parsed and both curFirstBinTransform and curC14NTransform in the state 
object are NULL, does nothing and returns!

This results in the XPath Transform information being parsed and saved 
but otherwise ignored. The &lt;Signature&gt; block contains the following 
transform which is parsed and ignored in the above case:

 &lt;sig:Transform 
Algorithm=<A class=moz-txt-link-rfc2396E href="http://www.w3.org/TR/1999/REC-xpath-19991116">"http://www.w3.org/TR/1999/REC-xpath-19991116"</A>&gt;
 &lt;sig:XPath&gt;/ISSKeys/Contacts/Contact&lt;/sig:XPath&gt; 
 &lt;/sig:Transform&gt;

The result is that adding an XPath transform like above, is ignored. 
This works properly with the Apache Java tools so I believe that it's a 
legal way to construct a reference. Eventually, I'd intended to change 
the XPath reference to a here()-relative reference to solve my compound 
document problem but this seemed like a quick/easy test -- 
unfortunately it's not working.

Is this a bug, or, have I missed something else? Since Apache properly 
verifies this signature and the code in xmlSecTransformCreateXml seems 
to be missing any knowledge of this transform, I'm guessing that it's a 
bug -- but I'll appreciate your advice on how to proceed!

Thanks!
 Ferrell

=====================================
Ferrell Moultrie (<A class=moz-txt-link-abbreviated href="mailto:ferrell@iss.net">ferrell@iss.net</A>)
Software Engineer

Internet Security Systems, Inc.
6303 Barfield Road
Atlanta, Georgia 30328
Phone:  404-236-2600
Direct: 404-236-2849
Fax:    404-236-2632
<A class=moz-txt-link-freetext href="http://www.iss.net">http://www.iss.net</A>

Internet Security Systems -- The Power to Protect 
=====================================
_______________________________________________
xmlsec mailing list
<A class=moz-txt-link-abbreviated href="mailto:xmlsec@aleksey.com">xmlsec@aleksey.com</A> <A class=moz-txt-link-freetext href="http://www.aleksey.com/mailman/listinfo/xmlsec">http://www.aleksey.com/mailman/listinfo/xmlsec</A>
 

    </PRE></BLOCKQUOTE><PRE wrap=""><!---->

  </PRE><PRE wrap=""><HR width="90%" SIZE=4>
xmlSecSignedInfoRead: failed to validate "Reference"
= XMLDSig Result (validate)
== result: FAIL
== sign method: <A class=moz-txt-link-freetext href="http://www.w3.org/2000/09/xmldsig#rsa-sha1">http://www.w3.org/2000/09/xmldsig#rsa-sha1</A>
== KEY
=== method: RSAKeyValue
=== key name: NULL
=== key type: Public
=== key origin: x509
=== X509 Certificate
==== Subject Name: /C=US/O=Web Developer/OU=IT/CN=ISS Keygen Test
==== Issuer Name: /C=US/O=Web Developer/OU=IT/CN=ISS Keygen Test
==== Issuer Serial: 3CEF18C2
== SIGNED INFO REFERENCES
=== REFERENCE 
==== ref type: SignedInfo Reference
==== result: FAIL
==== digest method: <A class=moz-txt-link-freetext href="http://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</A>
==== uri: 
==== type: NULL
==== id: NULL
==== start buffer:
&lt;ISSKeys Source="ISS Atlanta"&gt;
	
	&lt;Contacts&gt;
		&lt;Contact&gt;
			&lt;Keys Address1="2626 Somewhere Lane" Address2="suite 200A" City="Atlanta" Country="US" Email=<A class=moz-txt-link-rfc2396E href="mailto:keys@iss.net">"keys@iss.net"</A> Fax="778-555-1212" Phone="777.555.1212" PostCode="30064" Weburl=<A class=moz-txt-link-rfc2396E href="http://web.fubar.net">"http://web.fubar.net"</A>&gt;&lt;/Keys&gt;
			&lt;CustomerRelations Address1="1313 k nowwhere Lane" Address2="suite 300A" City="Atlanta" Country="US" Email=<A class=moz-txt-link-rfc2396E href="mailto:customer_relations@iss.net">"customer_relations@iss.net"</A> Fax="778-555-7799" Phone="77 7.555.7788" PostCode="30064" Weburl=<A class=moz-txt-link-rfc2396E href="http://web.customer_relations_iss.net">"http://web.customer_relations_iss.net"</A>&gt;&lt;/CustomerRelations&gt;
			&lt;Support Address1="1234 Anvil Rd." Address2="suite 440B" City="Atlanta" Country="US" Email=<A class=moz-txt-link-rfc2396E href="mailto:support@iss.net">"support@iss.net"</A> Fax="778-555-7755" Phone="777.555.7744" PostCode="3 0064" Weburl=<A class=moz-txt-link-rfc2396E href="http://web.suport_iss.net">"http://web.suport_iss.net"</A>&gt;&lt;/Support&gt;
			&lt;Version&gt;1.0&lt;/Version&gt;
			&lt;OCN&gt;163444&lt;/OCN&gt;
			&lt;Source&gt;ISS Atlanta&lt;/Source&gt;
			&lt;Serial&gt;AC
C64BB4-A53D-AC83-3E6F-E0AB737DEC9D&lt;/Serial&gt;
			&lt;Timestamp&gt;2000-06-14 10:34:09&lt;/Timestamp&gt;
			&lt;sig:Signature xmlns:sig=<A class=moz-txt-link-rfc2396E href="http://www.w3.org/2000/09/xmldsig#">"http://www.w3.org/2000/09/xmldsig#"</A>&gt;
				&lt;sig:SignedInfo&gt;
					&lt;sig:CanonicalizationMethod Algorithm=<A class=moz-txt-link-rfc2396E href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315">"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"</A>&gt;&lt;/sig:CanonicalizationMethod&gt;
					&lt;sig:SignatureMethod Algorithm=<A class=moz-txt-link-rfc2396E href="http://www.w3.org/2000/09/xmldsig#rsa-sha1">"http://www.w3.org/2000/09/xmldsig#rsa-sha1"</A>&gt;&lt;/sig:SignatureMethod&gt;
					&lt;sig:Reference URI=""&gt;
						&lt;sig:Transforms&gt;
							&lt;sig:Transform Algorithm=<A class=moz-txt-link-rfc2396E href="http://www.w3.org/TR/1999/REC-xpath-19991116">"http://www.w3.org/TR/1999/REC-xpath-19991116"</A>&gt;
								&lt;sig:XPath&gt;/ISSKeys/Contacts/Contact&lt;/sig:XPath&gt;
							&lt;/sig:Transform&gt;
							&lt;sig:Transform Algorithm=<A class=moz-txt-link-rfc2396E href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"</A>&gt;&lt;/sig:Transform&gt;
						&lt;/sig:Transforms&gt;
						&lt;sig:DigestMethod Algorithm=<A class=moz-txt-link-rfc2396E href="http://www.w3.org/2000/09/xmldsig#sha1">"http://www.w3.org/2000/09/xmldsig#sha1"</A>&gt;&lt;/sig:DigestMethod&gt;
						&lt;sig:DigestValue&gt;3tPX5xUmcKYHkG3Mv8TBAAYjBIU=&lt;/sig:DigestValue&gt;
					&lt;/sig:Reference&gt;
				&lt;/sig:SignedInfo&gt;
				&lt;sig:SignatureValue&gt;GpbCX9juwQ6k4Hs5j19MSXdtAdxeY9cK06Hb17ugq7f6sIy71gafWWNJ1Na/TKGCrABlgrXWH2VR
asYcPMEmi1RZKDPUzmPAjznKRozjZTS3nn2BrAl1EKLugiqYmer+IG8SOXXTDSiwbmphtsXK+emU
FpUVVxfjLrmk8h6hd4k=&lt;/sig:SignatureValue&gt;
				&lt;sig:KeyInfo&gt;
					&lt;sig:X509Data&gt;
						&lt;sig:X509Certificate&gt;
MIICCjCCAXMCBDzvGMIwDQYJKoZIhvcNAQEEBQAwTDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDVdl
YiBEZXZlbG9wZXIxCzAJBgNVBAsTAklUMRgwFgYDVQQDEw9JU1MgS2V5Z2VuIFRlc3QwHhcNMDIw
NTI1MDQ1MzIyWhcNMjcwMTE0MDQ1MzIyWjBMMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNV2ViIERl
dmVsb3BlcjELMAkGA1UECxMCSVQxGDAWBgNVBAMTD0lTUyBLZXlnZW4gVGVzdDCBnzANBgkqhkiG
9w0BAQEFAAOBjQAwgYkCgYEAy6ACsVtGJ69fkeKxJUlZqUP4FJFDIrkrUEi04c8UAAmC6jxu9+mM
uLD+766Ztrjp/2anYX0QS7ReD+Q78ky3a0nmPDIpAzv8P7tUCBc6Yq11w5c1yHSNDdLPxLlX6+JT
nUXnmXMsfAyC2cnoevc38gfEEkEJnS4iCzUC7WHsNgMCAwEAATANBgkqhkiG9w0BAQQFAAOBgQBy
08EvqGY4QL5GYhuT5Lx26t7V0Tk9bKxzh9YKxtyTLux0sqDFcAQWu1UpjPSOLwgNhE+uaS+CuyIK
wsSzMx84gOIk7/fOS5F7oRk2ouC0QPPhY0iT2wXi9Zhvd6CifjNwvCdDe0tinSeQNfvpo0FSlg8c
GL2eqXYylPEeMvZ5aw==
&lt;/sig:X509Certificate&gt;
					&lt;/sig:X509Data&gt;
					&lt;sig:KeyValue&gt;
						&lt;sig:RSAKeyValue&gt;
							&lt;sig:Modulus&gt;
y6ACsVtGJ69fkeKxJUlZqUP4FJFDIrkrUEi04c8UAAmC6jxu9+mMuLD+766Ztrjp/2anYX0QS7Re
D+Q78ky3a0nmPDIpAzv8P7tUCBc6Yq11w5c1yHSNDdLPxLlX6+JTnUXnmXMsfAyC2cnoevc38gfE
EkEJnS4iCzUC7WHsNgM=
&lt;/sig:Modulus&gt;
							&lt;sig:Exponent&gt;AQAB&lt;/sig:Exponent&gt;
						&lt;/sig:RSAKeyValue&gt;
					&lt;/sig:KeyValue&gt;
				&lt;/sig:KeyInfo&gt;
			&lt;/sig:Signature&gt;
		&lt;/Contact&gt;
	&lt;/Contacts&gt;
	&lt;EndUsers&gt;
		&lt;EndUser Address1="666 Rockets way" Address2="Apt. B" City="Scienceville" CompanyName="Spacely Sprockets" Country="US" Email=<A class=moz-txt-link-rfc2396E href="mailto:gjetson@sprokets.net">"gjetson@sprokets.net"</A> PostCode="" State="Disturbed" SubjectName=FAIL
"George Jetson" Title="Whipping Boy"&gt;
			&lt;Version&gt;1.0&lt;/Version&gt;
			&lt;OCN&gt;163444&lt;/OCN&gt;
			&lt;Source&gt;ISS Atlanta&lt;/Source&gt;
			&lt;Serial&gt;CE8135D7-8D27-4BC4-BCA6-2DBDE703B6A
E&lt;/Serial&gt;
			&lt;Timestamp&gt;2000-06-14 10:34:09&lt;/Timestamp&gt;
		&lt;/EndUser&gt;
	&lt;/EndUsers&gt;
	&lt;LicensedModules&gt;
		&lt;LicensedModule ContactInfo="ACC64BB4- A53D-AC83-3E6F-E0AB737DEC9D" EndUserInfo="CE8135D7-8D27-4BC4-BCA6-2DBDE703B6AE" Identity="RO" LicenseExpiration="2003-06-14" LicenseType="evaluation" Limit="2147483647" LimitOutOfMaintenance="0" MaintenanceExpiration="2003-06-14"&gt;
			&lt;Version&gt;1.0&lt;/Version&gt;
			&lt;OCN&gt;163444&lt;/OCN&gt;
			&lt;Source&gt;ISS Atlanta&lt;/Source&gt;
			&lt;Serial&gt;F61BD0F3-D5D9-2F90-A24D-BF989200D712&lt;/Serial&gt;
			&lt;Timestamp&gt;2000-06-14 10:34:09&lt;/Timestamp&gt;
		&lt;/LicensedModule&gt;
	&lt;/LicensedModules&gt;
&lt;/ISSKeys&gt;
==== end buffer:
= Status:
== Signatures ok: 0
== Signatures fail: 1
== SignedInfo Ref ok: 0
== SignedInfo Ref fail: 1
== Manifest Ref ok: 0
== Manifest Ref fail: 0
Error: operation failed
</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C233E3.7B697A4E--

------_=_NextPart_000_01C233E3.7B697A4E
Content-Type: application/octet-stream;
	name="new_export.pem"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="new_export.pem"

Certificate:=0A=
    Data:=0A=
        Version: 1 (0x0)=0A=
        Serial Number: 1022302402 (0x3cef18c2)=0A=
        Signature Algorithm: md5WithRSAEncryption=0A=
        Issuer: C=3DUS, O=3DWeb Developer, OU=3DIT, CN=3DISS Keygen =
Test=0A=
        Validity=0A=
            Not Before: May 25 04:53:22 2002 GMT=0A=
            Not After : Jan 14 04:53:22 2027 GMT=0A=
        Subject: C=3DUS, O=3DWeb Developer, OU=3DIT, CN=3DISS Keygen =
Test=0A=
        Subject Public Key Info:=0A=
            Public Key Algorithm: rsaEncryption=0A=
            RSA Public Key: (1024 bit)=0A=
                Modulus (1024 bit):=0A=
                    00:cb:a0:02:b1:5b:46:27:af:5f:91:e2:b1:25:49:=0A=
                    59:a9:43:f8:14:91:43:22:b9:2b:50:48:b4:e1:cf:=0A=
                    14:00:09:82:ea:3c:6e:f7:e9:8c:b8:b0:fe:ef:ae:=0A=
                    99:b6:b8:e9:ff:66:a7:61:7d:10:4b:b4:5e:0f:e4:=0A=
                    3b:f2:4c:b7:6b:49:e6:3c:32:29:03:3b:fc:3f:bb:=0A=
                    54:08:17:3a:62:ad:75:c3:97:35:c8:74:8d:0d:d2:=0A=
                    cf:c4:b9:57:eb:e2:53:9d:45:e7:99:73:2c:7c:0c:=0A=
                    82:d9:c9:e8:7a:f7:37:f2:07:c4:12:41:09:9d:2e:=0A=
                    22:0b:35:02:ed:61:ec:36:03=0A=
                Exponent: 65537 (0x10001)=0A=
    Signature Algorithm: md5WithRSAEncryption=0A=
        72:d3:c1:2f:a8:66:38:40:be:46:62:1b:93:e4:bc:76:ea:de:=0A=
        d5:d1:39:3d:6c:ac:73:87:d6:0a:c6:dc:93:2e:ec:74:b2:a0:=0A=
        c5:70:04:16:bb:55:29:8c:f4:8e:2f:08:0d:84:4f:ae:69:2f:=0A=
        82:bb:22:0a:c2:c4:b3:33:1f:38:80:e2:24:ef:f7:ce:4b:91:=0A=
        7b:a1:19:36:a2:e0:b4:40:f3:e1:63:48:93:db:05:e2:f5:98:=0A=
        6f:77:a0:a2:7e:33:70:bc:27:43:7b:4b:62:9d:27:90:35:fb:=0A=
        e9:a3:41:52:96:0f:1c:18:bd:9e:a9:76:32:94:f1:1e:32:f6:=0A=
        79:6b=0A=
-----BEGIN CERTIFICATE-----=0A=
MIICCjCCAXMCBDzvGMIwDQYJKoZIhvcNAQEEBQAwTDELMAkGA1UEBhMCVVMxFjAU=0A=
BgNVBAoTDVdlYiBEZXZlbG9wZXIxCzAJBgNVBAsTAklUMRgwFgYDVQQDEw9JU1Mg=0A=
S2V5Z2VuIFRlc3QwHhcNMDIwNTI1MDQ1MzIyWhcNMjcwMTE0MDQ1MzIyWjBMMQsw=0A=
CQYDVQQGEwJVUzEWMBQGA1UEChMNV2ViIERldmVsb3BlcjELMAkGA1UECxMCSVQx=0A=
GDAWBgNVBAMTD0lTUyBLZXlnZW4gVGVzdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAw=0A=
gYkCgYEAy6ACsVtGJ69fkeKxJUlZqUP4FJFDIrkrUEi04c8UAAmC6jxu9+mMuLD+=0A=
766Ztrjp/2anYX0QS7ReD+Q78ky3a0nmPDIpAzv8P7tUCBc6Yq11w5c1yHSNDdLP=0A=
xLlX6+JTnUXnmXMsfAyC2cnoevc38gfEEkEJnS4iCzUC7WHsNgMCAwEAATANBgkq=0A=
hkiG9w0BAQQFAAOBgQBy08EvqGY4QL5GYhuT5Lx26t7V0Tk9bKxzh9YKxtyTLux0=0A=
sqDFcAQWu1UpjPSOLwgNhE+uaS+CuyIKwsSzMx84gOIk7/fOS5F7oRk2ouC0QPPh=0A=
Y0iT2wXi9Zhvd6CifjNwvCdDe0tinSeQNfvpo0FSlg8cGL2eqXYylPEeMvZ5aw=3D=3D=0A=
-----END CERTIFICATE-----=0A=

------_=_NextPart_000_01C233E3.7B697A4E
Content-Type: application/octet-stream;
	name="test_allkey_06.xml"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="test_allkey_06.xml"

<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Dana Godfrey =
(Internet Security Systems) -->=0A=
<ISSKeys Source=3D"ISS Atlanta">=0A=
	<!-- TestKey ISS keygen -->=0A=
	<Contacts>=0A=
		<Contact>=0A=
			<Keys Address1=3D"2626 Somewhere Lane" Address2=3D"suite 200A" =
City=3D"Atlanta" Country=3D"US" Email=3D"keys@iss.net" =
Fax=3D"778-555-1212" Phone=3D"777.555.1212" PostCode=3D"30064" =
Weburl=3D"http://web.fubar.net"/>=0A=
			<CustomerRelations Address1=3D"1313 knowwhere Lane" =
Address2=3D"suite 300A" City=3D"Atlanta" Country=3D"US" =
Email=3D"customer_relations@iss.net" Fax=3D"778-555-7799" =
Phone=3D"777.555.7788" PostCode=3D"30064" =
Weburl=3D"http://web.customer_relations_iss.net"/>=0A=
			<Support Address1=3D"1234 Anvil Rd." Address2=3D"suite 440B" =
City=3D"Atlanta" Country=3D"US" Email=3D"support@iss.net" =
Fax=3D"778-555-7755" Phone=3D"777.555.7744" PostCode=3D"30064" =
Weburl=3D"http://web.suport_iss.net"/>=0A=
			<Version>1.0</Version>=0A=
			<OCN>163444</OCN>=0A=
			<Source>ISS Atlanta</Source>=0A=
			<Serial>ACC64BB4-A53D-AC83-3E6F-E0AB737DEC9D</Serial>=0A=
			<Timestamp>2000-06-14 10:34:09</Timestamp>=0A=
			<sig:Signature xmlns:sig=3D"http://www.w3.org/2000/09/xmldsig#">=0A=
				<sig:SignedInfo>=0A=
					<sig:CanonicalizationMethod =
Algorithm=3D"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>=0A=
					<sig:SignatureMethod =
Algorithm=3D"http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>=0A=
					<sig:Reference URI=3D"">=0A=
						<sig:Transforms>=0A=
							<sig:Transform =
Algorithm=3D"http://www.w3.org/TR/1999/REC-xpath-19991116">=0A=
								<sig:XPath>=0A=
not(ancestor-or-self::sig:Signature)=0A=
 and (=0A=
    (ancestor-or-self::node() =3D /ISSKeys/Contacts/Contact) =0A=
)=0A=
</sig:XPath>=0A=
							</sig:Transform>=0A=
							<sig:Transform =
Algorithm=3D"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComment=
s"/>=0A=
						</sig:Transforms>=0A=
						<sig:DigestMethod =
Algorithm=3D"http://www.w3.org/2000/09/xmldsig#sha1"/>=0A=
						=
<sig:DigestValue>pj96s6n/wNTsaxKWMtqyTsWbTrU=3D</sig:DigestValue>=0A=
					</sig:Reference>=0A=
				</sig:SignedInfo>=0A=
				=
<sig:SignatureValue>jDZBVuX7vtG1MgIQyii5+10NcG8nrE8ak0Vds12Kmrq3s7hiqUk6=
yP6ntt7izos/uDkakrrW0qwA=0A=
WrfRa0MfqIUdojyM1nzbqTmGX23BhCeU1BKvjFf75CEMikEhC+ZgY4lKN9BiIE5SV2DbirL8=
7TsZ=0A=
Kjta6tlwYgEMxGlCs4I=3D</sig:SignatureValue>=0A=
				<sig:KeyInfo>=0A=
					<sig:X509Data>=0A=
						<sig:X509Certificate>=0A=
MIICCjCCAXMCBDzvGMIwDQYJKoZIhvcNAQEEBQAwTDELMAkGA1UEBhMCVVMxFjAUBgNVBAoT=
DVdl=0A=
YiBEZXZlbG9wZXIxCzAJBgNVBAsTAklUMRgwFgYDVQQDEw9JU1MgS2V5Z2VuIFRlc3QwHhcN=
MDIw=0A=
NTI1MDQ1MzIyWhcNMjcwMTE0MDQ1MzIyWjBMMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNV2Vi=
IERl=0A=
dmVsb3BlcjELMAkGA1UECxMCSVQxGDAWBgNVBAMTD0lTUyBLZXlnZW4gVGVzdDCBnzANBgkq=
hkiG=0A=
9w0BAQEFAAOBjQAwgYkCgYEAy6ACsVtGJ69fkeKxJUlZqUP4FJFDIrkrUEi04c8UAAmC6jxu=
9+mM=0A=
uLD+766Ztrjp/2anYX0QS7ReD+Q78ky3a0nmPDIpAzv8P7tUCBc6Yq11w5c1yHSNDdLPxLlX=
6+JT=0A=
nUXnmXMsfAyC2cnoevc38gfEEkEJnS4iCzUC7WHsNgMCAwEAATANBgkqhkiG9w0BAQQFAAOB=
gQBy=0A=
08EvqGY4QL5GYhuT5Lx26t7V0Tk9bKxzh9YKxtyTLux0sqDFcAQWu1UpjPSOLwgNhE+uaS+C=
uyIK=0A=
wsSzMx84gOIk7/fOS5F7oRk2ouC0QPPhY0iT2wXi9Zhvd6CifjNwvCdDe0tinSeQNfvpo0FS=
lg8c=0A=
GL2eqXYylPEeMvZ5aw=3D=3D=0A=
</sig:X509Certificate>=0A=
					</sig:X509Data>=0A=
					<sig:KeyValue>=0A=
						<sig:RSAKeyValue>=0A=
							<sig:Modulus>=0A=
y6ACsVtGJ69fkeKxJUlZqUP4FJFDIrkrUEi04c8UAAmC6jxu9+mMuLD+766Ztrjp/2anYX0Q=
S7Re=0A=
D+Q78ky3a0nmPDIpAzv8P7tUCBc6Yq11w5c1yHSNDdLPxLlX6+JTnUXnmXMsfAyC2cnoevc3=
8gfE=0A=
EkEJnS4iCzUC7WHsNgM=3D=0A=
</sig:Modulus>=0A=
							<sig:Exponent>AQAB</sig:Exponent>=0A=
						</sig:RSAKeyValue>=0A=
					</sig:KeyValue>=0A=
				</sig:KeyInfo>=0A=
			</sig:Signature>=0A=
		</Contact>=0A=
	</Contacts>=0A=
	<EndUsers>=0A=
		<EndUser Address1=3D"666 Rockets way" Address2=3D"Apt. B" =
City=3D"Scienceville" CompanyName=3D"Spacely Sprockets" Country=3D"US" =
Email=3D"gjetson@sprokets.net" PostCode=3D"" State=3D"Disturbed" =
SubjectName=3D"George Jetson" Title=3D"Whipping Boy">=0A=
			<Version>1.0</Version>=0A=
			<OCN>163444</OCN>=0A=
			<Source>ISS Atlanta</Source>=0A=
			<Serial>CE8135D7-8D27-4BC4-BCA6-2DBDE703B6AE</Serial>=0A=
			<Timestamp>2000-06-14 10:34:09</Timestamp>=0A=
		</EndUser>=0A=
	</EndUsers>=0A=
	<LicensedModules>=0A=
		<LicensedModule ContactInfo=3D"ACC64BB4-A53D-AC83-3E6F-E0AB737DEC9D" =
EndUserInfo=3D"CE8135D7-8D27-4BC4-BCA6-2DBDE703B6AE" Identity=3D"RO" =
LicenseExpiration=3D"2003-06-14" LicenseType=3D"evaluation" =
Limit=3D"2147483647" LimitOutOfMaintenance=3D"0" =
MaintenanceExpiration=3D"2003-06-14">=0A=
			<Version>1.0</Version>=0A=
			<OCN>163444</OCN>=0A=
			<Source>ISS Atlanta</Source>=0A=
			<Serial>F61BD0F3-D5D9-2F90-A24D-BF989200D712</Serial>=0A=
			<Timestamp>2000-06-14 10:34:09</Timestamp>=0A=
		</LicensedModule>=0A=
	</LicensedModules>=0A=
</ISSKeys>=0A=

------_=_NextPart_000_01C233E3.7B697A4E
Content-Type: text/plain;
	name="xmlsec-output-06.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="xmlsec-output-06.txt"

FAIL
xmlSecSignedInfoRead: failed to validate "Reference"
=3D XMLDSig Result (validate)
=3D=3D result: FAIL
=3D=3D sign method: http://www.w3.org/2000/09/xmldsig#rsa-sha1
=3D=3D KEY
=3D=3D=3D method: RSAKeyValue
=3D=3D=3D key name: NULL
=3D=3D=3D key type: Public
=3D=3D=3D key origin: x509
=3D=3D=3D X509 Certificate
=3D=3D=3D=3D Subject Name: /C=3DUS/O=3DWeb Developer/OU=3DIT/CN=3DISS =
Keygen Test
=3D=3D=3D=3D Issuer Name: /C=3DUS/O=3DWeb Developer/OU=3DIT/CN=3DISS =
Keygen Test
=3D=3D=3D=3D Issuer Serial: 3CEF18C2
=3D=3D SIGNED INFO REFERENCES
=3D=3D=3D REFERENCE=20
=3D=3D=3D=3D ref type: SignedInfo Reference
=3D=3D=3D=3D result: FAIL
=3D=3D=3D=3D digest method: http://www.w3.org/2000/09/xmldsig#sha1
=3D=3D=3D=3D uri:=20
=3D=3D=3D=3D type: NULL
=3D=3D=3D=3D id: NULL
=3D=3D=3D=3D start buffer:
<Contact>
			<Keys Address1=3D"2626 Somewhere Lane" Address2=3D"suite 200A" =
City=3D"Atlanta" Country=3D"US" Email=3D"keys@iss.net" =
Fax=3D"778-555-1212" Phone=3D"777.555.1212" PostCode=3D"30064" =
Weburl=3D"http://web.fubar.net"></Keys>
			<CustomerRelations Address1=3D"1313 knowwhere Lane" =
Address2=3D"suite 300A" City=3D"Atlanta" Country=3D"US" =
Email=3D"customer_relations@iss.net" Fax=3D"778-555-7799" =
Phone=3D"777.555.7788" PostCode=3D"30064" =
Weburl=3D"http://web.customer_relations_iss.net"></CustomerRelations>
			<Support Address1=3D"1234 Anvil Rd." Address2=3D"suite 440B" =
City=3D"Atlanta" Country=3D"US" Email=3D"support@iss.net" =
Fax=3D"778-555-7755" Phone=3D"777.555.7744" PostCode=3D"30064" =
Weburl=3D"http://web.suport_iss.net"></Support>
			<Version>1.0</Version>
			<OCN>163444</OCN>
			<Source>ISS Atlanta</Source>
			<Serial>ACC64BB4-A53D-AC83-3E6F-E0AB737DEC9D</Serial>
			<Timestamp>2000-06-14 10:34:09</Timestamp>
		=09
		</Contact>
=3D=3D=3D=3D end buffer:
=3D Status:
=3D=3D Signatures ok: 0
=3D=3D Signatures fail: 1
=3D=3D SignedInfo Ref ok: 0
=3D=3D SignedInfo Ref fail: 1
=3D=3D Manifest Ref ok: 0
=3D=3D Manifest Ref fail: 0
Error: operation failed
=1A
------_=_NextPart_000_01C233E3.7B697A4E--