Index: axis/build.xml
===================================================================
--- axis/build.xml	(revision 140fb80aea48507877f448114252a16ab896c6dd)
+++ axis/build.xml	(revision ee7f7e43caedf8c1857b2245f37ab1ac8d70ebb2)
@@ -26,5 +26,6 @@
   <property name="keystore.file" value="${basedir}${file.separator}keystore"/>
   <property name="wsdl.dir" value="../wsdl"/>
-  <property name="cert.pem" value="./emulab.pem"/>
+  <property name="cert.pem" value="./cert.pem"/>
+  <property name="fedid.pem" value="./fedid.pem"/>
   <property name="version" value="1.0"/>
   <property name="fedd.jar" value="fedd-${version}.jar"/>
@@ -46,5 +47,5 @@
 
   <!-- remove all derived and compiled files -->
-  <target name="clean">
+  <target name="clean" depends="clean-keys">
     <delete dir="${basedir}${file.separator}edu"/>
     <delete dir="${build.dir}"/>
@@ -58,10 +59,16 @@
     <delete>
       <fileset dir="${classes.dir}"
-	includes="**/FeddCommand.class **/Create.class **/MultiStatus.class **/Terminate.class"/>
+	includes="**/FeddCommand.class **/Create.class **/MultiStatus.class **/Terminate.class **/MakeFedid.class"/>
     </delete>
   </target>
 
-
-  <!-- Check to see if the keystore file exists, if so the keystore.available
+  <!-- just remove keystore and ${fedid.pem}-->
+  <target name="clean-keys">
+    <delete file="${keystore.file}"/>
+    <delete file="${fedid.pem}"/>
+  </target>
+
+
+  <!-- Check to see if the keystore file exists, if so the keystore.present
        property is created. -->
   <target name="keystore.check">
@@ -70,14 +77,40 @@
   </target>
 
-
-  <!-- Convert ${cert.pem} to a java keystore.  Makes use of the ImportKey
+  <!-- Check to see if the ${fedid.pem} file exists, if so the fedid.present
+       property is created. -->
+  <target name="fedid.check">
+    <available property="fedid.present" 
+      file="${basedir}${file.separator}${fedid.pem}"/>
+  </target>
+
+
+  <!-- Convert ${cert.pem} to a fedid in ${fedid.pem} that is, make it a self
+       signed-certificate with the same keys.  This is only run if ${fedid.pem}
+       does not exist -->
+  <target name="makefedid" depends="compile,jar,fedid.check" 
+    unless="fedid.present">
+    <echo message="converting ${cert.pem} to a fedid in ${fedid.pem}"/>
+    <java classname="MakeFedid" fork="true" >
+      <classpath>
+	<path refid="run.classpath"/>
+	<pathelement path="${classes.dir}"/>
+      </classpath>
+      <arg file="${cert.pem}"/>
+      <arg file="${fedid.pem}"/>
+      <arg value="${user.name}"/>
+    </java>
+  </target>
+
+  <!-- Convert ${fedid.pem} to a java keystore.  Makes use of the ImportKey
        program available from http://www.agentbob.info/agentbob/79-AB.html .
        That web page describes this process in detail. -->
-  <target name="keys" depends="keystore.check" unless="keystore.present" >
+  <target name="keys" depends="keystore.check,makefedid" 
+    unless="keystore.present" >
+    <echo message="Importing key ${fedid.pem}"/>
     <!-- splitkey.pl splits a combo certificate file (both key and cert) into a
 	 key.pem and cert.pem file for ImportKey -->
     <exec executable="/usr/bin/perl">
       <arg value="./splitkey.pl"/>
-      <arg file="${cert.pem}"/>
+      <arg file="${fedid.pem}"/>
     </exec>
     <exec executable="openssl">
@@ -161,4 +194,5 @@
 	<available file="${classes.dir}${file.separator}Terminate.class"/>
 	<available file="${classes.dir}${file.separator}FeddCommand.class"/>
+	<available file="${classes.dir}${file.separator}MakeFedid.class"/>
       </and>
     </condition>
@@ -181,5 +215,5 @@
     <jar destfile="${jar.dir}${file.separator}${fedd.jar}"
       basedir="${classes.dir}"
-      excludes="**/Create.class **/MultiStatus.class **/Terminate.class **/FeddCommand.class"/>
+      excludes="**/Create.class **/MultiStatus.class **/Terminate.class **/FeddCommand.class **/MakeFedid.class"/>
   </target>
 
@@ -204,4 +238,5 @@
       <arg value="${user.name}-test"/>
       <arg file="./deter-only.tcl"/>
+      <arg file="${cert.pem}"/>
     </java>
   </target>
