Hi Raul,
I'm attaching the files which where different in my case (for
merlin-c14n-three). Again, I'm still trying to figure out what I did
wrong, but the steps I did where quite simple.
I'm also attaching a file called "xpaths01.txt" which holds the XPath
expressions used to filter the XML content. Each of the 9 XPath
expressions is used for the tests from 00 to 26 (they repeat for
inclusive, exclusive & exclusive with inclusive prefix list... which are
the first 27 tests). The last test (c14n-27.txt) just canonicalizes the
entire SignedInfo subtree.
Thanks in advanced,
Marcelo.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Raul Benito
Sent: Tuesday, May 29, 2007 05:07
To: security-dev@xml.apache.org
Subject: Re: c14n test vectors
Hi Marcelo,
It is strange, I think that Merlin interop test is our unittest suite.
Can you send the differences?
Regards,
Raul
On 5/28/07, Da Cruz Pinto, Juan M <[EMAIL PROTECTED]>
wrote:
>
>
>
>
> Hi Everybody,
>
>
>
> Are there any unit tests in the code to test c14n interoperability?
I've
> been trying to test the "merlin-c14n-three" test vectors, but some of
the
> tests inside it are failing.
>
> My environment:
>
> - XML Security 1.4.1 library
>
> - Using XMLUtils.circumventBug2650(document) to spread
namespaces
> declaration.
>
> - Using XMLUtils.createDSctx(...) to create a namespace
context.
>
> - Using XPathAPI.selectNodeList(document, xpath, nsc) to
select the
> XPath node-set.
>
> - Using
> Canonicalizer.canonicalizeXPathNodeSet(NodeList) to
> canonicalize the XPath node-set.
>
>
>
> The tests (of merlin-c14n-three) that are failing are 03, 10, 18 & 19.
I'm
> quite sure I'm doing something wrong... but don't now what.
>
>
>
> Thanks in advanced!
>
> Marcelo.
--
http://r-bg.com
<bar:Something xmlns:bar="http://example.org/bar" xml:lang="en-ie">
<foo:Nothing xmlns:foo="http://example.org/foo">
xmlns:foo="http://example.org/foo"
<bar:Something xmlns:bar="http://example.org/bar" xml:lang="en-ie">
xmlns:foo="http://example.org/foo"
<foo:Nothing xml:lang="en-ie">
xmlns:foo="http://example.org/foo"
<baz:Something xmlns:baz="http://example.org/baz"
xml:lang="en-ie"></baz:Something>
</foo:Nothing>
</bar:Something>
</foo:Nothing>
</bar:Something>
<bar:Something xmlns:bar="http://example.org/bar">
<foo:Nothing>
<foo:Something xmlns:foo="http://example.org/foo">
<bar:Something>
<foo:Something>
<foo:Nothing>
<foo:Something>
<baz:Something
xmlns:baz="http://example.org/baz"></baz:Something>
</foo:Something>
</foo:Nothing>
</foo:Something>
</bar:Something>
</foo:Something>
</foo:Nothing>
</bar:Something>
<bar:Something xmlns:bar="http://example.org/bar">
<foo:Nothing xmlns:foo="http://example.org/foo">
<foo:Something>
<bar:Something>
<foo:Something>
<foo:Nothing>
<foo:Something>
<baz:Something
xmlns:baz="http://example.org/baz"></baz:Something>
</foo:Something>
</foo:Nothing>
</foo:Something>
</bar:Something>
</foo:Something>
</foo:Nothing>
</bar:Something>
<bar:Something xmlns:bar="http://example.org/bar">
<foo:Nothing>
<foo:Something xmlns:foo="http://example.org/foo">
<bar:Something>
<foo:Something>
<foo:Nothing>
<foo:Something>
<baz:Something
xmlns:baz="http://example.org/baz"></baz:Something>
</foo:Something>
</foo:Nothing>
</foo:Something>
</bar:Something>
</foo:Something>
</foo:Nothing>
</bar:Something>
(//.|//@*|//namespace::*)[ancestor-or-self::bar:Something]
(//.|//@*|//namespace::*)[ancestor-or-self::bar:Something and ((name() !=
"bar") or parent::bar:Something) and ((name() != "foo") or
parent::foo:Something) and ((name() != "baz") or parent::baz:Something) and
((name() != "") or self::text())]
(//.|//@*|//namespace::*)[ancestor-or-self::bar:Something and (self::text() or
(namespace-uri() != "") or (string(self::node()) =
namespace-uri(parent::node())))]
(//.|//@*|//namespace::*)[ancestor-or-self::bar:Something and not
(self::foo:Something) and (self::text() or (namespace-uri() != "") or
(string(self::node()) = namespace-uri(parent::node())))]
(//.|//@*|//namespace::*)[ancestor-or-self::bar:Something and
(count(parent::node()/namespace::*) != count(parent::node()/namespace::* |
self::node()))]
(//.|//@*|//namespace::*)[ancestor-or-self::bar:Something and (self::text() or
(namespace-uri() != ""))]
(//.|//@*|//namespace::*)[ancestor-or-self::bar:Something and
(count(parent::node()/namespace::*) = count(parent::node()/namespace::* |
self::node()))]
(//.|//@*|//namespace::*)[ancestor-or-self::bar:Something and
(string(self::node()) = namespace-uri(parent::node()))]
(//.|//@*|//namespace::*)[ancestor-or-self::bar:Something and (self::text() or
(namespace-uri() != "") or ((name() = "") and ((count(ancestor-or-self::node())
mod 2) = 1)))]