|Eclipse does not accept https certificate [message #1694499]
||Tue, 05 May 2015 16:24
| Zoltan Ujhelyi
Registered: July 2015
I have a very strange issue with a https certificate and Eclipse. We are trying to provide a private p2 repository url over https, and we have a signed certificate for that site.
However, we have noticed that although the certificate seems to be ok for browsers, asking p2 to install the software from there fails because of certificate issues.
After some experimentation I have found a code snippet that can be used for testing https connections, and I have found, that the certificate works fine in standard Java applications, but does not work in Eclipse applications.
The Github gist https://gist.github.com/ujhelyiz/296feaecd87db2478016 shows this snippet: it opens a Java connection to an URL, and prints out the results, or exceptions. If I execute this file as a JUnit test, I get the expected outcome, while if I run as an Eclipse plug-in test, it does not accept our certificate with an exception: "sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" (the whole trace is available from the linked gist).
My question is the following: how does Eclipse behave differently than a normal Java application (with default java certificate store and default Eclipse installation)? Is there something wrong with the certificate available from static.incquerylabs.com (e.g. is it any problem that it is a wildcard certificate)?
I would be glad for any kind of help. Thanks,
Powered by FUDForum
. Page generated in 0.01580 seconds