Skip to content

Commit

Permalink
Perform metadata signature verification without making and deleting a…
Browse files Browse the repository at this point in the history
… temporary file, by directing surplus output to the null device.
  • Loading branch information
iay committed Oct 1, 2007
1 parent c0e5daf commit 48a64e3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@
<property name="master.file.name" value="master.xml"/>
<property name="master.file" value="${master.file.dir}/${master.file.name}"/>

<!--
Null device location.
-->
<condition property="null.device"
value="nul:" else="/dev/null">
<os family="windows"/>
</condition>

<!--
Keystore locations.
Expand Down Expand Up @@ -238,7 +246,7 @@
-->
<macrodef name="MDT">
<attribute name="i"/><!-- input file, assumed to be in the XML directory -->
<attribute name="o"/><!-- output file, assumed to be in the XML directory -->
<attribute name="o"/><!-- output file location -->
<attribute name="keystore"/><!-- keystore file location -->
<attribute name="alias"/><!-- alias of key to use -->
<element name="args" optional="yes"/>
Expand All @@ -262,7 +270,7 @@
<arg value="--in"/>
<arg value="${xml.dir}/@{i}"/>
<arg value="--out"/>
<arg value="${xml.dir}/@{o}"/>
<arg value="@{o}"/>
</java>
</sequential>
</macrodef>
Expand All @@ -279,7 +287,7 @@
<attribute name="i"/>
<attribute name="o"/>
<sequential>
<MDT i="@{i}" o="@{o}" keystore="${keystore.uk.sign.loc}" alias="${keystore.uk.sign.alias}">
<MDT i="@{i}" o="${xml.dir}/@{o}" keystore="${keystore.uk.sign.loc}" alias="${keystore.uk.sign.alias}">
<args>
<arg value="--sign"/>
<arg value="--password"/>
Expand Down Expand Up @@ -328,9 +336,7 @@
<macrodef name="VFY.uk">
<attribute name="i"/>
<sequential>
<MDT i="@{i}" o="temp.xml" keystore="${keystore.uk.vfy.loc}" alias="${keystore.uk.vfy.alias}"/>
<touch file="${xml.dir}/temp.xml"/>
<delete file="${xml.dir}/temp.xml" quiet="true"/>
<MDT i="@{i}" o="${null.device}" keystore="${keystore.uk.vfy.loc}" alias="${keystore.uk.vfy.alias}"/>
</sequential>
</macrodef>

Expand Down

0 comments on commit 48a64e3

Please sign in to comment.