Commit 15412cb3 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Improved table that shows installed certificates.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3277 b35dd754-fafc-0310-a699-88a17e54d16e
parent afb6603d
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
<%@ page import="org.jivesoftware.wildfire.XMPPServer"%> <%@ page import="org.jivesoftware.wildfire.XMPPServer"%>
<%@ page import="org.jivesoftware.wildfire.ConnectionManager"%> <%@ page import="org.jivesoftware.wildfire.ConnectionManager"%>
<%@ page import="org.jivesoftware.wildfire.Connection"%> <%@ page import="org.jivesoftware.wildfire.Connection"%>
<%@ page import="java.security.cert.X509Certificate"%>
<%@ page import="org.jivesoftware.wildfire.net.TLSStreamHandler"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
...@@ -540,7 +542,10 @@ ...@@ -540,7 +542,10 @@
<fmt:message key="ssl.settings.alias" /> <fmt:message key="ssl.settings.alias" />
</th> </th>
<th> <th>
<fmt:message key="ssl.settings.type" /> <fmt:message key="ssl.settings.expiration" />
</th>
<th>
<fmt:message key="ssl.settings.self-signed" />
</th> </th>
<th> <th>
<fmt:message key="ssl.settings.publickey" /> <fmt:message key="ssl.settings.publickey" />
...@@ -556,15 +561,29 @@ ...@@ -556,15 +561,29 @@
for (Enumeration aliases=keyStore.aliases(); aliases.hasMoreElements();) { for (Enumeration aliases=keyStore.aliases(); aliases.hasMoreElements();) {
i++; i++;
String a = (String)aliases.nextElement(); String a = (String)aliases.nextElement();
Certificate c = keyStore.getCertificate(a); X509Certificate c = (X509Certificate) keyStore.getCertificate(a);
%> %>
<tr valign="top"> <tr valign="top">
<td id="rs<%=i%>" width="1" rowspan="1"><%= (i) %>.</td> <td id="rs<%=i%>" width="1" rowspan="1"><%= (i) %>.</td>
<td width="29%"> <td>
<%= a %> <%= TLSStreamHandler.getPeerIdentity(c) %> (<%= a %>)
</td>
<td>
<% boolean expired = c.getNotAfter().before(new Date());
if (expired) { %>
<font color="red">
<% } %>
<%= JiveGlobals.formatDateTime(c.getNotAfter()) %>
<% if (expired) { %>
</font>
<% } %>
</td> </td>
<td width="67%"> <td width="1">
<%= c.getType() %> <% if (c.getSubjectDN().equals(c.getIssuerDN())) { %>
<fmt:message key="global.yes" />
<% } else { %>
<fmt:message key="global.no" />
<% } %>
</td> </td>
<td width="2%"> <td width="2%">
<a href="javascript:togglePublicKey('pk<%=i%>', 'rs<%=i%>');" title="<fmt:message key="ssl.settings.publickey.title" />"><fmt:message key="ssl.settings.publickey.label" /></a> <a href="javascript:togglePublicKey('pk<%=i%>', 'rs<%=i%>');" title="<fmt:message key="ssl.settings.publickey.title" />"><fmt:message key="ssl.settings.publickey.label" /></a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment