Skip to content

Commit b074e72

Browse files
author
Tim Middleton
committed
Add diaglog message to warn when SSL validation has been disabled
1 parent 8baf724 commit b074e72

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

coherence-visualvm-plugin/src/main/java/com/oracle/coherence/plugin/visualvm/helper/HttpRequestSender.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
import javax.net.ssl.SSLSession;
6666
import javax.net.ssl.TrustManager;
6767
import javax.net.ssl.X509TrustManager;
68+
import javax.swing.JOptionPane;
69+
70+
import static com.oracle.coherence.plugin.visualvm.Localization.getLocalText;
6871

6972

7073
/**
@@ -1642,9 +1645,12 @@ private void initSSL()
16421645
// disable SSL verification if option set
16431646
if (GlobalPreferences.sharedInstance().isSSLCertValidationDisabled())
16441647
{
1645-
LOGGER.warning("SSL Certification validation has been explicitly disabled");
1648+
String sText = getLocalText("LBL_ssl_validation_disabled");
1649+
LOGGER.warning(sText);
16461650
m_sslContext.init(null, TRUST_ALL_CERTS, new java.security.SecureRandom());
16471651
HttpsURLConnection.setDefaultHostnameVerifier(TRUST_ALL_HOSTS);
1652+
JOptionPane.showMessageDialog(null, getLocalText("LBL_ssl_validation_disabled"), getLocalText("LBL_warning"),
1653+
JOptionPane.WARNING_MESSAGE);
16481654
}
16491655
else
16501656
{

coherence-visualvm-plugin/src/main/resources/com/oracle/coherence/plugin/visualvm/Bundle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ OpenIDE-Module-Short-Description=A Developer plug-in for providing high level in
5757

5858
# Messages and labels that need to be internationalized
5959

60+
LBL_warning=Warning
61+
LBL_ssl_validation_disabled=WARNING: SSL Certification validation has been explicitly disabled in Coherence options.
62+
6063
# CoherenceClusterOverviewPanel
6164
LBL_cluster_name=Cluster Name
6265
LBL_version=Version

0 commit comments

Comments
 (0)