--- a/jdk/src/share/classes/sun/tools/jconsole/VMPanel.java Mon Mar 18 11:55:16 2013 +0100
+++ b/jdk/src/share/classes/sun/tools/jconsole/VMPanel.java Tue Mar 19 13:26:42 2013 +0100
@@ -55,6 +55,7 @@
private VMInternalFrame vmIF = null;
private static ArrayList<TabInfo> tabInfos = new ArrayList<TabInfo>();
private boolean wasConnected = false;
+ private boolean shouldUseSSL = true;
// The everConnected flag keeps track of whether the window can be
// closed if the user clicks Cancel after a failed connection attempt.
@@ -286,7 +287,7 @@
new Thread("VMPanel.connect") {
public void run() {
- proxyClient.connect();
+ proxyClient.connect(shouldUseSSL);
}
}.start();
}
@@ -460,8 +461,12 @@
msgTitle = Messages.CONNECTION_LOST1;
msgExplanation = Resources.format(Messages.CONNECTING_TO2, getConnectionName());
buttonStr = Messages.RECONNECT;
+ } else if (shouldUseSSL) {
+ msgTitle = Messages.CONNECTION_FAILED_SSL1;
+ msgExplanation = Resources.format(Messages.CONNECTION_FAILED_SSL2, getConnectionName());
+ buttonStr = Messages.INSECURE;
} else {
- msgTitle =Messages.CONNECTION_FAILED1;
+ msgTitle = Messages.CONNECTION_FAILED1;
msgExplanation = Resources.format(Messages.CONNECTION_FAILED2, getConnectionName());
buttonStr = Messages.CONNECT;
}
@@ -483,6 +488,9 @@
if (value == Messages.RECONNECT || value == Messages.CONNECT) {
connect();
+ } else if (value == Messages.INSECURE) {
+ shouldUseSSL = false;
+ connect();
} else if (!everConnected) {
try {
getFrame().setClosed(true);