# HG changeset patch # User ptisnovs # Date 1334681840 -7200 # Node ID 182bdaba43eae0196a950dc425a516c665a4448f # Parent 7b2da3e832e11fe13c7372ff47cb038d9ec508e0 PR881: Sign tests (wsse.policy.basic) failures with OpenJDK6 diff -r 7b2da3e832e1 -r 182bdaba43ea ChangeLog --- a/ChangeLog Fri Mar 09 13:48:15 2012 -0500 +++ b/ChangeLog Tue Apr 17 18:57:20 2012 +0200 @@ -1,3 +1,10 @@ +2012-04-17 Pavel Tisnovsky + + PR881: Sign tests (wsse.policy.basic) failures with OpenJDK6 + * Makefile.am: Updated + * patches/idresolver_fix.patch: added patch for a class + IdResolver. + 2012-03-09 Danesh Dadachanji * Makefile.am: diff -r 7b2da3e832e1 -r 182bdaba43ea Makefile.am --- a/Makefile.am Fri Mar 09 13:48:15 2012 -0500 +++ b/Makefile.am Tue Apr 17 18:57:20 2012 +0200 @@ -379,7 +379,8 @@ patches/openjdk/7102369-7094468-rmiregistry.patch \ patches/openjdk/7103725-ssl_beast_regression.patch \ patches/openjdk/6851973-kerberos.patch \ - patches/openjdk/7091528-javadoc_class_files.patch + patches/openjdk/7091528-javadoc_class_files.patch \ + patches/idresolver_fix.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 7b2da3e832e1 -r 182bdaba43ea NEWS --- a/NEWS Fri Mar 09 13:48:15 2012 -0500 +++ b/NEWS Tue Apr 17 18:57:20 2012 +0200 @@ -12,6 +12,7 @@ New in release 1.10.7 (2012-XX-XX): * Bug fixes - PR732: Use xsltproc for bootstrap xslt in place of Xerces/Xalan + - PR881: Sign tests (wsse.policy.basic) failures with OpenJDK6 New in release 1.10.6 (2012-02-14): diff -r 7b2da3e832e1 -r 182bdaba43ea patches/idresolver_fix.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/idresolver_fix.patch Tue Apr 17 18:57:20 2012 +0200 @@ -0,0 +1,194 @@ +--- openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java 2012-03-20 20:29:30.000000000 +0100 ++++ openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java 2012-03-20 22:18:41.094309861 +0100 +@@ -26,6 +26,7 @@ + import org.w3c.dom.Attr; + import org.w3c.dom.Document; + import org.w3c.dom.Element; ++import org.w3c.dom.NamedNodeMap; + import org.w3c.dom.Node; + + import java.util.Arrays; +@@ -175,69 +176,124 @@ + return null; + } + ++ private static java.util.List names; ++ private static int namesLength; ++ static { ++ String namespaces[]={ ++ Constants.SignatureSpecNS, ++ EncryptionConstants.EncryptionSpecNS, ++ "http://schemas.xmlsoap.org/soap/security/2000-12", ++ "http://www.w3.org/2002/03/xkms#", ++ "urn:oasis:names:tc:SAML:1.0:assertion", ++ "urn:oasis:names:tc:SAML:1.0:protocol" ++ }; ++ names = Arrays.asList(namespaces); ++ namesLength = names.size(); ++ } + +- static java.util.List names; +- static { +- String namespaces[]={ Constants.SignatureSpecNS, +- EncryptionConstants.EncryptionSpecNS, +- "http://schemas.xmlsoap.org/soap/security/2000-12", +- "http://www.w3.org/2002/03/xkms#" +- }; +- names=Arrays.asList(namespaces); +- } + ++ private static Element getElementBySearching(Node root,String id) { ++ Element []els=new Element[namesLength + 1]; ++ getEl(root,id,els); ++ for (int i=0;i2) ++ continue; ++ String value=n.getNodeValue(); ++ if (name.charAt(0)=='I') { ++ char ch=name.charAt(1); ++ if (ch=='d' && value.equals(id)) { ++ els[index]=el; ++ if (index==0) { + return 1; +- sibling=sibling.getNextSibling(); ++ } ++ } else if (ch=='D' &&value.endsWith(id)) { ++ if (index!=3) { ++ index=namesLength; ++ } ++ els[index]=el; + } +- } +- return 0; +- } +- ++ } else if ( "id".equals(name) && value.equals(id) ) { ++ if (index!=2) { ++ index=namesLength; ++ } ++ els[index]=el; ++ } ++ } ++ //For an element namespace search for importants ++ if ((elementIndex==3)&&( ++ el.getAttribute("OriginalRequestID").equals(id) || ++ el.getAttribute("RequestID").equals(id) || ++ el.getAttribute("ResponseID").equals(id))) { ++ els[3]=el; ++ } else if ((elementIndex==4)&&( ++ el.getAttribute("AssertionID").equals(id))) { ++ els[4]=el; ++ } else if ((elementIndex==5)&&( ++ el.getAttribute("RequestID").equals(id) || ++ el.getAttribute("ResponseID").equals(id))) { ++ els[5]=el; ++ } ++ return 0; ++ } + }