Unverified Commit 82173602 authored by Dave Cridland's avatar Dave Cridland Committed by GitHub

Merge pull request #1041 from guusdk/OF-1505_TLS-cert-admin-console-stacktrace

OF-1505: Prevent admin console stacktrace on TLS config page.
parents 62a642c9 9bac4126
...@@ -39,18 +39,21 @@ ...@@ -39,18 +39,21 @@
showAll = true; showAll = true;
break; break;
} }
if ( trustStoreConfiguration == null )
{ // Disabled this until we sort out the difference between regular trust stores and the client trust store.
trustStoreConfiguration = certificateStoreManager.getTrustStoreConfiguration( connectionType ); // if ( trustStoreConfiguration == null )
} // {
if ( !trustStoreConfiguration.equals( certificateStoreManager.getTrustStoreConfiguration( connectionType ) ) ) // trustStoreConfiguration = certificateStoreManager.getTrustStoreConfiguration( connectionType );
{ // }
showAll = true; // if ( !trustStoreConfiguration.equals( certificateStoreManager.getTrustStoreConfiguration( connectionType ) ) )
break; // {
} // 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 ); pageContext.setAttribute( "certificateStoreManager", certificateStoreManager );
boolean update = request.getParameter("update") != null; boolean update = request.getParameter("update") != null;
...@@ -151,7 +154,7 @@ ...@@ -151,7 +154,7 @@
<c:set var="title"> <c:set var="title">
<c:choose> <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_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 '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> <c:when test="${connectionType eq 'BOSH_C2S'}"><fmt:message key="ssl.certificates.store-management.bosh-c2s-stores.title"/></c:when>
...@@ -163,7 +166,7 @@ ...@@ -163,7 +166,7 @@
<c:set var="description"> <c:set var="description">
<c:choose> <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_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 '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> <c:when test="${connectionType eq 'BOSH_C2S'}"><fmt:message key="ssl.certificates.store-management.bosh-c2s-stores.info"/></c:when>
...@@ -173,11 +176,6 @@ ...@@ -173,11 +176,6 @@
</c:choose> </c:choose>
</c:set> </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"> <form action="security-certificate-store-management.jsp" method="post">
<input type="hidden" name="csrf" value="${csrf}"> <input type="hidden" name="csrf" value="${csrf}">
<input type="hidden" name="connectionType" value="${connectionType}"/> <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