Changeset ee7f7e4 for axis


Ignore:
Timestamp:
Apr 1, 2011 11:28:12 AM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
2ef3584
Parents:
140fb80
Message:

Add build rules for generating the ABAC cert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • axis/build.xml

    r140fb80 ree7f7e4  
    2626  <property name="keystore.file" value="${basedir}${file.separator}keystore"/>
    2727  <property name="wsdl.dir" value="../wsdl"/>
    28   <property name="cert.pem" value="./emulab.pem"/>
     28  <property name="cert.pem" value="./cert.pem"/>
     29  <property name="fedid.pem" value="./fedid.pem"/>
    2930  <property name="version" value="1.0"/>
    3031  <property name="fedd.jar" value="fedd-${version}.jar"/>
     
    4647
    4748  <!-- remove all derived and compiled files -->
    48   <target name="clean">
     49  <target name="clean" depends="clean-keys">
    4950    <delete dir="${basedir}${file.separator}edu"/>
    5051    <delete dir="${build.dir}"/>
     
    5859    <delete>
    5960      <fileset dir="${classes.dir}"
    60         includes="**/FeddCommand.class **/Create.class **/MultiStatus.class **/Terminate.class"/>
     61        includes="**/FeddCommand.class **/Create.class **/MultiStatus.class **/Terminate.class **/MakeFedid.class"/>
    6162    </delete>
    6263  </target>
    6364
    64 
    65   <!-- Check to see if the keystore file exists, if so the keystore.available
     65  <!-- just remove keystore and ${fedid.pem}-->
     66  <target name="clean-keys">
     67    <delete file="${keystore.file}"/>
     68    <delete file="${fedid.pem}"/>
     69  </target>
     70
     71
     72  <!-- Check to see if the keystore file exists, if so the keystore.present
    6673       property is created. -->
    6774  <target name="keystore.check">
     
    7077  </target>
    7178
    72 
    73   <!-- Convert ${cert.pem} to a java keystore.  Makes use of the ImportKey
     79  <!-- Check to see if the ${fedid.pem} file exists, if so the fedid.present
     80       property is created. -->
     81  <target name="fedid.check">
     82    <available property="fedid.present"
     83      file="${basedir}${file.separator}${fedid.pem}"/>
     84  </target>
     85
     86
     87  <!-- Convert ${cert.pem} to a fedid in ${fedid.pem} that is, make it a self
     88       signed-certificate with the same keys.  This is only run if ${fedid.pem}
     89       does not exist -->
     90  <target name="makefedid" depends="compile,jar,fedid.check"
     91    unless="fedid.present">
     92    <echo message="converting ${cert.pem} to a fedid in ${fedid.pem}"/>
     93    <java classname="MakeFedid" fork="true" >
     94      <classpath>
     95        <path refid="run.classpath"/>
     96        <pathelement path="${classes.dir}"/>
     97      </classpath>
     98      <arg file="${cert.pem}"/>
     99      <arg file="${fedid.pem}"/>
     100      <arg value="${user.name}"/>
     101    </java>
     102  </target>
     103
     104  <!-- Convert ${fedid.pem} to a java keystore.  Makes use of the ImportKey
    74105       program available from http://www.agentbob.info/agentbob/79-AB.html .
    75106       That web page describes this process in detail. -->
    76   <target name="keys" depends="keystore.check" unless="keystore.present" >
     107  <target name="keys" depends="keystore.check,makefedid"
     108    unless="keystore.present" >
     109    <echo message="Importing key ${fedid.pem}"/>
    77110    <!-- splitkey.pl splits a combo certificate file (both key and cert) into a
    78111         key.pem and cert.pem file for ImportKey -->
    79112    <exec executable="/usr/bin/perl">
    80113      <arg value="./splitkey.pl"/>
    81       <arg file="${cert.pem}"/>
     114      <arg file="${fedid.pem}"/>
    82115    </exec>
    83116    <exec executable="openssl">
     
    161194        <available file="${classes.dir}${file.separator}Terminate.class"/>
    162195        <available file="${classes.dir}${file.separator}FeddCommand.class"/>
     196        <available file="${classes.dir}${file.separator}MakeFedid.class"/>
    163197      </and>
    164198    </condition>
     
    181215    <jar destfile="${jar.dir}${file.separator}${fedd.jar}"
    182216      basedir="${classes.dir}"
    183       excludes="**/Create.class **/MultiStatus.class **/Terminate.class **/FeddCommand.class"/>
     217      excludes="**/Create.class **/MultiStatus.class **/Terminate.class **/FeddCommand.class **/MakeFedid.class"/>
    184218  </target>
    185219
     
    204238      <arg value="${user.name}-test"/>
    205239      <arg file="./deter-only.tcl"/>
     240      <arg file="${cert.pem}"/>
    206241    </java>
    207242  </target>
Note: See TracChangeset for help on using the changeset viewer.