You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rakesh Vidyadharan <ra...@sptci.com> on 2006/02/23 15:56:29 UTC

Custom TrustManager issue

Hello,

I am trying to build a very simple webmail client that accesses my  
IMAPS server (self signed).  I downloaded the sample code presented  
in http://www.javaworld.com/javatips/jw-javatip115.html and got it  
working from the command line.  However, when I tried to implement  
the same code within a servlet, I get the following error:

javax.servlet.ServletException:  
sun.security.validator.ValidatorException: PKIX path building failed:  
sun.security.provider.certpath.SunCertPathBuilderException: unable to  
find valid certification path to requested target;
   nested exception is:
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.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:335)

It looks almost as though the custom TrustManager is not being  
consulted?  I am obviously missing some additional configuration step 
(s) when deploying in Tomcat.

You can download the source code from http://www.rakeshv.org/tmp/ 
imaps.zip.  I can run the program using the run.sh script fine, but  
the war file gives the above error when deployed on Tomcat 5.5.12,  
with Java 1.5.0_05-83

Thanks in advance for all help in solving this issue.

Rakesh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org