| CertPathBuilderException from Plugin [message #52245] | 
Thu, 26 March 2009 21:21   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
I'm developing an Eclipse plugin that makes a REST call over https.  The  
SSL certificate on the server is not valid, changes frequently, and and  
will remain that way.  To compensate, I have added the following code,  
which works when I run test cases (outside of the Eclipse plugin  
environment). 
 
Security.addProvider(new MyProvider()); 
Security.setProperty("ssl.TrustManagerFactory.algorithm",TrustAllCertificates "); 
 
When I run the code as an eclipse plugin, I get I long stack trace, at the  
bottom of which is: 
Caused by: java.security.cert.CertPathBuilderException: unable to find  
valid certification path to requested target 
	at  
 com.ibm.security.cert.PKIXCertPathBuilderImpl.buildCertPath( PKIXCertPathBuilderImpl.java:379) 
	at  
 com.ibm.security.cert.PKIXCertPathBuilderImpl.engineBuild(PK IXCertPathBuilderImpl.java:195) 
	at  java.security.cert.CertPathBuilder.build(CertPathBuilder.jav a:215) 
	at com.ibm.jsse2.util.f.b(f.java:80) 
	... 31 more 
 
The stack trace is the same as the one I get when I don't include the  
compensating code and run as a test. Why am I getting different results in  
the plugin environment?  Are there any workarounds?
 |  
 |  
  | 
 | 
 | 
Powered by 
FUDForum. Page generated in 0.05304 seconds