There is a bug in XMLSignatureInput.getNodeSet() - it will throw a NullPointerException if the nodeset is empty. This is a regression from the 1_1 release and causes one of the xpath filter 2 interop test vectors to fail:
merlin-xpath-filter2-three/sign-spec.xml


Here is a simple patch/code diffs:

$ cvs diff -c XMLSignatureInput.java
Index: XMLSignatureInput.java
===================================================================
RCS file: /home/cvspublic/xml-security/src/org/apache/xml/security/signature/XMLSignatureInput.java,v
retrieving revision 1.26
diff -c -r1.26 XMLSignatureInput.java
*** XMLSignatureInput.java 12 May 2004 12:00:45 -0000 1.26
--- XMLSignatureInput.java 17 Aug 2004 13:59:44 -0000
***************
*** 250,256 ****
return this._inputNodeSet;
}
if (this.isNodeSet()) {
! XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(this._inputNodeSet));
return this._inputNodeSet;
} else if (this.isOctetStream()) {
DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
--- 250,258 ----
return this._inputNodeSet;
}
if (this.isNodeSet()) {
! if (!this._inputNodeSet.isEmpty()) {
! XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(this._inputNodeSet));
! }
return this._inputNodeSet;
} else if (this.isOctetStream()) {
DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();




Reply via email to