Commit 953b85af authored by Guus der Kinderen's avatar Guus der Kinderen

Removing pages that were replaced.

parent cf815ecb
<%--
- $RCSfile$
- $Revision$
- $Date$
-
- Copyright (C) 2004-2010 Jive Software. All rights reserved.
-
- 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.
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page import="org.jivesoftware.util.JiveGlobals,
org.jivesoftware.openfire.XMPPServer,
org.jivesoftware.util.ParamUtils,
org.jivesoftware.openfire.ConnectionManager,
java.util.Collection"
errorPage="error.jsp"
%>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Map" %>
<%@ page import="org.jivesoftware.openfire.session.ConnectionSettings" %>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<% webManager.init(request, response, session, application, out ); %>
<html>
<head>
<title><fmt:message key="client.connections.settings.title"/></title>
<meta name="pageID" content="client-connections-settings"/>
</head>
<body>
<% // Get parameters
int port = ParamUtils.getIntParameter(request, "port", -1);
int sslPort = ParamUtils.getIntParameter(request, "sslPort", -1);
int clientIdle = 1000* ParamUtils.getIntParameter(request, "clientIdle", -1);
boolean idleDisco = ParamUtils.getBooleanParameter(request, "idleDisco");
boolean pingIdleClients = ParamUtils.getBooleanParameter(request, "pingIdleClients");
boolean sslEnabled = ParamUtils.getBooleanParameter(request, "sslEnabled");
boolean save = request.getParameter("update") != null;
boolean defaults = request.getParameter("defaults") != null;
if (defaults) {
port = ConnectionManager.DEFAULT_PORT;
sslPort = ConnectionManager.DEFAULT_SSL_PORT;
clientIdle = 6*60*1000;
pingIdleClients = true;
sslEnabled = true;
save = true;
}
final ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
final Map<String, String> errors = new HashMap<String, String>();
if (save) {
if (port < 1) {
errors.put("port", "");
}
if (sslPort < 1 && sslEnabled) {
errors.put("sslPort", "");
}
if (port > 0 && sslPort > 0) {
if (port == sslPort) {
errors.put("portsEqual", "");
}
}
if (idleDisco && clientIdle <= 0) {
errors.put("clientIdle", "");
}
if (errors.size() == 0) {
connectionManager.setClientListenerPort(port);
connectionManager.enableClientSSLListener(sslEnabled);
connectionManager.setClientSSLListenerPort(sslPort);
// Log the event
webManager.logEvent("edit client connections settings", "port = "+port+"\nsslPort = "+sslPort);
response.sendRedirect("client-connections-settings.jsp?success=true");
if (!idleDisco) {
JiveGlobals.setProperty(ConnectionSettings.Client.IDLE_TIMEOUT, "-1");
} else {
JiveGlobals.setProperty(ConnectionSettings.Client.IDLE_TIMEOUT, String.valueOf(clientIdle));
}
JiveGlobals.setProperty(ConnectionSettings.Client.KEEP_ALIVE_PING, String.valueOf(pingIdleClients));
// Log the events
webManager.logEvent("set server property " + ConnectionSettings.Client.IDLE_TIMEOUT,
ConnectionSettings.Client.IDLE_TIMEOUT + " = " + clientIdle);
webManager.logEvent("set server property " + ConnectionSettings.Client.KEEP_ALIVE_PING
, ConnectionSettings.Client.KEEP_ALIVE_PING + " = " + pingIdleClients);
return;
}
} else {
sslEnabled = connectionManager.isClientSSLListenerEnabled();
port = connectionManager.getClientListenerPort();
sslPort = connectionManager.getClientSSLListenerPort();
clientIdle = JiveGlobals.getIntProperty(ConnectionSettings.Client.IDLE_TIMEOUT, 6*60*1000);
pingIdleClients = JiveGlobals.getBooleanProperty(ConnectionSettings.Client.KEEP_ALIVE_PING, true);
}
%>
<p>
<fmt:message key="client.connections.settings.info">
<fmt:param value="<a href=\"session-summary.jsp\">" />
<fmt:param value="</a>" />
</fmt:message>
</p>
<% if ("true".equals(request.getParameter("success"))) { %>
<div class="jive-success">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr><td class="jive-icon"><img src="images/success-16x16.gif" width="16" height="16" border="0" alt=""></td>
<td class="jive-icon-label">
<fmt:message key="client.connections.settings.confirm.updated" />
</td></tr>
</tbody>
</table>
</div><br>
<% } %>
<form action="client-connections-settings.jsp" method="post" name="editform">
<!-- BEGIN 'Client ports' -->
<div class="jive-contentBoxHeader">
<fmt:message key="client.connections.settings.ports.title" />
</div>
<div class="jive-contentBox">
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr valign="top">
<td width="1%" nowrap class="c1">
<fmt:message key="server.props.port" />
</td>
<td width="99%">
<input type="text" name="port" value="<%= (port > 0 ? String.valueOf(port) : "") %>"
size="5" maxlength="5">
<% if (errors.containsKey("port")) { %>
<br>
<span class="jive-error-text">
<fmt:message key="server.props.valid_port" />
<a href="#" onclick="document.editform.port.value='<%=ConnectionManager.DEFAULT_PORT%>';"
><fmt:message key="server.props.valid_port1" /></a>.
</span>
<% } else if (errors.containsKey("portsEqual")) { %>
<br>
<span class="jive-error-text">
<fmt:message key="server.props.error_port" />
</span>
<% } %>
</td>
</tr>
<tr valign="top">
<td width="1%" nowrap class="c1">
<fmt:message key="server.props.ssl" />
</td>
<td width="99%">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td>
<input type="radio" name="sslEnabled" value="true" <%= (sslEnabled ? "checked" : "") %>
id="SSL01">
</td>
<td><label for="SSL01"><fmt:message key="server.props.enable" /></label></td>
</tr>
<tr>
<td>
<input type="radio" name="sslEnabled" value="false" <%= (!sslEnabled ? "checked" : "") %>
id="SSL02">
</td>
<td><label for="SSL02"><fmt:message key="server.props.disable" /></label></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr valign="top">
<td width="1%" nowrap class="c1">
<fmt:message key="server.props.ssl_port" />
</td>
<td width="99%">
<input type="text" name="sslPort" value="<%= (sslPort > 0 ? String.valueOf(sslPort) : "") %>"
size="5" maxlength="5">
<% if (errors.containsKey("sslPort")) { %>
<br>
<span class="jive-error-text">
<fmt:message key="server.props.ssl_valid" />
<a href="#" onclick="document.editform.sslPort.value='<%=ConnectionManager.DEFAULT_SSL_PORT%>';"
><fmt:message key="server.props.ssl_valid1" /></a>.
</span>
<% } %>
</td>
</tr>
</tbody>
</table>
</div>
<!-- END 'Client Ports' -->
<br />
<!-- BEGIN 'Idle Connection Policy' -->
<div class="jive-contentBoxHeader">
<fmt:message key="client.connections.settings.idle.title" />
</div>
<div class="jive-contentBox">
<p><fmt:message key="client.connections.settings.idle.info" /></p>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr valign="top">
<td width="1%" nowrap class="c1">
<input type="radio" name="idleDisco" value="false" <%= (clientIdle <= 0 ? "checked" : "") %>
id="IDL01">
</td>
<td width="99%"><label for="IDL01"><fmt:message key="client.connections.settings.idle.disable" /></label></td>
</tr>
<tr valign="top">
<td width="1%" nowrap class="c1">
<input type="radio" name="idleDisco" value="true" <%= (clientIdle > 0 ? "checked" : "") %>
id="IDL02">
</td>
<td width="99%">
<label for="IDL02"><fmt:message key="client.connections.settings.idle.enable" /></label>
<br />
<input type="text" name="clientIdle" value="<%= (clientIdle > 0 ? String.valueOf((clientIdle/1000)) : "") %>"
size="5" maxlength="5">&nbsp;<fmt:message key="global.seconds" />.
<% if (errors.containsKey("clientIdle")) { %>
<br>
<span class="jive-error-text">
<fmt:message key="client.connections.settings.idle.valid_timeout" />.
</span>
<% } %>
</td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td>&nbsp;</td>
<td>
<p><fmt:message key="client.connections.settings.ping.info" />
<fmt:message key="client.connections.settings.ping.footnote" /></p>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr valign="top">
<td width="1%" nowrap class="c1">
<input type="radio" name="pingIdleClients" value="true" <%= (pingIdleClients ? "checked" : "") %>
id="PNG01">
</td>
<td width="99%"><label for="PNG01"><fmt:message key="client.connections.settings.ping.enable" /></label></td>
</tr>
<tr valign="top">
<td width="1%" nowrap class="c1">
<input type="radio" name="pingIdleClients" value="false" <%= (!pingIdleClients ? "checked" : "") %>
id="PNG02">
</td>
<td width="99%"><label for="PNG02"><fmt:message key="client.connections.settings.ping.disable" /></label></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!-- END 'Idle Connection Policy' -->
<input type="submit" name="update" value="<fmt:message key="global.save_settings" />">
<input type="submit" name="defaults" value="<fmt:message key="global.restore_defaults" />">
</form>
</body>
</html>
<%--
- $Revision$
- $Date$
-
- Copyright (C) 2004-2008 Jive Software. All rights reserved.
-
- 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.
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page import="org.jivesoftware.util.*,
java.util.Iterator,
org.jivesoftware.openfire.*,
java.util.*,
org.jivesoftware.openfire.server.RemoteServerManager,
org.jivesoftware.openfire.server.RemoteServerConfiguration"
errorPage="error.jsp"
%>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<% webManager.init(request, response, session, application, out ); %>
<% // Get parameters
boolean update = request.getParameter("update") != null;
boolean s2sEnabled = ParamUtils.getBooleanParameter(request,"s2sEnabled");
int port = ParamUtils.getIntParameter(request,"port", 0);
boolean closeEnabled = ParamUtils.getBooleanParameter(request,"closeEnabled");
String idletime = ParamUtils.getParameter(request,"idletime");
boolean closeSettings = request.getParameter("closeSettings") != null;
boolean closeSettingsSuccess = request.getParameter("closeSettingsSuccess") != null;
boolean permissionUpdate = request.getParameter("permissionUpdate") != null;
String permissionFilter = ParamUtils.getParameter(request,"permissionFilter");
String configToDelete = ParamUtils.getParameter(request,"deleteConf");
boolean serverAllowed = request.getParameter("serverAllowed") != null;
boolean serverBlocked = request.getParameter("serverBlocked") != null;
String domain = ParamUtils.getParameter(request,"domain");
String remotePort = ParamUtils.getParameter(request,"remotePort");
boolean updateSucess = false;
boolean allowSuccess = false;
boolean blockSuccess = false;
boolean deleteSuccess = false;
// Get muc server
SessionManager sessionManager = webManager.getSessionManager();
ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
Map<String, String> errors = new HashMap<String, String>();
if (update) {
// Validate params
if (s2sEnabled) {
if (port <= 0) {
errors.put("port","");
}
}
// If no errors, continue:
if (errors.isEmpty()) {
if (!s2sEnabled) {
connectionManager.enableServerListener(false);
// Log the event
webManager.logEvent("disabled s2s", null);
}
else {
connectionManager.enableServerListener(true);
connectionManager.setServerListenerPort(port);
// Log the event
webManager.logEvent("enabled s2s", "port = "+port);
}
updateSucess = true;
}
}
// Handle an update of the kicking task settings
if (closeSettings) {
if (!closeEnabled) {
// Disable kicking users by setting a value of -1
sessionManager.setServerSessionIdleTime(-1);
// Log the event
webManager.logEvent("disabled s2s idle kick", null);
response.sendRedirect("server2server-settings.jsp?closeSettingsSuccess=true");
return;
}
// do validation
if (idletime == null) {
errors.put("idletime","idletime");
}
int idle = 0;
// Try to obtain an int from the provided strings
if (errors.size() == 0) {
try {
idle = Integer.parseInt(idletime) * 1000 * 60;
}
catch (NumberFormatException e) {
errors.put("idletime","idletime");
}
if (idle < 0) {
errors.put("idletime","idletime");
}
}
if (errors.size() == 0) {
sessionManager.setServerSessionIdleTime(idle);
// Log the event
webManager.logEvent("updated s2s idle kick timeout", "timeout = "+idle);
response.sendRedirect("server2server-settings.jsp?closeSettingsSuccess=true");
return;
}
}
if (permissionUpdate) {
RemoteServerManager.setPermissionPolicy(permissionFilter);
// Log the event
webManager.logEvent("updated s2s permission policy", "filter = "+permissionFilter);
updateSucess = true;
}
if (configToDelete != null && configToDelete.trim().length() != 0) {
RemoteServerManager.deleteConfiguration(configToDelete);
// Log the event
webManager.logEvent("deleted s2s configuration", "config to delete = "+configToDelete);
deleteSuccess = true;
}
if (serverAllowed) {
int intRemotePort = 0;
// Validate params
try {
StringUtils.validateDomainName(domain);
} catch (IllegalArgumentException iae) {
errors.put("domain", "");
}
if (remotePort == null || remotePort.trim().length() == 0 || "0".equals(remotePort)) {
errors.put("remotePort","");
}
else {
try {
intRemotePort = Integer.parseInt(remotePort);
}
catch (NumberFormatException e) {
errors.put("remotePort","");
}
}
// If no errors, continue:
if (errors.isEmpty()) {
RemoteServerConfiguration configuration = new RemoteServerConfiguration(domain);
configuration.setRemotePort(intRemotePort);
configuration.setPermission(RemoteServerConfiguration.Permission.allowed);
RemoteServerManager.allowAccess(configuration);
// Log the event
webManager.logEvent("added s2s access for "+domain, "domain = "+domain+"\nport = "+intRemotePort);
allowSuccess = true;
}
}
if (serverBlocked) {
// Validate params
try {
StringUtils.validateDomainName(domain);
} catch (IllegalArgumentException iae) {
errors.put("domain", "");
}
// If no errors, continue:
if (errors.isEmpty()) {
RemoteServerManager.blockAccess(domain);
// Log the event
webManager.logEvent("blocked s2s access for "+domain, "domain = "+domain);
blockSuccess = true;
}
}
// Set page vars
if (errors.size() == 0) {
s2sEnabled = connectionManager.isServerListenerEnabled();
port = connectionManager.getServerListenerPort();
permissionFilter = RemoteServerManager.getPermissionPolicy().toString();
domain = "";
remotePort = "0";
}
else {
if (port == 0) {
port = connectionManager.getServerListenerPort();
}
if (permissionFilter == null) {
permissionFilter = RemoteServerManager.getPermissionPolicy().toString();
}
if (domain == null) {
domain = "";
}
if (remotePort == null) {
remotePort = "0";
}
}
%>
<html>
<head>
<title><fmt:message key="server2server.settings.title"/></title>
<meta name="pageID" content="server2server-settings"/>
</head>
<body>
<p>
<fmt:message key="server2server.settings.info">
<fmt:param value="<a href='server-session-summary.jsp'>" />
<fmt:param value="</a>" />
</fmt:message>
</p>
<% if (!errors.isEmpty()) { %>
<div class="jive-error">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td class="jive-icon"><img src="images/error-16x16.gif" width="16" height="16" border="0" alt=""/></td>
<td class="jive-icon-label">
<% if (errors.get("idletime") != null) { %>
<fmt:message key="server2server.settings.valid.idle_minutes" />
<% } else if (errors.get("domain") != null) { %>
<fmt:message key="server2server.settings.valid.domain" />
<% } else if (errors.get("remotePort") != null) { %>
<fmt:message key="server2server.settings.valid.remotePort" />
<% } %>
</td>
</tr>
</tbody>
</table>
</div><br>
<% } else if (closeSettingsSuccess || updateSucess || allowSuccess || blockSuccess || deleteSuccess) { %>
<div class="jive-success">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr><td class="jive-icon"><img src="images/success-16x16.gif" width="16" height="16" border="0" alt=""></td>
<td class="jive-icon-label">
<% if (updateSucess) { %>
<fmt:message key="server2server.settings.confirm.updated" />
<% } else if (allowSuccess) { %>
<fmt:message key="server2server.settings.confirm.allowed" />
<% } else if (blockSuccess) { %>
<fmt:message key="server2server.settings.confirm.blocked" />
<% } else if (deleteSuccess) { %>
<fmt:message key="server2server.settings.confirm.deleted" />
<% } else if (closeSettingsSuccess) { %>
<fmt:message key="server2server.settings.update" />
<%
}
%>
</td></tr>
</tbody>
</table>
</div><br>
<% } %>
<!-- BEGIN 'Service Enabled' -->
<form action="server2server-settings.jsp" method="post">
<div class="jive-contentBoxHeader">
<fmt:message key="server2server.settings.enabled.legend" />
</div>
<div class="jive-contentBox">
<table cellpadding="3" cellspacing="0" border="0">
<tbody>
<tr valign="middle">
<td width="1%" nowrap>
<input type="radio" name="s2sEnabled" value="true" id="rb02"
<%= (s2sEnabled ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb02">
<b><fmt:message key="server2server.settings.label_enable" /></b> - <fmt:message key="server2server.settings.label_enable_info" />
</label> <input type="text" size="5" maxlength="10" name="port" value="<%= port %>">
</td>
</tr>
<tr valign="middle">
<td width="1%" nowrap>
<input type="radio" name="s2sEnabled" value="false" id="rb01"
<%= (!s2sEnabled ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb01">
<b><fmt:message key="server2server.settings.label_disable" /></b> - <fmt:message key="server2server.settings.label_disable_info" />
</label>
</td>
</tr>
</tbody>
</table>
<br/>
<input type="submit" name="update" value="<fmt:message key="global.save_settings" />">
</div>
</form>
<!-- END 'Service Enabled' -->
<!-- BEGIN 'Idle Connection Settings' -->
<form action="server2server-settings.jsp?closeSettings" method="post">
<div class="jive-contentBoxHeader">
<fmt:message key="server2server.settings.close_settings" />
</div>
<div class="jive-contentBox">
<table cellpadding="3" cellspacing="0" border="0">
<tbody>
<tr valign="middle">
<td width="1%" nowrap>
<input type="radio" name="closeEnabled" value="true" id="rb04"
<%= ((webManager.getSessionManager().getServerSessionIdleTime() > -1) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb04"><fmt:message key="server2server.settings.close_session" /></label>
<input type="text" name="idletime" size="5" maxlength="5"
onclick="this.form.closeEnabled[0].checked=true;"
value="<%= webManager.getSessionManager().getServerSessionIdleTime() == -1 ? 30 : webManager.getSessionManager().getServerSessionIdleTime() / 1000 / 60 %>">
<fmt:message key="global.minutes" />.
</td>
</tr>
<tr valign="middle">
<td width="1%" nowrap>
<input type="radio" name="closeEnabled" value="false" id="rb03"
<%= ((webManager.getSessionManager().getServerSessionIdleTime() < 0) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb03"><fmt:message key="server2server.settings.never_close" /></label>
</td>
</tr>
</tbody>
</table>
<br/>
<input type="submit" value="<fmt:message key="global.save_settings" />">
</div>
</form>
<!-- END 'Idle Connection Settings' -->
<!-- BEGIN 'Allowed to Connect' -->
<div class="jive-contentBoxHeader">
<fmt:message key="server2server.settings.allowed" />
</div>
<div class="jive-contentBox">
<form action="server2server-settings.jsp" method="post">
<table cellpadding="3" cellspacing="0" border="0">
<tbody>
<tr valign="top">
<td width="1%" nowrap>
<input type="radio" name="permissionFilter" value="<%= RemoteServerManager.PermissionPolicy.blacklist %>" id="rb05"
<%= (RemoteServerManager.PermissionPolicy.blacklist.toString().equals(permissionFilter) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb05">
<b><fmt:message key="server2server.settings.anyone" /></b> - <fmt:message key="server2server.settings.anyone_info" />
</label>
</td>
</tr>
<tr valign="top">
<td width="1%" nowrap>
<input type="radio" name="permissionFilter" value="<%= RemoteServerManager.PermissionPolicy.whitelist %>" id="rb06"
<%= (RemoteServerManager.PermissionPolicy.whitelist.toString().equals(permissionFilter) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb06">
<b><fmt:message key="server2server.settings.whitelist" /></b> - <fmt:message key="server2server.settings.whitelist_info" />
</label>
</td>
</tr>
</tbody>
</table>
<br/>
<input type="submit" name="permissionUpdate" value="<fmt:message key="global.save_settings" />">
<br><br>
</form>
<table class="jive-table" cellpadding="0" cellspacing="0" border="0" >
<thead>
<tr>
<th width="1%">&nbsp;</th>
<th width="50%" nowrap><fmt:message key="server2server.settings.domain" /></th>
<th width="49%" nowrap><fmt:message key="server2server.settings.remotePort" /></th>
<th width="10%" nowrap><fmt:message key="global.delete" /></th>
</tr>
</thead>
<tbody>
<% Collection<RemoteServerConfiguration> configs = RemoteServerManager.getAllowedServers();
if (configs.isEmpty()) { %>
<tr>
<td align="center" colspan="7"><fmt:message key="server2server.settings.empty_list" /></td>
</tr>
<% }
else {
int count = 1;
for (Iterator<RemoteServerConfiguration> it=configs.iterator(); it.hasNext(); count++) {
RemoteServerConfiguration configuration = it.next();
%>
<tr class="jive-<%= (((count%2)==0) ? "even" : "odd") %>">
<td>
<%= count %>
</td>
<td>
<%= configuration.getDomain() %>
</td>
<td>
<%= configuration.getRemotePort() %>
</td>
<td align="center" style="border-right:1px #ccc solid;">
<a href="#" onclick="if (confirm('<fmt:message key="server2server.settings.confirm_delete" />')) { location.replace('server2server-settings.jsp?deleteConf=<%= configuration.getDomain() %>'); } "
title="<fmt:message key="global.click_delete" />"
><img src="images/delete-16x16.gif" width="16" height="16" border="0" alt=""></a>
</td>
</tr>
<% }
}
%>
</tbody>
</table>
<br>
<table cellpadding="3" cellspacing="1" border="0" >
<form action="server2server-settings.jsp" method="post">
<tr>
<td nowrap>
<fmt:message key="server2server.settings.domain" />
<input type="text" size="40" name="domain" value="<%= serverAllowed ? domain : "" %>"/>
&nbsp;
<fmt:message key="server2server.settings.remotePort" />
<input type="text" size="5" name="remotePort"value="<%= serverAllowed ? remotePort : "5269" %>"/>
<input type="submit" name="serverAllowed" value="<fmt:message key="server2server.settings.allow" />">
</td>
</tr>
</form>
</table>
</div>
<!-- END 'Allowed to Connect' -->
<!-- BEGIN 'Not Allowed to Connect' -->
<div class="jive-contentBoxHeader">
<fmt:message key="server2server.settings.disallowed" />
</div>
<div class="jive-contentBox">
<table cellpadding="3" cellspacing="1" border="0" width="100%"><tr><td>
<fmt:message key="server2server.settings.disallowed.info" />
</td></tr></table>
<p>
<table class="jive-table" cellpadding="3" cellspacing="0" border="0" width="100%">
<thead>
<tr>
<th width="1%">&nbsp;</th>
<th width="89%" nowrap><fmt:message key="server2server.settings.domain" /></th>
<th width="10%" nowrap><fmt:message key="global.delete" /></th>
</tr>
</thead>
<tbody>
<% Collection<RemoteServerConfiguration> blockedComponents = RemoteServerManager.getBlockedServers();
if (blockedComponents.isEmpty()) { %>
<tr>
<td align="center" colspan="7"><fmt:message key="server2server.settings.empty_list" /></td>
</tr>
<% }
else {
int count = 1;
for (Iterator<RemoteServerConfiguration> it=blockedComponents.iterator(); it.hasNext(); count++) {
RemoteServerConfiguration configuration = it.next();
%>
<tr class="jive-<%= (((count%2)==0) ? "even" : "odd") %>">
<td>
<%= count %>
</td>
<td>
<%= configuration.getDomain() %>
</td>
<td align="center" style="border-right:1px #ccc solid;">
<a href="#" onclick="if (confirm('<fmt:message key="server2server.settings.confirm_delete" />')) { location.replace('server2server-settings.jsp?deleteConf=<%= configuration.getDomain() %>'); } "
title="<fmt:message key="global.click_delete" />"
><img src="images/delete-16x16.gif" width="16" height="16" border="0" alt=""></a>
</td>
</tr>
<% }
}
%>
</tbody>
</table>
<br>
<table cellpadding="3" cellspacing="1" border="0" width="100%">
<form action="server2server-settings.jsp" method="post">
<tr>
<td nowrap width="1%">
<fmt:message key="server2server.settings.domain" />
</td>
<td>
<input type="text" size="40" name="domain" value="<%= serverBlocked ? domain : "" %>"/>&nbsp;
<input type="submit" name="serverBlocked" value="<fmt:message key="server2server.settings.block" />">
</td>
</tr>
</form>
</table>
</div>
<!-- END 'Not Allowed to Connect' -->
</body>
</html>
<%--
- $Revision$
- $Date$
-
- Copyright (C) 2004-2008 Jive Software. All rights reserved.
-
- 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.
--%>
<%@ page import="org.jivesoftware.openfire.Connection,
org.jivesoftware.openfire.ConnectionManager,
org.jivesoftware.openfire.XMPPServer,
org.jivesoftware.openfire.server.ServerDialback,
org.jivesoftware.openfire.session.LocalClientSession,
org.jivesoftware.util.JiveGlobals"
errorPage="error.jsp"
%>
<%@ page import="org.jivesoftware.util.ParamUtils" %>
<%@ page import="org.jivesoftware.openfire.session.ConnectionSettings" %>
<%@ page import="org.jivesoftware.openfire.spi.ConnectionManagerImpl" %>
<%@ page import="org.jivesoftware.openfire.spi.ConnectionType" %>
<%@ page import="org.jivesoftware.openfire.spi.ConnectionListener" %>
<%@ taglib uri="admin" prefix="admin" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<% webManager.init(request, response, session, application, out ); %>
<% try { %>
<% // Get parameters:
boolean update = request.getParameter("update") != null;
boolean success = ParamUtils.getBooleanParameter(request, "success");
// Client configuration parameters
String clientSecurityRequired = ParamUtils.getParameter(request, "clientSecurityRequired");
String ssl = ParamUtils.getParameter(request, "ssl");
String tls = ParamUtils.getParameter(request, "tls");
String clientMutualAuthenticationSocket = ParamUtils.getParameter(request, "clientMutualAuthenticationSocket");
String clientMutualAuthenticationBOSH = ParamUtils.getParameter(request, "clientMutualAuthenticationBOSH");
// Server configuration parameters
String serverSecurityRequired = ParamUtils.getParameter(request, "serverSecurityRequired");
String dialback = ParamUtils.getParameter(request, "dialback");
String server_tls = ParamUtils.getParameter(request, "server_tls");
boolean selfSigned = ParamUtils.getBooleanParameter(request, "selfSigned");
final ConnectionManagerImpl connectionManager = (ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager();
final ConnectionListener clientListener = connectionManager.getListener( ConnectionType.SOCKET_C2S, false );
final ConnectionListener clientListenerSsl = connectionManager.getListener( ConnectionType.SOCKET_C2S, true );
final ConnectionListener serverListener = connectionManager.getListener( ConnectionType.SOCKET_S2S, false );
final ConnectionListener serverListenerSsl = connectionManager.getListener( ConnectionType.SOCKET_S2S, true );
if (update)
{
// Client-to-server settings
if ("req".equals(clientSecurityRequired))
{
// User selected that security is required
// Enable 5222 port and make TLS required
clientListener.setTLSPolicy( Connection.TLSPolicy.required );
clientListener.enable( true );
// Enable 5223 port (old SSL port)
clientListenerSsl.enable( true );
}
else if ("notreq".equals(clientSecurityRequired))
{
// User selected that security is NOT required
// Enable 5222 port and make TLS optional
clientListener.setTLSPolicy( Connection.TLSPolicy.optional );
clientListener.enable( true );
// Enable 5223 port (old SSL port)
clientListenerSsl.enable( true );
}
else if ("custom".equals(clientSecurityRequired))
{
// User selected custom client authentication
// Enable port 5222 and configure TLS policy
final Connection.TLSPolicy newPolicy;
if ("disabled".equals(tls)) {
newPolicy = Connection.TLSPolicy.disabled;
} else if ("optional".equals(tls)) {
newPolicy = Connection.TLSPolicy.optional;
} else {
newPolicy = Connection.TLSPolicy.required;
}
clientListener.setTLSPolicy( newPolicy );
clientListener.enable( true );
// Enable or disable 5223 port (old SSL port)
clientListenerSsl.enable( "available".equals( ssl ) );
}
// Server to Server settings
if ("req".equals(serverSecurityRequired))
{
// User selected that security for s2s is required
// Enable TLS and disable server dialback
serverListener.setTLSPolicy( Connection.TLSPolicy.required );
JiveGlobals.setProperty( ConnectionSettings.Server.TLS_ENABLED, "true" );
JiveGlobals.setProperty( ConnectionSettings.Server.DIALBACK_ENABLED, "false" );
serverListener.enable( true );
// Enable legacy SSL port
serverListenerSsl.enable( true );
}
else if ("notreq".equals(serverSecurityRequired))
{
// User selected that security for s2s is NOT required
// Enable TLS and enable server dialback
serverListener.setTLSPolicy( Connection.TLSPolicy.optional );
JiveGlobals.setProperty(ConnectionSettings.Server.TLS_ENABLED, "true");
JiveGlobals.setProperty(ConnectionSettings.Server.DIALBACK_ENABLED, "true");
serverListener.enable( true );
// Enable legacy SSL port
serverListenerSsl.enable( true );
}
else if ("custom".equals(serverSecurityRequired))
{
// User selected custom server authentication
final boolean dialbackEnabled = "available".equals(dialback);
final boolean tlsEnabled = "optional".equals(server_tls) || "required".equals(server_tls);
if (dialbackEnabled || tlsEnabled)
{
// Enable or disable TLS for s2s connections
final Connection.TLSPolicy newPolicy;
if ("disabled".equals(server_tls)) {
newPolicy = Connection.TLSPolicy.disabled;
} else if ("optional".equals(tls)) {
newPolicy = Connection.TLSPolicy.optional;
} else {
newPolicy = Connection.TLSPolicy.required;
}
serverListener.setTLSPolicy( newPolicy );
JiveGlobals.setProperty(ConnectionSettings.Server.TLS_ENABLED, tlsEnabled ? "true" : "false");
// Enable or disable server dialback
JiveGlobals.setProperty(ConnectionSettings.Server.DIALBACK_ENABLED, dialbackEnabled ? "true" : "false");
serverListener.enable( true );
// Enable legacy SSL port
serverListenerSsl.enable( true );
}
else
{
serverListener.enable( false );
serverListenerSsl.enable( false );
}
}
ServerDialback.setEnabledForSelfSigned(selfSigned);
JiveGlobals.setProperty("xmpp.client.cert.policy", clientMutualAuthenticationSocket);
JiveGlobals.setProperty("httpbind.client.cert.policy", clientMutualAuthenticationBOSH);
success = true;
// Log the event
webManager.logEvent("updated SSL configuration",
ConnectionSettings.Server.DIALBACK_ENABLED + " = " + JiveGlobals.getProperty(ConnectionSettings.Server.DIALBACK_ENABLED) + "\n" +
ConnectionSettings.Server.TLS_ENABLED + " = " + JiveGlobals.getProperty(ConnectionSettings.Server.TLS_ENABLED) + "\n" +
ConnectionSettings.Server.TLS_POLICY + " = " + JiveGlobals.getProperty(ConnectionSettings.Server.TLS_POLICY) + "\n" +
"xmpp.client.cert.policy = " + JiveGlobals.getProperty("xmpp.client.cert.policy") + "\n" +
"httpbind.client.cert.policy = " + JiveGlobals.getProperty("httpbind.client.cert.policy")
);
}
// Set page vars (client-to-client)
if ( clientListener.isEnabled() && clientListenerSsl.isEnabled() )
{
switch ( clientListener.getTLSPolicy() )
{
case required:
clientSecurityRequired = "req";
ssl = "available";
tls = "required";
break;
case optional:
clientSecurityRequired = "notreq";
ssl = "available";
tls = "optional";
break;
default:
clientSecurityRequired = "custom";
ssl = "available";
tls = "disabled";
break;
}
}
else
{
clientSecurityRequired = "custom";
ssl = clientListenerSsl.isEnabled() ? "available" : "disabled";
tls = clientListener.getTLSPolicy().toString();
}
// Set page vars (client-to-server)
final Connection.TLSPolicy tlsEnabled = serverListener.getTLSPolicy();
final boolean dialbackEnabled = JiveGlobals.getBooleanProperty(ConnectionSettings.Server.DIALBACK_ENABLED, true);
if (tlsEnabled.equals( Connection.TLSPolicy.required ) && !dialbackEnabled ) {
serverSecurityRequired = "req";
} else if ( tlsEnabled.equals( Connection.TLSPolicy.optional ) && dialbackEnabled ) {
serverSecurityRequired = "notreq";
} else {
serverSecurityRequired = "custom";
}
server_tls = tlsEnabled.name();
dialback = dialbackEnabled ? "available" : "disabled";
selfSigned = ServerDialback.isEnabledForSelfSigned();
clientMutualAuthenticationSocket = JiveGlobals.getProperty( "xmpp.client.cert.policy", "disabled" );
clientMutualAuthenticationBOSH = JiveGlobals.getProperty( "httpbind.client.cert.policy", "disabled" );
if ( !"disabled".equals( clientMutualAuthenticationSocket ) || !"disabled".equals( clientMutualAuthenticationBOSH ) ) {
clientSecurityRequired = "custom";
}
%>
<html>
<head>
<title><fmt:message key="ssl.settings.title"/></title>
<meta name="pageID" content="server-ssl"/>
<meta name="helpPage" content="manage_security_certificates.html"/>
<script type="text/javascript">
<!-- //
function setEnabled( connectionType )
{
var configBlock, enabled;
// Select the right configuration block and enable or disable it as defined by the the corresponding checkbox.
configBlock = document.getElementById( connectionType + "-config" );
enabled = document.getElementById( connectionType + "-enabled" ).checked;
if ( ( configBlock != null ) && ( enabled != null ) )
{
if ( enabled )
{
configBlock.style.display = "block";
}
else
{
configBlock.style.display = "none";
}
}
}
//-->
</script>
</head>
<body>
<% if (success) { %>
<admin:infobox type="success"><fmt:message key="ssl.settings.update" /></admin:infobox>
<% } %>
<c:if test="${param.deletesuccess}">
<admin:infobox type="success"><fmt:message key="ssl.settings.uninstalled" /></admin:infobox>
</c:if>
<p>
<fmt:message key="ssl.settings.client.info" />
</p>
<form action="ssl-settings.jsp" method="post">
<admin:contentBox title="Plain-text (with STARTTLS) connections">
<p>Accept plain-text connections, which, depending on the policy that is configured here, are upgraded to encrypted connections (using the STARTTLS protocol).</p>
<table cellpadding="3" cellspacing="0" border="0">
<tr valign="middle">
<td><input type="checkbox" name="plaintext-enabled" id="plaintext-enabled" onclick="setEnabled('plaintext')"/><label for="plaintext-enabled">Enabled</label></td>
</tr>
</table>
<div id="plaintext-config">
<br/>
<h4>TCP settings</h4>
<table cellpadding="3" cellspacing="0" border="0">
<tr valign="middle">
<td width="1%" nowrap><label for="plaintext-tcpPort">Port number</label></td>
<td width="99%"><input type="text" id="plaintext-tcpPort"></td>
</tr>
<tr valign="middle">
<td width="1%" nowrap><label for="plaintext-readBuffer">Read buffer</label></td>
<td width="99%"><input type="text" id="plaintext-readBuffer"> (in bytes)</td>
</tr>
</table>
<br/>
<h4>STARTTLS policy</h4>
<table cellpadding="3" cellspacing="0" border="0">
<tr valign="middle">
<td>
<input type="radio" name="plaintext-tlspolicy" value="disabled" id="plaintext-tlspolicy-disabled"/>
<label for="plaintext-tlspolicy-disabled"><b>Disabled</b> - Encryption is not allowed.</label>
</td>
</tr>
<tr valign="middle">
<td>
<input type="radio" name="plaintext-tlspolicy" value="optional" id="plaintext-tlspolicy-optional"/>
<label for="plaintext-tlspolicy-optional"><b>Optional</b> - Encryption may be used, but is not required.</label>
</td>
</tr>
<tr valign="middle">
<td>
<input type="radio" name="plaintext-tlspolicy" value="required" id="plaintext-tlspolicy-required"/>
<label for="plaintext-tlspolicy-required"><b>Required</b> - Connections cannot be established unless they are encrypted.</label>
</td>
</tr>
</table>
<br/>
<h4>Mutual Authentication</h4>
<p>In addition to requiring peers to use encryption (which will force them to verify the security certificates of this Openfire instance) an additional level of security can be enabled. With this option, the server can be configured to verify certificates that are to be provided by the peers. This is commonly referred to as 'mutual authentication'.</p>
<table cellpadding="3" cellspacing="0" border="0">
<tr valign="middle">
<td>
<input type="radio" name="plaintext-mutualauthentication" value="disabled" id="plaintext-mutualauthentication-disabled"/>
<label for="plaintext-mutualauthentication-disabled"><b>Disabled</b> - Peer certificates are not verified.</label>
</td>
</tr>
<tr valign="middle">
<td>
<input type="radio" name="plaintext-mutualauthentication" value="optional" id="plaintext-mutualauthentication-wanted"/>
<label for="plaintext-mutualauthentication-wanted"><b>Wanted</b> - Peer certificates are verified, but only when they are presented by the peer.</label>
</td>
</tr>
<tr valign="middle">
<td>
<input type="radio" name="plaintext-mutualauthentication" value="required" id="plaintext-mutualauthentication-needed"/>
<label for="plaintext-mutualauthentication-needed"><b>Needed</b> - A connection cannot be established if the peer does not present a valid certificate.</label>
</td>
</tr>
</table>
<br/>
<h4>Miscellaneous settings</h4>
<table cellpadding="3" cellspacing="0" border="0">
<tr valign="middle">
<td width="1%" nowrap><label for="plaintext-maxThreads">Maximum worker threads</label></td>
<td width="99%"><input type="text" id="plaintext-maxThreads"></td>
</tr>
</table>
</div>
</admin:contentBox>
<admin:contentBox title="Encrypted (legacy-mode) connections">
<p>Accept encrypted connections (as opposed to plain-text connections that are upgraded to encryption using STARTTLS). This type of connectivity is often referred to as the "legacy" method of establishing encrypted communications.</p>
<table cellpadding="3" cellspacing="0" border="0">
<tr valign="middle">
<td><input type="checkbox" name="legacymode-enabled" id="legacymode-enabled" onclick="setEnabled('legacymode')"/><label for="legacymode-enabled">Enabled</label></td>
</tr>
</table>
<div id="legacymode-config">
<br/>
<h4>TCP settings</h4>
<table cellpadding="3" cellspacing="0" border="0">
<tr valign="middle">
<td width="1%" nowrap><label for="legacymode-tcpPort">Port number</label></td>
<td width="99%"><input type="text" id="legacymode-tcpPort"></td>
</tr>
<tr valign="middle">
<td width="1%" nowrap><label for="legacymode-readBuffer">Read buffer</label></td>
<td width="99%"><input type="text" id="legacymode-readBuffer"> (in bytes)</td>
</tr>
</table>
<br/>
<h4>Mutual Authentication</h4>
<p>In addition to requiring peers to use encryption (which will force them to verify the security certificates of this Openfire instance) an additional level of security can be enabled. With this option, the server can be configured to verify certificates that are to be provided by the peers. This is commonly referred to as 'mutual authentication'.</p>
<table cellpadding="3" cellspacing="0" border="0">
<tr valign="middle">
<td>
<input type="radio" name="legacymode-mutualauthentication" value="disabled" id="legacymode-mutualauthentication-disabled"/>
<label for="legacymode-mutualauthentication-disabled"><b>Disabled</b> - Peer certificates are not verified.</label>
</td>
</tr>
<tr valign="middle">
<td>
<input type="radio" name="legacymode-mutualauthentication" value="optional" id="legacymode-mutualauthentication-wanted"/>
<label for="legacymode-mutualauthentication-wanted"><b>Wanted</b> - Peer certificates are verified, but only when they are presented by the peer.</label>
</td>
</tr>
<tr valign="middle">
<td>
<input type="radio" name="legacymode-mutualauthentication" value="required" id="legacymode-mutualauthentication-needed"/>
<label for="legacymode-mutualauthentication-needed"><b>Needed</b> - A connection cannot be established if the peer does not present a valid certificate.</label>
</td>
</tr>
</table>
<br/>
<h4>Miscellaneous settings</h4>
<table cellpadding="3" cellspacing="0" border="0">
<tr valign="middle">
<td width="1%" nowrap><label for="legacymode-maxThreads">Maximum worker threads</label></td>
<td width="99%"><input type="text" id="legacymode-maxThreads"></td>
</tr>
</table>
</div>
</admin:contentBox>
<input type="submit" name="update" value="<fmt:message key="global.save_settings" />">
</form>
<%--<form action="ssl-settings.jsp" method="post">--%>
<%--<div class="jive-contentBox" style="-moz-border-radius: 3px;">--%>
<%--<h4><fmt:message key="ssl.settings.client.legend" /></h4>--%>
<%--<table cellpadding="3" cellspacing="0" border="0">--%>
<%--<tbody>--%>
<%--<tr valign="middle">--%>
<%--<tr valign="middle">--%>
<%--<td width="1%" nowrap>--%>
<%--<input type="radio" name="clientSecurityRequired" value="notreq" id="rb02" onclick="showOrHide('custom', 'hide')"--%>
<%--<%= ("notreq".equals(clientSecurityRequired) ? "checked" : "") %>>--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<label for="rb02">--%>
<%--<b><fmt:message key="ssl.settings.client.label_notrequired" /></b> - <fmt:message key="ssl.settings.client.label_notrequired_info" />--%>
<%--</label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="middle">--%>
<%--<td width="1%" nowrap>--%>
<%--<input type="radio" name="clientSecurityRequired" value="req" id="rb01" onclick="showOrHide('custom', 'hide')"--%>
<%--<%= ("req".equals(clientSecurityRequired) ? "checked" : "") %>>--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<label for="rb01">--%>
<%--<b><fmt:message key="ssl.settings.client.label_required" /></b> - <fmt:message key="ssl.settings.client.label_required_info" />--%>
<%--</label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="middle">--%>
<%--<td width="1%" nowrap>--%>
<%--<input type="radio" name="clientSecurityRequired" value="custom" id="rb03" onclick="showOrHide('custom', 'show')"--%>
<%--<%= ("custom".equals(clientSecurityRequired) ? "checked" : "") %>>--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<label for="rb03">--%>
<%--<b><fmt:message key="ssl.settings.client.label_custom" /></b> - <fmt:message key="ssl.settings.client.label_custom_info" />--%>
<%--</label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="top" id="custom" <% if (!"custom".equals(clientSecurityRequired)) out.write("style=\"display:none\""); %>>--%>
<%--<td width="1%" nowrap>--%>
<%--&nbsp;--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<table cellpadding="3" cellspacing="0" border="0">--%>
<%--<tr valign="top">--%>
<%--<td width="1%" nowrap>--%>
<%--<fmt:message key="ssl.settings.client.customSSL" />--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<input type="radio" name="ssl" value="disabled" id="rb04" <%= ("disabled".equals(ssl) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb04"><fmt:message key="ssl.settings.notavailable" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="ssl" value="available" id="rb05" <%= ("available".equals(ssl) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb05"><fmt:message key="ssl.settings.available" /></label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="top">--%>
<%--<td width="1%" nowrap>--%>
<%--<fmt:message key="ssl.settings.client.customTLS" />--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<input type="radio" name="tls" value="disabled" id="rb06" <%= ("disabled".equals(tls) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb06"><fmt:message key="ssl.settings.notavailable" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="tls" value="optional" id="rb07" <%= ("optional".equals(tls) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb07"><fmt:message key="ssl.settings.optional" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="tls" value="required" id="rb08" <%= ("required".equals(tls) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb08"><fmt:message key="ssl.settings.required" /></label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="top">--%>
<%--<td width="1%" nowrap>--%>
<%--<fmt:message key="ssl.settings.client.custom.mutualauth.socket" />--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<input type="radio" name="clientMutualAuthenticationSocket" value="disabled" id="rb16" <%= ("disabled".equals(clientMutualAuthenticationSocket) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb16"><fmt:message key="ssl.settings.notavailable" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="clientMutualAuthenticationSocket" value="wanted" id="rb17" <%= ("wanted".equals(clientMutualAuthenticationSocket) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb17"><fmt:message key="ssl.settings.optional" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="clientMutualAuthenticationSocket" value="needed" id="rb18" <%= ("needed".equals(clientMutualAuthenticationSocket) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb18"><fmt:message key="ssl.settings.required" /></label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="top">--%>
<%--<td width="1%" nowrap>--%>
<%--<fmt:message key="ssl.settings.client.custom.mutualauth.bosh" />--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<input type="radio" name="clientMutualAuthenticationBOSH" value="disabled" id="rb19" <%= ("disabled".equals(clientMutualAuthenticationBOSH) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb19"><fmt:message key="ssl.settings.notavailable" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="clientMutualAuthenticationBOSH" value="wanted" id="rb20" <%= ("wanted".equals(clientMutualAuthenticationBOSH) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb20"><fmt:message key="ssl.settings.optional" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="clientMutualAuthenticationBOSH" value="needed" id="rb21" <%= ("needed".equals(clientMutualAuthenticationBOSH) ? "checked" : "") %>--%>
<%--onclick="this.form.clientSecurityRequired[2].checked=true;">&nbsp;<label for="rb21"><fmt:message key="ssl.settings.required" /></label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--</table>--%>
<%--</td>--%>
<%--</tr>--%>
<%--</tbody>--%>
<%--</table>--%>
<%--<!-- END 'Client Connection Security' -->--%>
<%--<br/>--%>
<%--<br/>--%>
<%--<!-- BEGIN 'Server Connection Security' -->--%>
<%--<h4><fmt:message key="ssl.settings.server.legend" /></h4>--%>
<%--<table cellpadding="3" cellspacing="0" border="0">--%>
<%--<tbody>--%>
<%--<tr valign="middle">--%>
<%--<tr valign="middle">--%>
<%--<td width="1%" nowrap>--%>
<%--<input type="radio" name="serverSecurityRequired" value="notreq" id="rb09" onclick="showOrHide('server_custom', 'hide')"--%>
<%--<%= ("notreq".equals(serverSecurityRequired) ? "checked" : "") %>>--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<label for="rb09">--%>
<%--<b><fmt:message key="ssl.settings.server.label_notrequired" /></b> - <fmt:message key="ssl.settings.server.label_notrequired_info" />--%>
<%--</label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="middle">--%>
<%--<td width="1%" nowrap>--%>
<%--<input type="radio" name="serverSecurityRequired" value="req" id="rb10" onclick="showOrHide('server_custom', 'hide')"--%>
<%--<%= ("req".equals(serverSecurityRequired) ? "checked" : "") %>>--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<label for="rb10">--%>
<%--<b><fmt:message key="ssl.settings.server.label_required" /></b> - <fmt:message key="ssl.settings.server.label_required_info" />--%>
<%--</label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="middle">--%>
<%--<td width="1%" nowrap>--%>
<%--<input type="radio" name="serverSecurityRequired" value="custom" id="rb11" onclick="showOrHide('server_custom', 'show')"--%>
<%--<%= ("custom".equals(serverSecurityRequired) ? "checked" : "") %>>--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<label for="rb11">--%>
<%--<b><fmt:message key="ssl.settings.server.label_custom" /></b> - <fmt:message key="ssl.settings.server.label_custom_info" />--%>
<%--</label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="top" id="server_custom" <% if (!"custom".equals(serverSecurityRequired)) out.write("style=\"display:none\""); %>>--%>
<%--<td width="1%" nowrap>--%>
<%--&nbsp;--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<table cellpadding="3" cellspacing="0" border="0" width="100%">--%>
<%--<tr valign="top">--%>
<%--<td width="1%" nowrap>--%>
<%--<fmt:message key="ssl.settings.server.dialback" />--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<input type="radio" name="dialback" value="disabled" id="rb12" <%= ("disabled".equals(dialback) ? "checked" : "") %>--%>
<%--onclick="this.form.serverSecurityRequired[2].checked=true;">&nbsp;<label for="rb12"><fmt:message key="ssl.settings.notavailable" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="dialback" value="available" id="rb13" <%= ("available".equals(dialback) ? "checked" : "") %>--%>
<%--onclick="this.form.serverSecurityRequired[2].checked=true;">&nbsp;<label for="rb13"><fmt:message key="ssl.settings.available" /></label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="top">--%>
<%--<td width="1%" nowrap>--%>
<%--<fmt:message key="ssl.settings.server.customTLS" />--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<input type="radio" name="server_tls" value="disabled" id="rb14" <%= ("disabled".equals(server_tls) ? "checked" : "") %>--%>
<%--onclick="this.form.serverSecurityRequired[2].checked=true;">&nbsp;<label for="rb14"><fmt:message key="ssl.settings.notavailable" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="server_tls" value="optional" id="rb15" <%= ("optional".equals(server_tls) ? "checked" : "") %>--%>
<%--onclick="this.form.serverSecurityRequired[2].checked=true;">&nbsp;<label for="rb15"><fmt:message key="ssl.settings.optional" /></label>&nbsp;&nbsp;--%>
<%--<input type="radio" name="server_tls" value="required" id="rb22" <%= ("required".equals(server_tls) ? "checked" : "") %>--%>
<%--onclick="this.form.serverSecurityRequired[2].checked=true;">&nbsp;<label for="rb22"><fmt:message key="ssl.settings.required" /></label>&nbsp;&nbsp;--%>
<%--</td>--%>
<%--</tr>--%>
<%--</table>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr valign="middle">--%>
<%--<td width="1%" nowrap>--%>
<%--<input type="checkbox" name="selfSigned" id="cb02" <%= (selfSigned ? "checked" : "") %>>--%>
<%--</td>--%>
<%--<td width="99%">--%>
<%--<label for="rb02">--%>
<%--<fmt:message key="ssl.settings.client.label_self-signed" />--%>
<%--</label>--%>
<%--</td>--%>
<%--</tr>--%>
<%--</tbody>--%>
<%--</table>--%>
<%--</div>--%>
<%--<input type="submit" name="update" value="<fmt:message key="global.save_settings" />">--%>
<%--</form>--%>
<!-- BEGIN 'Server Connection Security' -->
<script>
// Ensure that the various elements are set properly when the page is loaded.
window.onload = function()
{
setEnabled( "plaintext" );
setEnabled( "legacymode" );
};
</script>
</body>
</html>
<% } catch (Throwable t) { t.printStackTrace(); } %>
\ No newline at end of file
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