Skip to content

Commit

Permalink
Bugzilla 750: hoist "xml" namespace
Browse files Browse the repository at this point in the history
This turns out to be caused by a issue in one of the libraries underlying xmlsectool.  Work around this for now by passing the output from xmlsectool through Xalan again using an identity transform.  This strips the problematic declarations without affecting the signature.
  • Loading branch information
iay committed Jun 21, 2010
1 parent 2680378 commit 3ec876a
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,10 @@
<attribute name="i"/><!-- input file, assumed to be in the XML directory -->
<attribute name="o"/><!-- output file, assumed to be in the XML directory -->
<sequential>
<!-- delete the temporary file to be sure we don't use old data -->
<delete file="${xml.dir}/temp.xml" quiet="true" verbose="false"/>

<!-- perform signing operation into temporary file -->
<XMLSECTOOL i="@{i}">
<args>
<arg value="--sign"/>
Expand All @@ -586,14 +590,28 @@
<arg value="--keyPassword"/>
<arg value="${keystore.pass}"/>
<arg value="--outFile"/>
<arg value="${xml.dir}/@{o}"/>
<arg value="${xml.dir}/temp.xml"/>
<arg value="--referenceIdAttributeName"/>
<arg value="ID"/>
<!--
<arg value="- -quiet"/>
-->
</args>
</XMLSECTOOL>

<!--
Perform identity transform, into the real output file.
This will remove some problematic "xml" namespace prefix
declarations without affecting the signature.
-->
<XALAN
i="temp.xml"
o="@{o}"
x="identity.xsl"/>

<!-- delete the temporary file now that we're finished with it -->
<delete file="${xml.dir}/temp.xml" quiet="true" verbose="false"/>
</sequential>
</macrodef>

Expand Down

0 comments on commit 3ec876a

Please sign in to comment.