mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-24 21:33:51 +03:00
fixed bug in exc-c14n namespace visibility + test case 319367(bug #319367)
This commit is contained in:
parent
eaccdc6554
commit
b2eabc0c44
@ -1,3 +1,9 @@
|
||||
2005-10-27 Aleksey Sanin <aleksey@aleksey.com>
|
||||
* c14n.c result/c14n/exc-without-comments/test-2
|
||||
test/c14n/exc-without-comments/test-2.xml
|
||||
test/c14n/exc-without-comments/test-2.xpath: fixing
|
||||
bug in exc-c14n namespace visibility + test case (bug #319367)
|
||||
|
||||
Thu Oct 27 16:10:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* python/libxml.py: remove warnings to stdout patch from Nic Ferrier
|
||||
|
2
c14n.c
2
c14n.c
@ -802,7 +802,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
|
||||
if(xmlStrlen(attr->ns->prefix) == 0) {
|
||||
has_empty_ns = 1;
|
||||
}
|
||||
} else if(attr->ns == NULL) {
|
||||
} else if((attr->ns != NULL) && (xmlStrlen(attr->ns->prefix) == 0) && (xmlStrlen(attr->ns->href) == 0)) {
|
||||
has_visibly_utilized_empty_ns = 1;
|
||||
}
|
||||
}
|
||||
|
11
result/c14n/exc-without-comments/test-2
Normal file
11
result/c14n/exc-without-comments/test-2
Normal file
@ -0,0 +1,11 @@
|
||||
<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
|
||||
<ds:CanonicalizationMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod>
|
||||
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod>
|
||||
<Reference URI="#ndid:1234-5678-0987">
|
||||
<Transforms>
|
||||
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
|
||||
</Transforms>
|
||||
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
|
||||
<DigestValue>sj1VXDB2VMCU5qmva2OtDw3kKOs=</DigestValue>
|
||||
</Reference>
|
||||
</SignedInfo>
|
20
test/c14n/exc-without-comments/test-2.xml
Normal file
20
test/c14n/exc-without-comments/test-2.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
||||
<SignedInfo>
|
||||
<ds:CanonicalizationMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
||||
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
|
||||
<Reference URI="#ndid:1234-5678-0987">
|
||||
<Transforms>
|
||||
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
||||
</Transforms>
|
||||
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
||||
<DigestValue>sj1VXDB2VMCU5qmva2OtDw3kKOs=</DigestValue>
|
||||
</Reference>
|
||||
</SignedInfo>
|
||||
<SignatureValue>...</SignatureValue>
|
||||
<KeyInfo>
|
||||
<X509Data>
|
||||
<X509Certificate>...</X509Certificate>
|
||||
</X509Data>
|
||||
</KeyInfo>
|
||||
</Signature>
|
6
test/c14n/exc-without-comments/test-2.xpath
Normal file
6
test/c14n/exc-without-comments/test-2.xpath
Normal file
@ -0,0 +1,6 @@
|
||||
<XPath xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
|
||||
(//. | //@* | //namespace::*)
|
||||
[
|
||||
ancestor-or-self::ds:SignedInfo
|
||||
]
|
||||
</XPath>
|
Loading…
Reference in New Issue
Block a user