Revision: 6133 http://sourceforge.net/p/jump-pilot/code/6133 Author: michaudm Date: 2019-02-21 07:21:47 +0000 (Thu, 21 Feb 2019) Log Message: ----------- Add an option to connect to a WMS with unchecked certificate authority
Modified Paths: -------------- core/trunk/ChangeLog core/trunk/src/com/vividsolutions/jump/workbench/model/WMSLayer.java core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/EditWMSQueryPanel.java core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/URLWizardPanel.java core/trunk/src/com/vividsolutions/wms/AbstractWMSRequest.java core/trunk/src/com/vividsolutions/wms/FeatureInfoRequest.java core/trunk/src/com/vividsolutions/wms/WMSRequest.java core/trunk/src/com/vividsolutions/wms/WMService.java core/trunk/src/com/vividsolutions/wms/ui/WMSViewer.java core/trunk/src/language/jump.properties core/trunk/src/language/jump_cz.properties core/trunk/src/language/jump_de.properties core/trunk/src/language/jump_es.properties core/trunk/src/language/jump_fi.properties core/trunk/src/language/jump_fr.properties core/trunk/src/language/jump_hu.properties core/trunk/src/language/jump_it.properties core/trunk/src/language/jump_ja_JP.properties core/trunk/src/language/jump_ml.properties core/trunk/src/language/jump_pt.properties core/trunk/src/language/jump_pt_BR.properties core/trunk/src/language/jump_ta_IN.properties core/trunk/src/language/jump_te.properties core/trunk/src/language/jump_zh_CN.properties core/trunk/src/language/jump_zh_HK.properties core/trunk/src/org/openjump/core/ui/plugin/file/open/OpenProjectWizard.java core/trunk/src/org/openjump/core/ui/plugin/wms/WMSLegendPlugIn.java Modified: core/trunk/ChangeLog =================================================================== --- core/trunk/ChangeLog 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/ChangeLog 2019-02-21 07:21:47 UTC (rev 6133) @@ -3,6 +3,9 @@ # 2. make sure that lines break at 80 chars for constricted display situations #<-------------------------------- 80 chars ----------------------------------># +2019-02-21 mmichaud <m.michael.mich...@orange.fr> + * Add an option to connect to a WMS with unchecked certificate authority + 2019-02-19 Nicolas Ribot * Corrected typo in SpatialiteDSMetadata datasetInfoQuery string preventing spatial tables to be listed Modified: core/trunk/src/com/vividsolutions/jump/workbench/model/WMSLayer.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/model/WMSLayer.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/com/vividsolutions/jump/workbench/model/WMSLayer.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -38,6 +38,8 @@ import java.lang.ref.Reference; import java.lang.ref.SoftReference; import java.net.URL; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -84,13 +86,13 @@ } public WMSLayer(LayerManager layerManager, String serverURL, String srs, - List<String> layerNames, String format, String version) throws IOException { + List<String> layerNames, String format, String version) throws IOException, KeyManagementException, NoSuchAlgorithmException { this(layerManager, initializedService(serverURL, version), srs, layerNames, format); } private static WMService initializedService(String serverURL, String version) - throws IOException { + throws IOException, KeyManagementException, NoSuchAlgorithmException { WMService initializedService = new WMService(serverURL, version); initializedService.initialize(); return initializedService; @@ -150,7 +152,7 @@ this.alpha = alpha; } - public Image createImage(LayerViewPanel panel) throws IOException { + public Image createImage(LayerViewPanel panel) throws IOException, KeyManagementException, NoSuchAlgorithmException { MapRequest request = createRequest(panel); URL newURL = request.getURL(); @@ -181,7 +183,7 @@ return new BoundingBox(srs, e); } - public MapRequest createRequest(LayerViewPanel panel) throws IOException { + public MapRequest createRequest(LayerViewPanel panel) throws IOException, KeyManagementException, NoSuchAlgorithmException { MapRequest request = getService().createMapRequest(); request.setBoundingBox(toBoundingBox(srs, panel.getViewport() .getEnvelopeInModelCoordinates())); @@ -241,7 +243,7 @@ return blackboard; } - public WMService getService() throws IOException { + public WMService getService() throws IOException, KeyManagementException, NoSuchAlgorithmException { if (service == null) { Assert.isTrue(serverURL != null); setService(initializedService(serverURL, wmsVersion)); @@ -281,7 +283,7 @@ envelope.expandToInclude(bb.getEnvelope()); } } - } catch (IOException e) { + } catch (IOException|KeyManagementException|NoSuchAlgorithmException e) { Logger .error( "WMSLayer envelope calculation failed." Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/EditWMSQueryPanel.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/EditWMSQueryPanel.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/EditWMSQueryPanel.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -38,6 +38,8 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.Iterator; import java.util.LinkedHashSet; @@ -109,7 +111,7 @@ try { service = layer.getService(); - } catch (IOException e) { + } catch (IOException| KeyManagementException| NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/URLWizardPanel.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/URLWizardPanel.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/wms/URLWizardPanel.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -40,6 +40,8 @@ import java.awt.event.ActionListener; import java.io.IOException; import java.net.URL; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.LinkedHashSet; @@ -52,6 +54,7 @@ import javax.swing.JPanel; import javax.swing.JRadioButton; +import org.deegree.security.drm.ManagementException; import org.openjump.core.ui.plugin.wms.AddWmsLayerWizard; import org.openjump.util.UriUtil; @@ -157,7 +160,7 @@ return I18N.get(I18N_PREFIX + "please-enter-the-url-of-the-wms-server"); } - public void exitingToRight() throws IOException, WorkbenchException { + public void exitingToRight() throws WorkbenchException, NoSuchAlgorithmException, KeyManagementException { try { String url = urlPanel.getUrl(); url = UriUtil.urlAddCredentials(url, urlPanel.getUser(), urlPanel.getPass()); Modified: core/trunk/src/com/vividsolutions/wms/AbstractWMSRequest.java =================================================================== --- core/trunk/src/com/vividsolutions/wms/AbstractWMSRequest.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/com/vividsolutions/wms/AbstractWMSRequest.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -9,6 +9,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.Charset; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; import java.util.List; import java.util.Map.Entry; @@ -62,7 +64,7 @@ * @return URL * @throws MalformedURLException */ - abstract public URL getURL() throws MalformedURLException; + abstract public URL getURL() throws MalformedURLException, KeyManagementException, NoSuchAlgorithmException; /** * unified way to create a url connection, may be overwritten and modified @@ -70,7 +72,7 @@ * @return * @throws IOException */ - protected HttpURLConnection prepareConnection() throws IOException { + protected HttpURLConnection prepareConnection() throws IOException, KeyManagementException, NoSuchAlgorithmException { URL requestUrl = getURL(); con = (HttpURLConnection) requestUrl.openConnection(); @@ -100,7 +102,7 @@ * * @Override */ - public HttpURLConnection getConnection() throws IOException { + public HttpURLConnection getConnection() throws IOException, KeyManagementException, NoSuchAlgorithmException { if (con == null) con = prepareConnection(); return con; @@ -111,7 +113,7 @@ * * @return the retrieved map Image */ - public Image getImage() throws IOException { + public Image getImage() throws IOException, KeyManagementException, NoSuchAlgorithmException { HttpURLConnection con = getConnection(); boolean httpOk = con.getResponseCode() == HttpURLConnection.HTTP_OK; @@ -147,7 +149,7 @@ * @return * @throws IOException */ - public String getText() throws IOException { + public String getText() throws IOException, KeyManagementException, NoSuchAlgorithmException { HttpURLConnection con = getConnection(); return readConnection(con, 0, false); } Modified: core/trunk/src/com/vividsolutions/wms/FeatureInfoRequest.java =================================================================== --- core/trunk/src/com/vividsolutions/wms/FeatureInfoRequest.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/com/vividsolutions/wms/FeatureInfoRequest.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -5,6 +5,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLEncoder; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; import java.util.List; import com.vividsolutions.jts.geom.Envelope; @@ -23,7 +25,7 @@ private BoundingBox bbox; private int height, width; - public FeatureInfoRequest(WMSLayer layer) throws IOException { + public FeatureInfoRequest(WMSLayer layer) throws IOException, KeyManagementException, NoSuchAlgorithmException { super(layer.getService()); this.wmsLayer = layer; } @@ -45,7 +47,7 @@ } @Override - public URL getURL() throws MalformedURLException { + public URL getURL() throws MalformedURLException, KeyManagementException, NoSuchAlgorithmException { String featInfoUrl = service.getCapabilities().getFeatureInfoURL(); if (featInfoUrl.contains("?")) { Modified: core/trunk/src/com/vividsolutions/wms/WMSRequest.java =================================================================== --- core/trunk/src/com/vividsolutions/wms/WMSRequest.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/com/vividsolutions/wms/WMSRequest.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -4,6 +4,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; public interface WMSRequest { @@ -11,7 +13,7 @@ public void setWMSVersion( String wmsVersion ); - public URL getURL() throws MalformedURLException; + public URL getURL() throws MalformedURLException, KeyManagementException, NoSuchAlgorithmException; - public URLConnection getConnection() throws IOException; + public URLConnection getConnection() throws IOException, KeyManagementException, NoSuchAlgorithmException; } Modified: core/trunk/src/com/vividsolutions/wms/WMService.java =================================================================== --- core/trunk/src/com/vividsolutions/wms/WMService.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/com/vividsolutions/wms/WMService.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -41,7 +41,13 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.X509Certificate; +import java.util.HashSet; +import java.util.Set; +import javax.net.ssl.*; import javax.swing.JOptionPane; import org.openjump.util.UriUtil; @@ -67,6 +73,7 @@ private URL serverUrl; private String wmsVersion = WMS_1_1_1; private Capabilities cap; + // true if the user just confirm that he accepts or not untrusted connexion /** * Constructs a WMService object from a server URL. @@ -100,7 +107,7 @@ /** * @throws IOException */ - public void initialize() throws IOException { + public void initialize() throws IOException, KeyManagementException, NoSuchAlgorithmException { initialize(false); } @@ -116,7 +123,7 @@ * alert the user if a different GetMap URL is available * @throws IOException */ - public void initialize(boolean alertDifferingURL) throws IOException { + public void initialize(boolean alertDifferingURL) throws IOException, NoSuchAlgorithmException, KeyManagementException { // [UT] String req = "request=capabilities&WMTVER=1.0"; IParser parser = new ParserWMS1_1(); @@ -134,15 +141,15 @@ parser = new ParserWMS1_3(); } -// try { + try { String requestUrlString = this.serverUrl + req; URL requestUrl = new URL(requestUrlString); URLConnection con = new BasicRequest(this, requestUrl).getConnection(); - + // Parser p = new Parser(); cap = parser.parseCapabilities(this, con.getInputStream()); - String url1 = cap.getService().getServerUrl().toString(); + String url1 = cap.getService().getServerUrl(); String url2 = cap.getGetMapURL(); String compare_url1 = UriUtil.urlStripAuth(legalize(url1)); @@ -151,8 +158,8 @@ // user if (!compare_url1.equals(compare_url2) && alertDifferingURL) { int resp = showConfirmDialog(null, I18N.getMessage( - "com.vididsolutions.wms.WMService.Other-GetMap-URL-Found", - new Object[] { url2 }), null, YES_NO_OPTION); + "com.vididsolutions.wms.WMService.Other-GetMap-URL-Found", + new Object[]{url2}), null, YES_NO_OPTION); // nope. user wants to keep the initial url if (resp == NO_OPTION) { cap.setGetMapURL(url1); @@ -160,7 +167,7 @@ // make sure url2 has auth info if needed else if (!UriUtil.urlGetUser(url1).isEmpty()) { String url2_withAuth = UriUtil.urlAddCredentials(url2, - UriUtil.urlGetUser(url1), UriUtil.urlGetPassword(url1)); + UriUtil.urlGetUser(url1), UriUtil.urlGetPassword(url1)); cap.setGetMapURL(url2_withAuth); } } else { @@ -170,7 +177,27 @@ // JPP mailing list cap.setGetMapURL(url1); } + } catch(SSLHandshakeException ex) { + int r = JOptionPane.showConfirmDialog(null, + I18N.getMessage("com.vididsolutions.wms.WMService.UnverifiedCertificate", new Object[]{ + // create a new URL to hide user/password + new URL(serverUrl.getProtocol(), serverUrl.getHost(), serverUrl.getPort(), serverUrl.getFile()) + }), + "Confirmation dialog", + YES_NO_OPTION,JOptionPane.WARNING_MESSAGE); + if (r==JOptionPane.YES_OPTION) { + setTrustOption(true, serverUrl); + initialize(alertDifferingURL); + } else throw ex; + //null, I18N.getMessage( +// "com.vividsolutions.wms.WMService.WMS-Not-Found", +// new Object[] { e.getLocalizedMessage() }), I18N +// .get("com.vividsolutions.wms.WMService.Error"), +// JOptionPane.ERROR_MESSAGE); +// throw e; + } + // [2016.01 ede] deactivated the error handling here as it leads to an // infinite stack loop when trying to open a project containing a wms layer // that can't be connected for some reason show error, close errordialog, @@ -195,6 +222,25 @@ // } } + TrustManager trm = new X509TrustManager() { + public X509Certificate[] getAcceptedIssuers() { return null; } + public void checkClientTrusted(X509Certificate[] certs, String authType) { } + public void checkServerTrusted(X509Certificate[] certs, String authType) { } + }; + Set<URL> trustedURLs = new HashSet<>(); + + private void setTrustOption(boolean trust, URL url) + throws KeyManagementException, NoSuchAlgorithmException { + SSLContext sc = SSLContext.getInstance("SSL"); + if (trust || trustedURLs.contains(url)) { + sc.init(null, new TrustManager[]{trm}, null); + trustedURLs.add(url); + } else { + sc.init(null, null, null); + } + HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); + } + /** * Gets the url stringof the map service. * Modified: core/trunk/src/com/vividsolutions/wms/ui/WMSViewer.java =================================================================== --- core/trunk/src/com/vividsolutions/wms/ui/WMSViewer.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/com/vividsolutions/wms/ui/WMSViewer.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -39,6 +39,8 @@ import java.awt.*; import java.awt.event.*; import java.io.IOException; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; @@ -211,7 +213,7 @@ disconnectButton.setEnabled( true ); getImageButton.setEnabled( true ); connected = true; - } catch( IOException ioe ) { + } catch( IOException| KeyManagementException| NoSuchAlgorithmException ioe ) { // failed to connect and retrieve capabilities } Modified: core/trunk/src/language/jump.properties =================================================================== --- core/trunk/src/language/jump.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -231,6 +231,7 @@ com.vividsolutions.wms.Parser.invalid-bounding-box-element-node = Invalid bounding box element node. com.vividsolutions.wms.Parser.not-a-latlon-boundingbox-element = Not a (Lat/Long) Bounding-Box Element com.vividsolutions.wms.WMService.Error = Error +com.vididsolutions.wms.WMService.UnverifiedCertificate=Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? com.vididsolutions.wms.WMService.Other-GetMap-URL-Found = The WMS advertises the URL {0} as GetMap-URL. Do you want to use it? com.vividsolutions.wms.WMService.WMS-IO-Error = Could not connect to the WMS.\n\ \t{0}\: {1} Modified: core/trunk/src/language/jump_cz.properties =================================================================== --- core/trunk/src/language/jump_cz.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_cz.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2920,4 +2920,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_de.properties =================================================================== --- core/trunk/src/language/jump_de.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_de.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2912,4 +2912,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_es.properties =================================================================== --- core/trunk/src/language/jump_es.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_es.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2891,4 +2891,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=Detener el proceso com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=Advertencia: la detenci\xF3n del proceso puede provocar la p\xE9rdida de los datos o la suyas integridad. \n \xBFEst\xE1 seguro de que desea detener el proceso? ui.renderer.style.ColorThemingTableModel.label =Etiqueta -ui.renderer.style.ColorThemingTableModel.style =Estilo \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =Estilo +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_fi.properties =================================================================== --- core/trunk/src/language/jump_fi.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_fi.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2889,4 +2889,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_fr.properties =================================================================== --- core/trunk/src/language/jump_fr.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_fr.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2921,4 +2921,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process = Interrompre le traitement com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning = Attention : L'interruption brutale d'un traitement peut provoquer la corruption ou la perte de donn\xE9es.\n Etes-vous s\xFBr de vouloir quand m\xEAme interrompre le traitement ? ui.renderer.style.ColorThemingTableModel.label = Etiquette -ui.renderer.style.ColorThemingTableModel.style = Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style = Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=Autorit\u00e9 de certification inconnu pour :\n{0}.\nVoulez-vous continuer malgr\u00e9 tout ?\ Modified: core/trunk/src/language/jump_hu.properties =================================================================== --- core/trunk/src/language/jump_hu.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_hu.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2908,4 +2908,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_it.properties =================================================================== --- core/trunk/src/language/jump_it.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_it.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2893,4 +2893,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=Interrompi il processo com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=Attenzione: Interrompendo il processo pu\xF2 determinare una perdita di dati o la loro integrit\xE0.\n Sei sicuro di voler interrompere il processo? ui.renderer.style.ColorThemingTableModel.label =Etichetta -ui.renderer.style.ColorThemingTableModel.style =Stile \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =Stile +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_ja_JP.properties =================================================================== --- core/trunk/src/language/jump_ja_JP.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_ja_JP.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2914,4 +2914,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_ml.properties =================================================================== --- core/trunk/src/language/jump_ml.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_ml.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -3689,4 +3689,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_pt.properties =================================================================== --- core/trunk/src/language/jump_pt.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_pt.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2913,4 +2913,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_pt_BR.properties =================================================================== --- core/trunk/src/language/jump_pt_BR.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_pt_BR.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2913,4 +2913,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_ta_IN.properties =================================================================== --- core/trunk/src/language/jump_ta_IN.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_ta_IN.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -2911,4 +2911,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_te.properties =================================================================== --- core/trunk/src/language/jump_te.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_te.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -3419,4 +3419,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_zh_CN.properties =================================================================== --- core/trunk/src/language/jump_zh_CN.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_zh_CN.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -3076,4 +3076,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/language/jump_zh_HK.properties =================================================================== --- core/trunk/src/language/jump_zh_HK.properties 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/language/jump_zh_HK.properties 2019-02-21 07:21:47 UTC (rev 6133) @@ -3075,4 +3075,5 @@ com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process=\#T\:Kill process com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.kill-process-warning=\#T\:Warning: Killing the process may result in data corruption or data loss.\n Are you sure you want to kill the process? ui.renderer.style.ColorThemingTableModel.label =\#T\:Label -ui.renderer.style.ColorThemingTableModel.style =\#T\:Style \ No newline at end of file +ui.renderer.style.ColorThemingTableModel.style =\#T\:Style +com.vididsolutions.wms.WMService.UnverifiedCertificate=#T:Unknown Certificate Authority for :\n{0}.\nDo you want to continue anyway ? \ No newline at end of file Modified: core/trunk/src/org/openjump/core/ui/plugin/file/open/OpenProjectWizard.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/file/open/OpenProjectWizard.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/org/openjump/core/ui/plugin/file/open/OpenProjectWizard.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -366,6 +366,13 @@ rasterImageLayer.getSymbology(), sourceLayerCategory); continue; + } else if (layerable instanceof WMSLayer) { + try { + ((WMSLayer) layerable).getService().initialize(); + } catch(Exception e) { + Logger.trace(e); + continue; + } } newLayerManager.addLayerable(sourceLayerCategory.getName(), Modified: core/trunk/src/org/openjump/core/ui/plugin/wms/WMSLegendPlugIn.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/wms/WMSLegendPlugIn.java 2019-02-20 14:38:45 UTC (rev 6132) +++ core/trunk/src/org/openjump/core/ui/plugin/wms/WMSLegendPlugIn.java 2019-02-21 07:21:47 UTC (rev 6133) @@ -13,6 +13,8 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; import java.util.List; import javax.imageio.ImageIO; @@ -247,7 +249,7 @@ private final String CLOSE = I18N .get("ui.plugin.imagery.ImageLayerManagerDialog.Close"); - public JPanel getLegendPanel(PlugInContext context) throws IOException { + public JPanel getLegendPanel(PlugInContext context) throws IOException, KeyManagementException, NoSuchAlgorithmException { final JPanel mainPanel = new JPanel(new GridBagLayout()); final WMSLayer layer = (WMSLayer) LayerTools.getSelectedLayerable( _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel