Commit 4086e48a authored by Guus der Kinderen's avatar Guus der Kinderen Committed by akrherz

OF-1505: Prevent admin console stacktrace on TLS config page.

parent d47c7dc5
......@@ -39,18 +39,21 @@
showAll = true;
break;
}
if ( trustStoreConfiguration == null )
{
trustStoreConfiguration = certificateStoreManager.getTrustStoreConfiguration( connectionType );
}
if ( !trustStoreConfiguration.equals( certificateStoreManager.getTrustStoreConfiguration( connectionType ) ) )
{
showAll = true;
break;
}
// Disabled this until we sort out the difference between regular trust stores and the client trust store.
// if ( trustStoreConfiguration == null )
// {
// trustStoreConfiguration = certificateStoreManager.getTrustStoreConfiguration( connectionType );
// }
// if ( !trustStoreConfiguration.equals( certificateStoreManager.getTrustStoreConfiguration( connectionType ) ) )
// {
// showAll = true;
// break;
// }
}
pageContext.setAttribute( "connectionTypes", showAll ? ConnectionType.values() : "COMBINED" );
pageContext.setAttribute( "showAll", showAll );
pageContext.setAttribute( "connectionTypes", (showAll ? ConnectionType.values() : new ConnectionType[] { ConnectionType.SOCKET_C2S } ));
pageContext.setAttribute( "certificateStoreManager", certificateStoreManager );
boolean update = request.getParameter("update") != null;
......@@ -151,7 +154,7 @@
<c:set var="title">
<c:choose>
<c:when test="${connectionType eq 'COMBINED'}"><fmt:message key="ssl.certificates.store-management.combined-stores.title"/></c:when>
<c:when test="${!showAll}"><fmt:message key="ssl.certificates.store-management.combined-stores.title"/></c:when>
<c:when test="${connectionType eq 'SOCKET_C2S'}"><fmt:message key="ssl.certificates.store-management.socket-c2s-stores.title"/></c:when>
<c:when test="${connectionType eq 'SOCKET_S2S'}"><fmt:message key="ssl.certificates.store-management.socket-s2s-stores.title"/></c:when>
<c:when test="${connectionType eq 'BOSH_C2S'}"><fmt:message key="ssl.certificates.store-management.bosh-c2s-stores.title"/></c:when>
......@@ -163,7 +166,7 @@
<c:set var="description">
<c:choose>
<c:when test="${connectionType eq 'COMBINED'}"><fmt:message key="ssl.certificates.store-management.combined-stores.info"/></c:when>
<c:when test="${!showAll}"><fmt:message key="ssl.certificates.store-management.combined-stores.info"/></c:when>
<c:when test="${connectionType eq 'SOCKET_C2S'}"><fmt:message key="ssl.certificates.store-management.socket-c2s-stores.info"/></c:when>
<c:when test="${connectionType eq 'SOCKET_S2S'}"><fmt:message key="ssl.certificates.store-management.socket-s2s-stores.info"/></c:when>
<c:when test="${connectionType eq 'BOSH_C2S'}"><fmt:message key="ssl.certificates.store-management.bosh-c2s-stores.info"/></c:when>
......@@ -173,11 +176,6 @@
</c:choose>
</c:set>
<!-- All connection types share the same config. Pick an arbitrary one to work with. -->
<c:if test="${connectionType eq 'COMBINED'}">
<c:set var="connectionType">SOCKET_C2S</c:set>
</c:if>
<form action="security-certificate-store-management.jsp" method="post">
<input type="hidden" name="csrf" value="${csrf}">
<input type="hidden" name="connectionType" value="${connectionType}"/>
......
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