Modify

Opened 8 years ago

Closed 8 years ago

#6024 closed defect (wontfix)

Connection error when using self-signed ssl certificate

Reported by: mrechtien Owned by: Ivan
Priority: normal Component: WikiEditorForEclipsePlugin
Severity: normal Keywords: self-signed ssl certificate
Cc: Trac Release: 0.11

Description

Hi,

it's been a while since I last tested this nice hack - that time it worked with my trac installation. Now I updated to "0.0.6.200910151952". After setting up the connection I got the following error in Eclipse 3.5.1, which seems to be related to handling the ssl self-signed certificate...

Eclipse error details:

null Error Fri Oct 23 09:34:21 CEST 2009 javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.trachacks.wikieditor.rpc.xmlrpc.WikiRPCClientFactory.testConnection(WikiRPCClientFactory.java:162) at org.trachacks.wikieditor.rpc.WikiClientImpl.testConnection(WikiClientImpl.java:62) at org.trachacks.wikieditor.service.WikiServiceImpl.testConnection(WikiServiceImpl.java:69) at org.trachacks.wikieditor.eclipse.plugin.model.Server.testConnection(Server.java:273) at org.trachacks.wikieditor.eclipse.plugin.model.Server.connect(Server.java:181) at org.trachacks.wikieditor.eclipse.plugin.navigation.actions.server.ConnectServerAction.runInternal(ConnectServerAction.java:43) at org.trachacks.wikieditor.eclipse.plugin.navigation.actions.AbstractLongRunningBaseAction$1.run(AbstractLongRunningBaseAction.java:34) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507) at org.trachacks.wikieditor.eclipse.plugin.navigation.actions.AbstractLongRunningBaseAction.run(AbstractLongRunningBaseAction.java:29) at org.trachacks.wikieditor.eclipse.plugin.navigation.actions.ServerActionsManager.doubleClick(ServerActionsManager.java:86) at org.trachacks.wikieditor.eclipse.plugin.navigation.NavigationPanel.doubleClick(NavigationPanel.java:119) at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:821) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:819) at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1419) at org.eclipse.ui.navigator.CommonViewer.handleDoubleSelect(CommonViewer.java:459) at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1195) at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:238) at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:235) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:296) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source) at java.io.BufferedOutputStream.flushBuffer(Unknown Source) at java.io.BufferedOutputStream.flush(Unknown Source) at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828) at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) at org.trachacks.wikieditor.rpc.xmlrpc.WikiRPCClientFactory.testConnection(WikiRPCClientFactory.java:160) ... 48 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source) ... 66 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 71 more

Is this a configuration problem so that I can do anything about it or is it a possible defect?

Best regards,

Markus

Attachments (0)

Change History (3)

comment:1 in reply to:  description ; Changed 8 years ago by Ivan

Hi Markus,

if the Trac server you are trying to connect is using a self-signed certificate then you will need to import the certificate to the jre keystore ( see WikiEditorForEclipsePlugin/FAQ

Replying to mrechtien:

Hi,

it's been a while since I last tested this nice hack - that time it worked with my trac installation. Now I updated to "0.0.6.200910151952". After setting up the connection I got the following error in Eclipse 3.5.1, which seems to be related to handling the ssl self-signed certificate...

Eclipse error details:

null Error Fri Oct 23 09:34:21 CEST 2009 javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.trachacks.wikieditor.rpc.xmlrpc.WikiRPCClientFactory.testConnection(WikiRPCClientFactory.java:162) at org.trachacks.wikieditor.rpc.WikiClientImpl.testConnection(WikiClientImpl.java:62) at org.trachacks.wikieditor.service.WikiServiceImpl.testConnection(WikiServiceImpl.java:69) at org.trachacks.wikieditor.eclipse.plugin.model.Server.testConnection(Server.java:273) at org.trachacks.wikieditor.eclipse.plugin.model.Server.connect(Server.java:181)

... 71 more

Is this a configuration problem so that I can do anything about it or is it a possible defect?

Best regards,

Markus

comment:2 in reply to:  1 Changed 8 years ago by Ivan

Sorry I hit the wrong button...

Hi Markus, if the Trac server you are trying to connect is using a self-signed certificate then you will need to import the certificate to the jre keystore ( see WikiEditorForEclipsePlugin/FAQ )

If you have already imported the certificate before, may be that you are using a different jre now, maybe after an upgrade

the only thing that it have changed lately was related to connection through proxy, maybe it's worth to check if you have configured in eclipse a http proxy that uses a self-signed certificate (even if is not activated) in eclipse network settings

Regards Ivan

Replying to mrechtien:

Hi,

it's been a while since I last tested this nice hack - that time it worked with my trac installation. Now I updated to "0.0.6.200910151952". After setting up the connection I got the following error in Eclipse 3.5.1, which seems to be related to handling the ssl self-signed certificate...

Eclipse error details:

null Error Fri Oct 23 09:34:21 CEST 2009 javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.trachacks.wikieditor.rpc.xmlrpc.WikiRPCClientFactory.testConnection(WikiRPCClientFactory.java:162) at org.trachacks.wikieditor.rpc.WikiClientImpl.testConnection(WikiClientImpl.java:62) at org.trachacks.wikieditor.service.WikiServiceImpl.testConnection(WikiServiceImpl.java:69) at org.trachacks.wikieditor.eclipse.plugin.model.Server.testConnection(Server.java:273) at org.trachacks.wikieditor.eclipse.plugin.model.Server.connect(Server.java:181)

... 71 more

Is this a configuration problem so that I can do anything about it or is it a possible defect?

Best regards,

Markus

comment:3 Changed 8 years ago by mrechtien

Resolution: wontfix
Status: newclosed

Of course you were right, the certificate was not imported in the jre used with this installation ... sorry for the trouble!

Regards,

Markus

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ivan.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.