Changeset 32416 for main/trunk


Ignore:
Timestamp:
2018-09-03T14:29:32+12:00 (6 years ago)
Author:
ak19
Message:

On windows, only pass in min-min-live for setting up https-certification if not in testing mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r32412 r32416  
    277277  </condition>
    278278
    279   <condition property="https.testing" value="" else="--staging">
    280     <isfalse value="${https.test.mode}"/>
    281   </condition>
     279    <!-- On linux, if testing https certification, pass in minus-minus-staging. If not testing on linux, nothing extra to pass in.
     280        On windows, if testing https certification, nothing extra to pass in. If not testing on windows, pass in minus-minus-live.
     281        No https certification automation (yet) for macs.
     282    -->
     283    <if><bool><istrue value="${current.os.isunixnotmac}"/></bool>   
     284        <condition property="https.testing" value="" else="--staging">
     285            <isfalse value="${https.test.mode}"/>
     286        </condition>
     287    </if>
     288    <if><bool><istrue value="${current.os.iswindows}"/></bool>
     289        <condition property="https.testing" value="--live" else="">
     290            <isfalse value="${https.test.mode}"/>
     291        </condition>
     292    </if>
    282293
    283294  <!-- now we've read in properties, apply defaults -->
     
    17701781        le64 ==key "${packages.home}\tomcat\conf\https_cert\privkey.key" ==csr "${packages.home}\tomcat\conf\https_cert\${tomcat.server}.csr" ==csr-key "${packages.home}s\tomcat\conf\https_cert\${tomcat.server}.key" ==crt "${packages.home}\tomcat\conf\https_cert\${tomcat.server}.crt" ==domains "${https.cert.domains}" ==path "${packages.home}\tomcat\webapps\ROOT\.well-known\acme-challenge" ==generate-missing ==unlink ==live -export-pfx "${keystore.pass}"
    17711782       
    1772         which generates a .pfx file with the same name as the PEM certificate (.crt)
     1783        which generates a .pfx file with the same name as the PEM certificate (.crt param below)
    17731784        .pfx vs .p12: https://stackoverflow.com/questions/6819079/convert-pfx-format-to-p12
    17741785       
     
    17871798      <arg value="--generate-missing" />
    17881799      <arg value="--unlink" />
    1789       <arg line="--live" /><!-- https://stackoverflow.com/questions/11840284/pass-arguments-to-apache-ant-exec-task-based-on-the-variables-value -->
     1800      <arg line="${https.testing}" /><!-- minus-minus-live if not testing, empty if testing. https://stackoverflow.com/questions/11840284/pass-arguments-to-apache-ant-exec-task-based-on-the-variables-value -->
    17901801      <arg value="--export-pfx" /><arg value="${keystore.pass}" />
    17911802    </exec> 
     
    19541965    <filter token="tomcat.port.http" value="${tomcat.port.http}"/>
    19551966    <filter token="tomcat.port.https" value="${tomcat.port.https}"/>
    1956     <!--<filter token="keystore.file" value="${packages.home}/tomcat/conf/https_cert/${tomcat.server}.jks" />-->
    1957     <!--ON UNIX: <filter token="keystore.file" value="${packages.home}/tomcat/conf/https_cert/fullchain_and_prvtkey.p12" />-->
     1967    <!-- Relative path preferred for keystore.file, in case tomcat is moved elsewhere -->
     1968    <!--<filter token="keystore.file" value="conf/https_cert/${tomcat.server}.jks" />-->
     1969    <!--ON UNIX: <filter token="keystore.file" value="conf/https_cert/fullchain_and_prvtkey.p12" />-->
    19581970    <!--ON WINDOWS: <filter token="keystore.file" value="conf/https_cert/fullchain_and_prvtkey.pfx" />-->
    19591971    <filter token="keystore.file" value="conf/https_cert/${keystore.file}" />
Note: See TracChangeset for help on using the changeset viewer.