[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipse-dev] Eclipse Mars system.setproperty javax.net.ssh.truststore not working anymore ?
|
Jasintha,
I think this is not an Eclipse issue. It's a general issue in Java. Thus, I'd advice you to ask this on a broader forum such as Stackoverflow or so.
FWIW, just keep in mind that your plug-in is not the only plug-in running in Eclipse. There is a time between setting a system property till your SSL code is actually executed. During that time, another plug-in could have changed the setting completely.
Another thing to consider - by setting a system wide truststore you might completely jeopardize the user's Eclipse application, exposing the user to an unknown security risk. If possible I suggest rewriting the code to not rely on the system settings by using your own SSLContext with your specific trust store.
See here for an example with Apache HC:
https://hc.apache.org/httpcomponents-client-ga/httpclient/examples/org/apache/http/examples/client/ClientCustomSSL.java
For further information, please reach out vie Stackoverflow.
-Gunnar
--
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx, http://guw.io/
> Am 06.04.2016 um 22:15 schrieb Jasintha Dasanayaka <jasinthad@xxxxxxxxx>:
>
> Hi Devs
>
> I am trying to connect to a web server using SSL connection through an eclipse plugin developed by us.Since the server uses a self signed certificate , I am making use of the following code to set the trust store path :
>
> System.setProperty("javax.net.ssl.trustStore", path);
>
> System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon123");
>
> System.setProperty("javax.net.ssl.trustStoreType","JKS");
>
> *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.*
>
> This plugin worked in eclipse Luna without any issue , Any thought please ?
>
> Also notice that this issue has been raised before in Eclipse forum and stack overflow but nobody answered
>
> Thanks and Regards
> /Jasintha
>
> --
> Thanks & Regards
>
> Jasintha Dasanayake
> WSO2 Inc
>
> mobile +94 (0)71 624 1368 ,
>
> _______________________________________________
> eclipse-dev mailing list
> eclipse-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/eclipse-dev