[Yanel-commits] rev 20237 - public/yanel/trunk/src/build
michi at wyona.com
michi at wyona.com
Thu Nov 23 00:30:13 CET 2006
Author: michi
Date: 2006-11-23 00:30:11 +0100 (Thu, 23 Nov 2006)
New Revision: 20237
Modified:
public/yanel/trunk/src/build/build.properties
public/yanel/trunk/src/build/build.xml
public/yanel/trunk/src/build/connector.xsl
Log:
patch ssl port fixed
Modified: public/yanel/trunk/src/build/build.properties
===================================================================
--- public/yanel/trunk/src/build/build.properties 2006-11-22 20:48:14 UTC (rev 20236)
+++ public/yanel/trunk/src/build/build.properties 2006-11-22 23:30:11 UTC (rev 20237)
@@ -15,7 +15,10 @@
#tomcat2.home.dir=../tomcat-cluster/build/jakarta-tomcat-5.0.30-cnode2
#tomcat1.ssl.port=8443
+#tomcat1.http.port=9190
+
#tomcat2.ssl.port=9443
+#tomcat2.http.port=9290
tomcat1.webapps.dir=${tomcat1.home.dir}/webapps
tomcat1.endorsed-libs.dir=${tomcat1.home.dir}/common/endorsed
Modified: public/yanel/trunk/src/build/build.xml
===================================================================
--- public/yanel/trunk/src/build/build.xml 2006-11-22 20:48:14 UTC (rev 20236)
+++ public/yanel/trunk/src/build/build.xml 2006-11-22 23:30:11 UTC (rev 20237)
@@ -23,10 +23,10 @@
<xslt in="${tomcat1.home.dir}/conf/server.xml"
out="${tomcat1.home.dir}/conf/server.xml.ssl"
style="connector.xsl">
- <param name="portNumber" expression="${tomcat1.ssl.port}"/>
+ <param name="ssl-port" expression="${tomcat1.ssl.port}"/>
<param name="keystoreFile" expression="${certificate.keystore}"/>
<param name="keystorePass" expression="${certificate.keypass}"/>
- <param name="defaultPort" expression="${tomcat1.http.port}"/>
+ <param name="http-port" expression="${tomcat1.http.port}"/>
</xslt>
<tstamp>
<format property="timestamp" pattern="yyyyMMdd'T'HHmmss"/>
@@ -49,10 +49,10 @@
<xslt in="${tomcat2.home.dir}/conf/server.xml"
out="${tomcat2.home.dir}/conf/server.xml.ssl"
style="connector.xsl">
- <param name="portNumber" expression="${tomcat2.ssl.port}"/>
+ <param name="ssl-port" expression="${tomcat2.ssl.port}"/>
<param name="keystoreFile" expression="${certificate.keystore}"/>
<param name="keystorePass" expression="${certificate.keypass}"/>
- <param name="defaultPort" expression="${tomcat2.http.port}"/>
+ <param name="http-port" expression="${tomcat2.http.port}"/>
</xslt>
<tstamp>
<format property="timestamp" pattern="yyyyMMdd'T'HHmmss"/>
Modified: public/yanel/trunk/src/build/connector.xsl
===================================================================
--- public/yanel/trunk/src/build/connector.xsl 2006-11-22 20:48:14 UTC (rev 20236)
+++ public/yanel/trunk/src/build/connector.xsl 2006-11-22 23:30:11 UTC (rev 20237)
@@ -1,55 +1,60 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:param name="portNumber"/>
- <xsl:param name="keystoreFile"/>
- <xsl:param name="keystorePass"/>
- <xsl:param name="defaultPort"/>
-
- <xsl:template match="@*" priority="-1">
- <xsl:copy/>
+ <xsl:output method="xml" indent="yes"/>
+
+ <xsl:param name="ssl-port" select="'NULL_SSL_PORT'"/>
+ <xsl:param name="keystoreFile" select="'NULL_KEYSTORE_FILE'"/>
+ <xsl:param name="keystorePass" select="'NULL_KEYSTORE_PASS'"/>
+ <xsl:param name="http-port" select="'NULL_HTTP_PORT'"/>
+
+ <xsl:template match="/">
+ <xsl:apply-templates select="@*|node()"/>
</xsl:template>
-
- <xsl:template match="node()" priority="-1">
+
+ <xsl:template match="Connector[@port = $http-port]">
+ <!-- replace default settings with our default port -->
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:attribute name="redirectPort"><xsl:value-of select="$ssl-port"/></xsl:attribute>
+ </xsl:copy>
+
+ <!-- create TLS Connector if not exists-->
+ <!--
+ <xsl:if test="not(count(//Connector[@sslProtocol = 'TLS']))">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:attribute name="port"><xsl:value-of select="$portNumber"/></xsl:attribute>
+ <xsl:attribute name="URIEncoding">UTF-8</xsl:attribute>
+ <xsl:attribute name="keystoreFile"><xsl:value-of select="$keystoreFile"/></xsl:attribute>
+ <xsl:attribute name="keystorePass"><xsl:value-of select="$keystorePass"/></xsl:attribute>
+ <xsl:attribute name="secure">true</xsl:attribute>
+ <xsl:attribute name="scheme">https</xsl:attribute>
+ <xsl:attribute name="sslProtocol">TLS</xsl:attribute>
+ <xsl:attribute name="clientAuth">false</xsl:attribute>
+ </xsl:copy>
+ </xsl:if>
+ -->
+
+ </xsl:template>
+
+ <!-- in case TLS is already set replace it with our settings from (local.)build.properties -->
+<!--
+ <xsl:template match="Connector[@sslProtocol = 'TLS']">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:attribute name="port"><xsl:value-of select="$portNumber"/></xsl:attribute>
+ <xsl:attribute name="URIEncoding">UTF-8</xsl:attribute>
+ <xsl:attribute name="keystoreFile"><xsl:value-of select="$keystoreFile"/></xsl:attribute>
+ <xsl:attribute name="keystorePass"><xsl:value-of select="$keystorePass"/></xsl:attribute>
+ </xsl:copy>
+ </xsl:template>
+-->
+
+ <xsl:template match="@*|node()">
<xsl:copy>
- <xsl:apply-templates select="@*"/>
- <xsl:apply-templates />
+ <xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
-
- <xsl:template match="Service[@name='Catalina']">
- <Service name="Catalina">
- <xsl:for-each select="Connector">
- <xsl:variable name="URIEncoding"><xsl:value-of select="@URIEncoding"/></xsl:variable>
- <Connector>
- <xsl:for-each select="@*">
- <xsl:variable name="aName" select="local-name(.)"/>
- <xsl:variable name="aValue" select="."/>
- <xsl:choose>
- <xsl:when test="$aName = 'port' and $aValue = $defaultPort">
- <xsl:attribute name="{$aName}"><xsl:value-of select="$aValue"/></xsl:attribute>
- <xsl:if test="$URIEncoding = ''">
- <xsl:attribute name="URIEncoding"><xsl:text>UTF-8</xsl:text></xsl:attribute>
- </xsl:if>
- </xsl:when>
- <!-- do we have to redirect everything to our configured redirect port -->
- <xsl:when test="$aName = 'redirectPort'"><xsl:attribute name="{$aName}"><xsl:value-of select="$portNumber"/></xsl:attribute></xsl:when>
- <xsl:otherwise><xsl:attribute name="{$aName}"><xsl:value-of select="$aValue"/></xsl:attribute></xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </Connector>
- </xsl:for-each>
-
- <xsl:if test="not(count(//Connector[@port = $portNumber]))">
- <Connector port="{$portNumber}" URIEncoding="UTF-8" maxHttpHeaderSize="8192"
- maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
- enableLookups="false" disableUploadTimeout="true"
- acceptCount="100" scheme="https" secure="true"
- clientAuth="false" sslProtocol="TLS"
- keystoreFile="{$keystoreFile}" keystorePass="{$keystorePass}" />
- </xsl:if>
- <xsl:copy-of select="Engine"/>
- </Service>
- </xsl:template>
-
+
</xsl:stylesheet>
More information about the Yanel-commits
mailing list