geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r476229 [2/5] - in /geronimo/server/trunk: applications/ applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/util/ applications/console/geronimo-console-framework/src/main/webapp/WEB-INF/data/ applications/c...
Date Fri, 17 Nov 2006 17:48:06 GMT
Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java Fri Nov 17 09:48:02 2006
@@ -0,0 +1,111 @@
+/**
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.console.ca;
+
+import java.io.IOException;
+import java.math.BigInteger;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.MultiPageModel;
+
+/**
+ * Handler for Setup CA screen to get CA details from user.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SetupCAHandler extends BaseCAHandler {
+    private final static Log log = LogFactory.getLog(SetupCAHandler.class);
+    public SetupCAHandler() {
+        super(SETUPCA_MODE, "/WEB-INF/view/ca/setupCA.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String[] params = {ERROR_MSG, INFO_MSG, "caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo", "password"};
+        for(int i = 0; i < params.length; ++i) {
+            String value = request.getParameter(params[i]);
+            if(value != null) response.setRenderParameter(params[i], value);
+        }
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
+        String[] params = {ERROR_MSG, INFO_MSG, "caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo", "password"};
+        for(int i = 0; i < params.length; ++i) {
+            Object value = request.getParameter(params[i]);
+            if(value != null) request.setAttribute(params[i], value);
+        }
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String errorMsg = null;
+        try {
+            // Validate the Serial Number
+            String sNo = request.getParameter("sNo");
+            new BigInteger(sNo.trim());
+            
+            // Validate the from and to dates
+            String validFrom = request.getParameter("validFrom");
+            String validTo = request.getParameter("validTo");
+            // Check if the from date format is MM/DD/YYYY
+            DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
+            Date validFromDate = df.parse(validFrom);
+            Calendar calendar = new GregorianCalendar();
+            calendar.setTime(validFromDate);
+            String mmddyyyy = (calendar.get(Calendar.MONTH) < 9 ? "0":"") + (calendar.get(Calendar.MONTH)+1);
+            mmddyyyy += "/"+(calendar.get(Calendar.DAY_OF_MONTH) < 10 ? "0":"") + (calendar.get(Calendar.DAY_OF_MONTH));
+            mmddyyyy += "/"+calendar.get(Calendar.YEAR);
+            if(!mmddyyyy.equals(validFrom)) {
+                throw new Exception("validFrom must be a date in MM/DD/YYYY format.");
+            }
+            // Check if the to date format is MM/DD/YYYY
+            Date validToDate = df.parse(validTo);
+            calendar.setTime(validToDate);
+            mmddyyyy = (calendar.get(Calendar.MONTH) < 9 ? "0":"") + (calendar.get(Calendar.MONTH)+1);
+            mmddyyyy += "/"+(calendar.get(Calendar.DAY_OF_MONTH) < 10 ? "0":"") + (calendar.get(Calendar.DAY_OF_MONTH));
+            mmddyyyy += "/"+calendar.get(Calendar.YEAR);
+             if(!mmddyyyy.equals(validTo)) {
+                throw new Exception("validTo must be a date in MM/DD/YYYY format.");
+            }
+            // Check if the from date is before the to date
+            if(validFromDate.after(validToDate)) {
+                throw new Exception("Validity: From date '"+validFrom+"' is before the To date '"+validTo+"'.");
+            }
+
+            // Load page to confirm CA details
+            return CONFIRM_CA_MODE+BEFORE_ACTION;
+        } catch(Exception e) {
+            errorMsg = e.toString();
+            log.error("Error in user input during CA Setup.", e);
+        }
+        if(errorMsg != null) response.setRenderParameter(ERROR_MSG, errorMsg);
+        return getMode()+BEFORE_ACTION;
+    }
+
+}

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java Fri Nov 17 09:48:02 2006
@@ -0,0 +1,86 @@
+/**
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.console.ca;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.management.geronimo.CertificationAuthority;
+
+/**
+ * Handler for unlock CA screen.
+ *
+ * @version $Rev$ $Date$
+ */
+public class UnlockCAHandler extends BaseCAHandler {
+    private final static Log log = LogFactory.getLog(UnlockCAHandler.class);
+    public UnlockCAHandler() {
+        super(UNLOCKCA_MODE, "/WEB-INF/view/ca/unlockCA.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String[] params = {ERROR_MSG, INFO_MSG};
+        for(int i = 0; i < params.length; ++i) {
+            String value = request.getParameter(params[i]);
+            if(value != null) response.setRenderParameter(params[i], value);
+        }
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
+        String[] params = {ERROR_MSG, INFO_MSG};
+        for(int i = 0; i < params.length; ++i) {
+            Object value = request.getParameter(params[i]);
+            if(value != null) request.setAttribute(params[i], value);
+        }
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String errorMsg = null;
+        try {
+            String password = request.getParameter("password");
+            if(password == null) {
+                throw new Exception("Password is null.");
+            }
+            CertificationAuthority ca = getCertificationAuthority(request);
+            if(ca == null) {
+                throw new Exception("CA is not running.  CA may not have been initialized.");
+            }
+            ca.unlock(password.toCharArray());
+
+            // Return to CA's index page
+            response.setRenderParameter(INFO_MSG, "CA has been unlocked successfully!");
+            log.info("CA has been unlocked successfully!");
+            return INDEX_MODE+BEFORE_ACTION;
+        } catch(Exception e) {
+            errorMsg = e.toString();
+            log.error("Errors in unlocking CA.", e);
+        }
+        // An error occurred.  Set the error message and load the page again.
+        response.setRenderParameter(ERROR_MSG, errorMsg);
+        return getMode()+BEFORE_ACTION;
+    }
+}

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java Fri Nov 17 09:48:02 2006
@@ -0,0 +1,106 @@
+/**
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.console.ca;
+
+import java.io.IOException;
+import java.math.BigInteger;
+import java.security.PublicKey;
+import java.security.cert.Certificate;
+import java.security.interfaces.RSAPublicKey;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.management.geronimo.CertificationAuthority;
+import org.apache.geronimo.util.CertificateUtil;
+
+/**
+ * Handler for view certificate screen.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ViewCertificateHandler extends BaseCAHandler {
+    private final static Log log = LogFactory.getLog(ViewCertificateHandler.class);
+    public ViewCertificateHandler() {
+        super(VIEW_CERT_MODE, "/WEB-INF/view/ca/viewCertificate.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String[] params = {ERROR_MSG, INFO_MSG, "sNo"};
+        for(int i = 0; i < params.length; ++i) {
+            String value = request.getParameter(params[i]);
+            if(value != null) response.setRenderParameter(params[i], value);
+        }
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
+        String[] params = {ERROR_MSG, INFO_MSG};
+        for(int i = 0; i < params.length; ++i) {
+            String value = request.getParameter(params[i]);
+            if(value != null) request.setAttribute(params[i], value);
+        }
+        String errorMsg = request.getParameter(ERROR_MSG);
+        String sNo = request.getParameter("sNo");
+        try {
+            if(!request.getParameterMap().containsKey("sNo")) {
+                // Show the page to get serial number of the certificate to be viewed
+                request.setAttribute("sNo", null);
+                return;
+            }
+            CertificationAuthority ca = getCertificationAuthority(request);
+            
+            String certText = ca.getCertificateBase64Text(new BigInteger(sNo.trim()));
+            Certificate cert = ca.getCertificate(new BigInteger(sNo.trim()));
+            PublicKey publickey = cert.getPublicKey();
+            String keySize = null;
+            if(publickey instanceof RSAPublicKey) {
+                keySize = ""+((RSAPublicKey)publickey).getModulus().bitLength();
+            }
+            request.setAttribute("sNo", sNo);
+            request.setAttribute("cert", cert);
+            request.setAttribute("certText", certText);
+            request.setAttribute("keySize", keySize);
+            // Generate Certificate Fingerprints
+            Map fingerPrints = new HashMap();
+            fingerPrints.put("MD5", CertificateUtil.generateFingerprint(cert, "MD5"));
+            fingerPrints.put("SHA1", CertificateUtil.generateFingerprint(cert, "SHA1"));
+            request.setAttribute("fingerPrints", fingerPrints);
+            // Check if the certificate issue process started from "requests to be fulfilled" page.
+            // If so, provide a link to go back to that page
+            if("true".equalsIgnoreCase(request.getParameter("linkToListRequests")))
+                request.setAttribute("linkToListRequests", Boolean.TRUE);
+        } catch (Exception e) {
+            errorMsg = e.toString();
+            log.error("Errors trying to view certificate with serial number '"+sNo+"'", e);
+        }
+        request.setAttribute(ERROR_MSG, errorMsg);
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        return getMode()+BEFORE_ACTION;
+    }
+}

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java?view=diff&rev=476229&r1=476228&r2=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java Fri Nov 17 09:48:02 2006
@@ -37,6 +37,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
 import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
@@ -387,6 +388,18 @@
         ManagementHelper helper = getManagementHelper(request);
         return helper.getGBeansImplementing(iface);
     }    
+
+    /**
+     * This methods adds a GBean to an existing configuration.
+     * @param request PortletRequest object to get hold of ManagementHelper
+     * @param configID  The configuration to add the GBean to.
+     * @param gbean     The data representing the GBean to add.
+     * @param start     If true, the GBean should be started as part of this call.
+     */
+    public static void addGBeanToConfiguration(PortletRequest request, Artifact configID, GBeanData gbean, boolean start) {
+        ManagementHelper helper = getManagementHelper(request);
+        helper.addGBeanToConfiguration(configID, gbean, start);
+    }
 
     /**
      * Looks up the context prefix used by the portal, even if the thing running

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/portlet.xml?view=diff&rev=476229&r1=476228&r2=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/portlet.xml (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/portlet.xml Fri Nov 17 09:48:02 2006
@@ -622,6 +622,29 @@
     </portlet>
 
     <portlet>
+        <description>Portlet for Certification Authority</description>
+        <portlet-name>CertificationAuthority</portlet-name>
+        <display-name>Certification Authority</display-name>
+
+        <portlet-class>org.apache.geronimo.console.ca.CertificationAuthorityPortlet</portlet-class>
+
+        <expiration-cache>-1</expiration-cache>
+
+        <supports>
+            <mime-type>text/html</mime-type>
+            <portlet-mode>VIEW</portlet-mode>
+        </supports>
+
+        <supported-locale>en</supported-locale>
+
+        <portlet-info>
+            <title>Certification Authority</title>
+            <short-title>CA</short-title>
+            <keywords>Certification Certificate Authority</keywords>
+        </portlet-info>
+    </portlet>
+
+    <portlet>
         <description>Portlet for managing JMS connections</description>
         <portlet-name>JMSConnections</portlet-name>
         <display-name>JMS Connection Factory Portlet</display-name>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/_header.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/_header.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/_header.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/_header.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,9 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<c:if test="${!empty(infoMsg)}">
+<p><font color="blue"><b>${infoMsg}</b></font></p>
+</c:if>
+
+<c:if test="${!empty(errorMsg)}">
+<p><font color="red"><b>Error: ${errorMsg}</b></font></p>
+</c:if>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/caDetails.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/caDetails.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/caDetails.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/caDetails.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,116 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<p><b>Certification Authority Details</b></p>
+
+<p>This screen shows the details of CA's certificate and keypair.  <i>Highest Serial Number</i> shows
+the highest of serial number of any certificate issued by this CA.  <i>Certificate Text</i> shows the CA's
+certificate in base64 encoded form.  This text can be used by the certificate requestors to designate
+this CA as a trusted CA in their software.</p>
+
+<jsp:include page="_header.jsp" />
+
+<c:if test="${empty(caLocked) || !caLocked}">
+  <table border="0">
+    <tr>
+        <th colspan="2" align="left" class="DarkBackground">Certificate Details</th>
+    </tr>
+    <tr>
+        <th class="LightBackground" align="right">Version:</th>
+        <td class="LightBackground">${cert.version}</td>
+    </tr>
+    <tr>
+        <th class="MediumBackground" align="right">Subject:</th>
+        <td class="MediumBackground">${cert.subjectDN.name}</td>
+    </tr>
+    <tr>
+        <th class="LightBackground" align="right">Issuer:</th>
+        <td class="LightBackground">${cert.issuerDN.name}</td>
+    </tr>
+    <tr>
+        <th class="MediumBackground" align="right">Serial Number:</th>
+        <td class="MediumBackground">${cert.serialNumber}</td>
+    </tr>
+    <tr>
+        <th class="LightBackground" align="right">Valid From:</th>
+        <td class="LightBackground">${cert.notBefore}</td>
+    </tr>
+    <tr>
+        <th class="MediumBackground" align="right">Valid To:</th>
+        <td class="MediumBackground">${cert.notAfter}</td>
+    </tr>
+    <tr>
+        <th class="LightBackground" align="right">Signature Alg:</th>
+        <td class="LightBackground">${cert.sigAlgName}</td>
+    </tr>
+    <tr>
+        <th class="MediumBackground" align="right">Public Key Alg:</th>
+        <td class="MediumBackground">${cert.publicKey.algorithm}</td>
+    </tr>
+    <tr>
+        <th class="LightBackground" align="right">Key Size:</th>
+        <td class="LightBackground">${keySize}</td>
+    </tr>
+  <c:set var="backgroundClass" value='LightBackground'/> <!-- This should be set from the row above. -->
+  <c:forEach items="${cert.criticalExtensionOIDs}" var="extoid">
+    <c:choose>
+        <c:when test="${backgroundClass == 'MediumBackground'}" >
+            <c:set var="backgroundClass" value='LightBackground'/>
+        </c:when>
+        <c:otherwise>
+            <c:set var="backgroundClass" value='MediumBackground'/>
+        </c:otherwise>
+    </c:choose>
+    <tr>
+        <th class="${backgroundClass}" align="right">critical ext: </th>
+        <td class="${backgroundClass}">${extoid}</td>
+    </tr>
+  </c:forEach>
+  <c:forEach items="${cert.nonCriticalExtensionOIDs}" var="extoid">
+    <c:choose>
+        <c:when test="${backgroundClass == 'MediumBackground'}" >
+            <c:set var="backgroundClass" value='LightBackground'/>
+        </c:when>
+        <c:otherwise>
+            <c:set var="backgroundClass" value='MediumBackground'/>
+        </c:otherwise>
+    </c:choose>
+    <tr>
+        <th class="${backgroundClass}" align="right">non-critical ext: </th>
+        <td class="${backgroundClass}">${extoid}</td>
+    </tr>
+  </c:forEach>
+    <c:choose>
+        <c:when test="${backgroundClass == 'MediumBackground'}" >
+            <c:set var="backgroundClass" value='LightBackground'/>
+        </c:when>
+        <c:otherwise>
+            <c:set var="backgroundClass" value='MediumBackground'/>
+        </c:otherwise>
+    </c:choose>
+    <tr>
+        <th class="${backgroundClass}" align="right">Finger prints:</th>
+        <td class="${backgroundClass}">
+  <c:forEach items="${fingerPrints}" var="fp">
+            ${fp.key} = &nbsp; ${fp.value} <br/>
+  </c:forEach>
+        </td>
+    </tr>
+    <tr><td>&nbsp;</td></tr>
+    <tr>
+        <th align="right">Highest Serial Number:</th>
+        <td>${highestSerial}</td>
+    </tr>
+    <tr><td>&nbsp;</td></tr>
+    <tr>
+        <th colspan="2" align="left">Base64 encoded Certificate Text</th>
+    </tr>
+    <tr>
+        <td colspan="2"><form><textarea rows="15" cols="80" READONLY>${certText}</textarea></form></td>
+    </tr>
+  </table>
+</c:if>
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Back to CA home</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/certReqDetails.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/certReqDetails.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/certReqDetails.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/certReqDetails.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,95 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<script language="JavaScript">
+var <portlet:namespace/>formName = "<portlet:namespace/>certReqDetailsForm";
+var <portlet:namespace/>dateFields = new Array("validFrom", "validTo");
+
+function <portlet:namespace/>validateForm(){
+    for(i in <portlet:namespace/>dateFields) {
+        if(!checkDateMMDDYYYY(<portlet:namespace/>formName, <portlet:namespace/>dateFields[i]))
+            return false;
+    }
+    // Check if from date is before to date
+    var fromDate = new Date(document.forms[<portlet:namespace/>formName].validFrom.value);
+    var toDate = new Date(document.forms[<portlet:namespace/>formName].validTo.value);
+    if(fromDate >= toDate) {
+        alert('validFrom date must be before validTo date');
+        return false;
+    }
+    return true;
+}
+</script>
+
+<b>Issue New Certificate</b> - Step 2: Review Request and enter Certificate details
+
+<p> This screen shows the details of the Certficate Signing Request (CSR) and allows you to input
+the validity period and signature algorithm for the certificate to be issued.  The certificate
+serial number is automatically generated by incrementing the serial number of the last certificate
+issued.  The next screen will allow you to review & confirm these details and issue a certificate.</p>
+
+<jsp:include page="_header.jsp" />
+
+<form name="<portlet:namespace/>certReqDetailsForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="certReqDetails-after"/>
+    <input type="hidden" name="pkcs10certreq" value="${pkcs10certreq}"/>
+    <input type="hidden" name="requestId" value="${requestId}"/>
+    <table border="0">
+        <tr>
+            <th class="DarkBackground" colspan="2" align="left">Certificate Requestor Details</th>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Subject:</th>
+            <td class="LightBackground">
+                <input type="hidden" name="subject" value="${subject}" /> ${subject}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Public Key:</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="publickey" value="${publickey}" /><pre>${publickey}</pre>
+            </td>
+        </tr>
+        <tr><td>&nbsp;</td></tr>
+    </table>
+    <table border="0">
+        <tr>
+            <th colspan="2" align="left">Details of the Certificate to be issued</th>
+        </tr>
+        <tr>
+            <th align="right">Certificate Serial No.:</th>
+            <td>
+                <input type="text" name="sNo" size="20" maxlength="200" value="${sNo}" READONLY/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Valid From Date (mm/dd/yyyy):</th>
+            <td>
+                <input type="text" name="validFrom" size="20" maxlength="200" value="${validFrom}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Valid To Date (mm/dd/yyyy):</th>
+            <td>
+                <input type="text" name="validTo" size="20" maxlength="200" value="${validTo}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Signature Algorithm:</th>
+            <td>
+                <select name="algorithm">
+                    <option <c:if test="${algorithm eq 'MD2withRSA'}">selected</c:if> >MD2withRSA</option>
+                    <option <c:if test="${algorithm eq 'MD5withRSA' || algorithm eq '' || empty(algorithm)}">selected</c:if> >MD5withRSA</option>
+                    <option <c:if test="${algorithm eq 'SHA1withRSA'}">selected</c:if> >SHA1withRSA</option>
+                </select>
+            </td>
+        </tr>
+    </table>
+    <input type="submit" value="Review Client Cert Details" onClick="return <portlet:namespace/>validateForm();"/>
+    <input type="reset" name="reset" value="Reset">
+</form>
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before"/>
+            </portlet:actionURL>">Cancel</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmCA.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmCA.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmCA.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmCA.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,119 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<b>Setup Certification Authority</b> - Step 2: Review and Confirm CA details
+
+<p>This screen lets you review the CA details entered in the previous screen.  If you need to modify any
+information shown here, please go back to the previous screen.  Upon clicking the <i>Setup Certification Authority</i>
+button, a keypair and a self-signed certificate will be generated and stored in a keystore.  CA's certificate serial
+number is stored in a text file and the number is incremented each time a CSR is processed by the CA.</p>
+
+<jsp:include page="_header.jsp" />
+
+<form name="<portlet:namespace/>confirmCAForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="confirmCA-after" />
+    <table border="0">
+        <tr>
+            <th class="DarkBackground" colspan="2" align="left">Certification Authority's Identity</th>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Common Name (CN):</th>
+            <td class="LightBackground">
+                <input type="hidden" name="caCN" value="${caCN}" /> ${caCN}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Division/Business Unit (OU):</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="caOU" value="${caOU}" /> ${caOU}
+            </td>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Company/Organization (O):</th>
+            <td class="LightBackground">
+                <input type="hidden" name="caO" value="${caO}" /> ${caO}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">City/Locality (L):</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="caL" value="${caL}" /> ${caL}
+            </td>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">State/Province (ST):</th>
+            <td class="LightBackground">
+                <input type="hidden" name="caST" value="${caST}" /> ${caST}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Country Code (2 char) (C):</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="caC" value="${caC}" /> ${caC}
+            </td>
+        </tr>
+        <tr><td>&nbsp;</td></tr>
+        <tr>
+            <th class="DarkBackground" colspan="2" align="left">Key Details</th>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Alias for CA's keypair:</th>
+            <td class="LightBackground">
+                <input type="hidden" name="alias" value="${alias}" /> ${alias}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Key Algorithm:</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="keyAlgorithm" value="${keyAlgorithm}" /> ${keyAlgorithm}
+            </td>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Key Size:</th>
+            <td class="LightBackground">
+                <input type="hidden" name="keySize" value="${keySize}" /> ${keySize}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Password:</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="password" value="${password}" /> ********
+            </td>
+        </tr>
+        <tr><td>&nbsp</td></tr>
+        <tr>
+            <th class="DarkBackground" colspan="2" align="left">Certificate Details</th>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Certificate Serial Number:</th>
+            <td class="LightBackground">
+                <input type="hidden" name="sNo" value="${sNo}" /> ${sNo}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Valid From Date(mm/dd/yyyy):</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="validFrom" value="${validFrom}" /> ${validFrom}
+            </td>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Valid To Date(mm/dd/yyyy):</th>
+            <td class="LightBackground">
+                <input type="hidden" name="validTo" value="${validTo}" /> ${validTo}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Signature Algorithm:</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="algorithm" value="${algorithm}" /> ${algorithm}
+            </td>
+        </tr>
+    </table>
+    <input type="submit" value="Setup Certification Authority" />
+</form>
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Cancel</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmCertReq.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmCertReq.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmCertReq.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmCertReq.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,39 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<b>Confirm Certificate Request</b>
+
+<p> This screen shows the details of the Certficate Signing Request (CSR) and allows you to approve the request.
+Once the request is approved, it will be considered for issue of a certificate.</p>
+
+<jsp:include page="_header.jsp" />
+
+<form name="<portlet:namespace/>confirmCertReqForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="confirmCertReq-after"/>
+    <input type="hidden" name="requestId" value="${requestId}"/>
+    <table border="0">
+        <tr>
+            <th class="DarkBackground" colspan="2" align="left">Certificate Requestor Details</th>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Subject:</th>
+            <td class="LightBackground">
+                ${subject}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Public Key:</th>
+            <td class="MediumBackground">
+                <pre>${publickey}</pre>
+            </td>
+        </tr>
+        <tr><td>&nbsp;</td></tr>
+    </table>
+    <input type="submit" name="approve" value="Approve CSR"/>
+    <input type="submit" name="reject" value="Reject CSR">
+</form>
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before"/>
+            </portlet:actionURL>">Cancel</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmClientCert.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmClientCert.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmClientCert.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/confirmClientCert.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,69 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<b>Issue New Certificate</b> - Step 3: Confirm and Issue Certificate
+
+<p> This screen shows the CSR details and the certificate details entered in the previous screen.  Upon clicking
+the <i>Issue Certificate</i> button, a certificate will be issued and stored.  The next screen will show the
+details of the certificate issued.</p>
+
+<jsp:include page="_header.jsp" />
+
+<form name="<portlet:namespace/>confirmClientCertForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="confirmClientCert-after"/>
+    <input type="hidden" name="pkcs10certreq" value="${pkcs10certreq}"/>
+    <input type="hidden" name="requestId" value="${requestId}"/>
+    <table border="0">
+        <tr>
+            <th class="DarkBackground" colspan="2" align="left">Certificate Requestor Details</th>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Subject:</th>
+            <td class="LightBackground">
+                <input type="hidden" name="subject" value="${subject}" /> ${subject}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Public Key:</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="publickey" value="${publickey}" /><pre> ${publickey} </pre>
+            </td>
+        </tr>
+        <tr><td>&nbsp;</td></tr>
+    </table>
+    <table border="0">
+        <tr>
+            <th class="DarkBackground" colspan="2" align="left">Details of the Certificate to be issued</th>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Certificate Serial Number:</th>
+            <td class="LightBackground">
+                <input type="hidden" name="sNo" value="${sNo}" /> ${sNo}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Valid From Date (mm/dd/yyyy):</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="validFrom" value="${validFrom}" /> ${validFrom}
+            </td>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Valid To Date (mm/dd/yyyy):</th>
+            <td class="LightBackground">
+                <input type="hidden" name="validTo" value="${validTo}" /> ${validTo}
+            </td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Signature Algorithm:</th>
+            <td class="MediumBackground">
+                <input type="hidden" name="algorithm" value="${algorithm}" /> ${algorithm}
+            </td>
+        </tr>
+    </table>
+    <input type="submit" value="Issue Certificate" />
+</form>
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before"/>
+            </portlet:actionURL>">Cancel</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/index.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/index.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/index.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/index.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,58 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<p>This portlet allows you to setup a Certification Authority (CA) and issue certificates in reply to
+Certificate Signing Requests (CSRs).  <i>Setup Certification Authority</i> function allows to initialize
+the CA by providing CA Identity details, algorithm parameters for CA's key pair and self-signed certificate
+and a password to protect the CA's private key.  This password is to be used to unlock the CA to access CA
+functions.
+Once the CA is initialized, CSRs can be processed using <i>Issue New Certificate</i> function.  Previously
+issued certificates can be viewed using <i>View Issued Certificate</i> function.
+</p>
+
+<jsp:include page="_header.jsp" />
+
+<c:choose>
+  <c:when test="${caNotSetup}">
+    <!-- CA needs initialization -->
+    <p>CA is not running or the CA may not have been initialized.  Please initialize the CA using the link provided below.
+    <table border="0">
+      <tr>
+        <td><a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="setupCA-before" /></portlet:actionURL>">Setup Certification Authority</a> </td>
+      </tr>
+    </table>
+  </c:when>
+  <c:otherwise>
+    <!-- CA is ready for use -->
+    <p>CA has been initialized.
+    <c:choose>
+      <c:when test="${caLocked}">
+        But, the CA is locked.  Please unlock the CA to access CA functions.
+        <table border="0">
+        <tr>
+          <td><a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="unlockCA-before" /></portlet:actionURL>">Unlock CA</a> </td>
+        </tr>
+        </table>
+      </c:when>
+      <c:otherwise>
+        CA functions can be accessed using the links provided below.
+        <table border="0">
+        <tr>
+          <td>&nbsp;<a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="index-after" /><portlet:param name="lock" value="lock" /></portlet:actionURL>">Lock CA</a> &nbsp;</td>
+          <td>&nbsp;<a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="caDetails-before" /></portlet:actionURL>">View CA Details</a> &nbsp;</td>
+          <td>&nbsp;<a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="index-after" /><portlet:param name="publish" value="publish" /></portlet:actionURL>">Publish CA Certificate</a> &nbsp;</td>
+          <td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td>&nbsp;<a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="listRequestsVerify-before" /></portlet:actionURL>">Requests to be verified</a>&nbsp;</td>
+          <td>&nbsp;<a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="listRequestsIssue-before" /></portlet:actionURL>">Requests to be fulfilled</a>&nbsp;</td>
+          <td>&nbsp;<a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="processCSR-before" /></portlet:actionURL>">Issue New Certificate</a> &nbsp;</td>
+          <td>&nbsp;<a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="viewCert-before" /></portlet:actionURL>">View Issued Certificate</a> &nbsp;</td>
+        </tr>
+        </table>
+      </c:otherwise>
+    </c:choose>
+  </c:otherwise>
+</c:choose>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/listRequestsIssue.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/listRequestsIssue.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/listRequestsIssue.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/listRequestsIssue.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,46 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<b>Certificate Requests awaiting fulfillment</b>
+
+<p> This screen shows the certificate requests waiting to be fulfilled.</p>
+
+<jsp:include page="_header.jsp" />
+
+<table border="0">
+    <tr>
+        <th class="DarkBackground" align="left">Certificate Requests</th>
+    </tr>
+  <c:choose>
+    <c:when test="${!empty(csrIds)}">
+      <c:set var="backgroundClass" value='MediumBackground'/>
+      <c:forEach items="${csrIds}" var="csrId">
+        <c:choose>
+            <c:when test="${backgroundClass == 'MediumBackground'}" >
+                <c:set var="backgroundClass" value='LightBackground'/>
+            </c:when>
+            <c:otherwise>
+                <c:set var="backgroundClass" value='MediumBackground'/>
+            </c:otherwise>
+        </c:choose>
+        <tr>
+          <td class="${backgroundClass}">
+            <a href="<portlet:actionURL portletMode="view">
+                       <portlet:param name="mode" value="listRequestsIssue-after"/>
+                       <portlet:param name="requestId" value="${csrId}"/>
+                     </portlet:actionURL>">${csrId}</a>
+          </td>
+        </tr>
+      </c:forEach>
+    </c:when>
+    <c:otherwise>
+        <tr>
+          <td>There are no requests.</td>
+        </tr>
+    </c:otherwise>
+  </c:choose>
+</table>
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Back to CA home</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/listRequestsVerify.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/listRequestsVerify.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/listRequestsVerify.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/listRequestsVerify.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,46 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<b>Certificate Requests awaiting verification</b>
+
+<p> This screen shows the certificate requests waiting for verification.</p>
+
+<jsp:include page="_header.jsp" />
+
+<table border="0">
+    <tr>
+        <th class="DarkBackground" align="left">Certificate Requests</th>
+    </tr>
+  <c:choose>
+    <c:when test="${!empty(csrIds)}">
+      <c:set var="backgroundClass" value='MediumBackground'/>
+      <c:forEach items="${csrIds}" var="csrId">
+        <c:choose>
+            <c:when test="${backgroundClass == 'MediumBackground'}" >
+                <c:set var="backgroundClass" value='LightBackground'/>
+            </c:when>
+            <c:otherwise>
+                <c:set var="backgroundClass" value='MediumBackground'/>
+            </c:otherwise>
+        </c:choose>
+        <tr>
+          <td class="${backgroundClass}">
+            <a href="<portlet:actionURL portletMode="view">
+                       <portlet:param name="mode" value="listRequestsVerify-after"/>
+                       <portlet:param name="requestId" value="${csrId}"/>
+                    </portlet:actionURL>">${csrId}</a>
+          </td>
+        </tr>
+      </c:forEach>
+      </c:when>
+    <c:otherwise>
+        <tr>
+          <td>There are no requests.</td>
+        </tr>
+    </c:otherwise>
+  </c:choose>
+</table>
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Back to CA home</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/processCSR.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/processCSR.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/processCSR.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/processCSR.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,45 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<script language="JavaScript">
+var <portlet:namespace/>formName = "<portlet:namespace/>ProcessCSRForm";
+var <portlet:namespace/>requiredFields = new Array("pkcs10certreq");
+
+function <portlet:namespace/>validateForm(){
+    if(!textElementsNotEmpty(<portlet:namespace/>formName,<portlet:namespace/>requiredFields))
+        return false;
+    return true;
+}
+</script>
+
+<b>Issue New Certificate</b> - Step 1: Process Certificate Signing Request (CSR)
+
+<p>This screen lets you process Certificate Signing Request (CSR) text and view the details
+of the requestor.  Paste the content of CSR text file you received from the requestor and click on
+<i>Process CSR</i> button.  The next screen will show the details of the requestor and allow you
+to input information required to issue a certificate.</p>
+
+<jsp:include page="_header.jsp" />
+
+<form name="<portlet:namespace/>ProcessCSRForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="processCSR-after" />
+    <table border="0">
+        <tr>
+            <th colspan="2" align="left">CSR Text</th>
+        </tr>
+        <tr>
+            <td colspan="2">
+                <textarea rows="20" cols="80" name="pkcs10certreq">
+                ...paste pkcs10 encoded certificate request here...
+                </textarea>
+            </td>
+        </tr>
+    </table>
+    <input type="submit" value="Process CSR" onClick="return <portlet:namespace/>validateForm();"/>
+    <input type="reset" name="reset" value="Reset">
+</form>
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before"/>
+            </portlet:actionURL>">Cancel</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/setupCA.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/setupCA.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/setupCA.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/setupCA.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,170 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<script language="JavaScript">
+var <portlet:namespace/>formName = "<portlet:namespace/>CADetailsForm";
+var <portlet:namespace/>requiredFields = new Array("caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "password", "validFrom", "validTo");
+var <portlet:namespace/>numericFields = new Array("sNo");
+var <portlet:namespace/>dateFields = new Array("validFrom", "validTo")
+
+function <portlet:namespace/>validateForm(){
+    if(!textElementsNotEmpty(<portlet:namespace/>formName,<portlet:namespace/>requiredFields))
+        return false;
+    for(i in <portlet:namespace/>numericFields) {
+        if(!checkIntegral(<portlet:namespace/>formName, <portlet:namespace/>numericFields[i]))
+            return false;
+    }
+    for(i in <portlet:namespace/>dateFields) {
+        if(!checkDateMMDDYYYY(<portlet:namespace/>formName, <portlet:namespace/>dateFields[i]))
+            return false;
+    }
+    // Check if from date is before to date
+    var fromDate = new Date(document.forms[<portlet:namespace/>formName].validFrom.value);
+    var toDate = new Date(document.forms[<portlet:namespace/>formName].validTo.value);
+    if(fromDate >= toDate) {
+        alert('validFrom date must be before validTo date');
+        return false;
+    }
+    // Check if password and confirm password match
+    if(document.forms[<portlet:namespace/>formName].password.value != document.forms[<portlet:namespace/>formName].confirm.value) {
+        alert('password and confirm password do not match.');
+        document.forms[<portlet:namespace/>formName].password.focus();
+        return false;
+    }
+    return true;
+}
+</script>
+
+<b>Setup Certification Authority</b> - Step 1: Enter CA details
+
+<p>On this screen you can enter the Certification Authority (CA) details, algorithm parameters
+for CA's keypair, algorithm for CA's self signed certificate and a password to protect
+the CA's private key. The next screen will let you review this information before
+generating the CA's keypair and self-signed certificate.</p>
+
+<jsp:include page="_header.jsp"/>
+
+<form name="<portlet:namespace/>CADetailsForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="setupCA-after"/>
+    <table border="0">
+        <tr>
+            <th colspan="2" align="left">Certification Authority's Identity</th>
+        </tr>
+        <tr>
+            <th align="right">Common Name (CN):</th>
+            <td>
+                <input type="text" name="caCN" size="20" maxlength="200" value="${caCN}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Division/Business Unit (OU):</th>
+            <td>
+                <input type="text" name="caOU" size="20" maxlength="200" value="${caOU}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Company/Organization (O):</th>
+            <td>
+                <input type="text" name="caO" size="20" maxlength="200" value="${caO}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">City/Locality (L):</th>
+            <td>
+                <input type="text" name="caL" size="20" maxlength="200" value="${caL}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">State/Province (ST):</th>
+            <td>
+                <input type="text" name="caST" size="20" maxlength="200" value="${caST}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Country Code (2 char) (C):</th>
+            <td>
+                <input type="text" name="caC" size="3" maxlength="2" value="${caC}"/>
+            </td>
+        </tr>
+        <tr><td>&nbsp;</td></tr>
+        <tr>
+            <th colspan="2" align="left">Key Details</th>
+        </tr>
+        <tr>
+            <th align="right">Alias:</th>
+            <td>
+                <input type="text" name="alias" size="20" maxlength="100" value="${alias}"/>
+            </td>
+        </tr>
+
+        <tr>
+            <th align="right">Key Algorithm:</th>
+            <td>
+                <select name="keyAlgorithm">
+                    <option <c:if test="${keyAlgorithm eq 'RSA' || keyAlgorithm eq '' || empty(keyAlgorithm)}">selected</c:if> >RSA</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Key Size:</th>
+            <td>
+                <select name="keySize">
+                    <option <c:if test="${keySize eq '512'}">selected</c:if> >512</option>
+                    <option <c:if test="${keySize eq '1024' || keySize eq '' || empty(keySize)}">selected</c:if> >1024</option>
+                    <option <c:if test="${keySize eq '2048'}">selected</c:if> >2048</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Password:</th>
+            <td>
+                <input type="password" name="password" size="20" maxlength="200"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Confirm Password:</th>
+            <td>
+                <input type="password" name="confirm" size="20" maxlength="200"/>
+            </td>
+        </tr>
+        <tr><td>&nbsp</td></tr>
+        <tr>
+            <th colspan="2" align="left">Certificate Details</th>
+        </tr>
+        <tr>
+            <th align="right">Certificate Serial Number:</th>
+            <td>
+                <input type="text" name="sNo" size="20" maxlength="200" value="${sNo}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Valid From Date(mm/dd/yyyy):</th>
+            <td>
+                <input type="text" name="validFrom" size="20" maxlength="200" value="${validFrom}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Valid To Date(mm/dd/yyyy):</th>
+            <td>
+                <input type="text" name="validTo" size="20" maxlength="200" value="${validTo}"/>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Signature Algorithm:</th>
+            <td>
+                <select name="algorithm">
+                    <option <c:if test="${algorithm eq 'MD2withRSA'}">selected</c:if> >MD2withRSA</option>
+                    <option <c:if test="${algorithm eq 'MD5withRSA' || algorithm eq '' || empty(algorithm)}">selected</c:if> >MD5withRSA</option>
+                    <option <c:if test="${algorithm eq 'SHA1withRSA'}">selected</c:if> >SHA1withRSA</option>
+                </select>
+            </td>
+        </tr>
+    </table>
+    <input type="submit" value="Review CA Details" onClick="return <portlet:namespace/>validateForm();"/>
+    <input type="reset" name="reset" value="Reset">
+</form>
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before"/>
+            </portlet:actionURL>">Cancel</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/unlockCA.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/unlockCA.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/unlockCA.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/unlockCA.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,34 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<script language="JavaScript">
+var <portlet:namespace/>formName = "<portlet:namespace/>UnlockCAForm";
+var <portlet:namespace/>requiredFields = new Array("password");
+
+function <portlet:namespace/>validateForm(){
+    if(!textElementsNotEmpty(<portlet:namespace/>formName,<portlet:namespace/>requiredFields))
+        return false;
+    return true;
+}
+</script>
+<b>Unlock Certification Authority</b>
+
+<p> This screen lets you unlock the CA by providing the password used to protect
+the CA's private key.  Once unlocked, the CA functions will be available.</p>
+
+<jsp:include page="_header.jsp" />
+
+<form name="<portlet:namespace/>UnlockCAForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="unlockCA-after" />
+    <b>Enter the CA's private key password:</b>
+    <input type="password" name="password" size="20" maxlength="200" />
+    <br />
+
+    <input type="submit" value="Unlock Certification Authority" onClick="return <portlet:namespace/>validateForm();"/>
+    <input type="reset" name="reset" value="Reset">
+</form>
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Cancel</a></p>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/viewCertificate.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/viewCertificate.jsp?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/viewCertificate.jsp (added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ca/viewCertificate.jsp Fri Nov 17 09:48:02 2006
@@ -0,0 +1,151 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<script language="JavaScript">
+var <portlet:namespace/>formName = "<portlet:namespace/>sNoForm";
+var <portlet:namespace/>requiredFields = new Array("sNo");
+
+function <portlet:namespace/>validateForm(){
+    for(i in <portlet:namespace/>numericFields) {
+        if(!checkIntegral(<portlet:namespace/>formName, <portlet:namespace/>numericFields[i]))
+            return false;
+    }
+    return true;
+}
+</script>
+
+<b>View Certificate</b>
+
+<jsp:include page="_header.jsp" />
+
+<c:choose>
+  <c:when test="${empty(sNo)}">
+    <!-- No serial number was received to show a certificate -->
+    <p>Enter the serial number of the certificate to be viewed and click on <i>View Certificate</i> button.</p>
+    <form name="<portlet:namespace/>sNoForm" action="<portlet:actionURL/>">
+      <input type="hidden" name="mode" value="viewCert-before" />
+      <table border="0">
+        <tr>
+            <th align="right">Certificate Serial Number.:</th>
+            <td>
+                <input type="text" name="sNo" size="20" maxlength="200" />
+            </td>
+        </tr>
+      </table>
+      <input type="submit" value="View Certificate" onClick="return <portlet:namespace/>validateForm();"/>
+      <input type="reset" name="reset" value="Reset">
+    </form>
+  </c:when>
+  <c:otherwise>
+    <p> This screen shows the details of a certificate issued by the CA.  The base64 encoded certificate text
+    should be sent to the requestor as a reply to their Certificate Signing Request (CSR).</p>
+    <table border="0">
+        <tr>
+            <th class="DarkBackground" colspan="2" align="left">Certificate Details</th>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Version:</th>
+            <td class="LightBackground">${cert.version}</td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Subject:</th>
+            <td class="MediumBackground">${cert.subjectDN.name}</td>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Issuer:</th>
+            <td class="LightBackground">${cert.issuerDN.name}</td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Serial Number:</th>
+            <td class="MediumBackground">${cert.serialNumber}</td>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Valid From:</th>
+            <td class="LightBackground">${cert.notBefore}</td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Valid To:</th>
+            <td class="MediumBackground">${cert.notAfter}</td>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Signature Alg:</th>
+            <td class="LightBackground">${cert.sigAlgName}</td>
+        </tr>
+        <tr>
+            <th class="MediumBackground" align="right">Public Key Alg:</th>
+            <td class="MediumBackground">${cert.publicKey.algorithm}</td>
+        </tr>
+        <tr>
+            <th class="LightBackground" align="right">Key Size:</th>
+            <td class="LightBackground">${keySize}</td>
+        </tr>
+  <c:set var="backgroundClass" value='LightBackground'/> <!-- This should be set from the row above. -->
+  <c:forEach items="${cert.criticalExtensionOIDs}" var="extoid">
+        <c:choose>
+            <c:when test="${backgroundClass == 'MediumBackground'}" >
+                <c:set var="backgroundClass" value='LightBackground'/>
+            </c:when>
+            <c:otherwise>
+                <c:set var="backgroundClass" value='MediumBackground'/>
+            </c:otherwise>
+        </c:choose>
+        <tr>
+            <th class="${backgroundClass}" align="right">critical ext: </th>
+            <td class="${backgroundClass}">${extoid}</td>
+        </tr>
+  </c:forEach>
+  <c:forEach items="${cert.nonCriticalExtensionOIDs}" var="extoid">
+        <c:choose>
+            <c:when test="${backgroundClass == 'MediumBackground'}" >
+                <c:set var="backgroundClass" value='LightBackground'/>
+            </c:when>
+            <c:otherwise>
+                <c:set var="backgroundClass" value='MediumBackground'/>
+            </c:otherwise>
+        </c:choose>
+        <tr>
+            <th class="${backgroundClass}" align="right">non-critical ext: </th>
+            <td class="${backgroundClass}">${extoid}</td>
+        </tr>
+  </c:forEach>
+        <c:choose>
+            <c:when test="${backgroundClass == 'MediumBackground'}" >
+                <c:set var="backgroundClass" value='LightBackground'/>
+            </c:when>
+            <c:otherwise>
+                <c:set var="backgroundClass" value='MediumBackground'/>
+            </c:otherwise>
+        </c:choose>
+        <tr>
+            <th class="${backgroundClass}" align="right">Finger prints:</th>
+            <td class="${backgroundClass}">
+  <c:forEach items="${fingerPrints}" var="fp">
+                ${fp.key} = &nbsp; ${fp.value} <br/>
+  </c:forEach>
+            </td>
+        </tr>
+        <tr><td>&nbsp;</td></tr>
+        <tr>
+            <th colspan="2" align="left">Base64 encoded Certificate Text</th>
+        </tr>
+        <tr>
+            <td colspan="2">
+                <form><textarea rows="15" cols="80" READONLY>${certText}</textarea></form>
+            </td>
+        </tr>
+    </table>
+</c:otherwise>
+</c:choose>
+<c:choose>
+  <c:when test="${linkToListRequests}">
+    <p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="listRequestsIssue-before" />
+            </portlet:actionURL>">Back to Requests to be fulfilled</a></p>
+  </c:when>
+  <c:otherwise>
+    <p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Back to CA home</a></p>
+  </c:otherwise>
+</c:choose>

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/web.xml?view=diff&rev=476229&r1=476228&r2=476229
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/web.xml (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/web.xml Fri Nov 17 09:48:02 2006
@@ -244,6 +244,19 @@
             <param-value>console-standard.Keystores</param-value>
         </init-param>
     </servlet>
+    <servlet>
+        <display-name>Pluto Wrapper for Certification Authority Portlet</display-name>
+        <servlet-name>CertificationAuthority</servlet-name>
+        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
+        <init-param>
+            <param-name>portlet-class</param-name>
+            <param-value>org.apache.geronimo.console.ca.CertificationAuthorityPortlet</param-value>
+        </init-param>
+        <init-param>
+            <param-name>portlet-guid</param-name>
+            <param-value>console-standard.CertificationAuthority</param-value>
+        </init-param>
+    </servlet>
 
 
     <servlet>
@@ -888,6 +901,10 @@
     <servlet-mapping>
         <servlet-name>Keystores</servlet-name>
         <url-pattern>/Keystores/*</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>CertificationAuthority</servlet-name>
+        <url-pattern>/CertificationAuthority/*</url-pattern>
     </servlet-mapping>
 
 

Added: geronimo/server/trunk/applications/geronimo-ca-helper/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/geronimo-ca-helper/LICENSE.txt?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/geronimo-ca-helper/LICENSE.txt (added)
+++ geronimo/server/trunk/applications/geronimo-ca-helper/LICENSE.txt Fri Nov 17 09:48:02 2006
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+

Added: geronimo/server/trunk/applications/geronimo-ca-helper/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/geronimo-ca-helper/NOTICE.txt?view=auto&rev=476229
==============================================================================
--- geronimo/server/trunk/applications/geronimo-ca-helper/NOTICE.txt (added)
+++ geronimo/server/trunk/applications/geronimo-ca-helper/NOTICE.txt Fri Nov 17 09:48:02 2006
@@ -0,0 +1,6 @@
+Apache Geronimo
+Copyright 2006-2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+



Mime
View raw message