Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I avoid "untrusted server cert chain"??

843811Jun 27 2001 — edited Jul 28 2001
I'm writing a Servlet that connects to an SSL-enabled site through an HttpsURLConnection, grabs a file from the server, saves it into a byte array, and sends that back to the client's web browser (the servlet is essentially acting as a proxy server for various reasons).

When I try to connect to one of our dev servers that has an SSL certificate we generated ourself (by doing mySecureConn = (HttpsURLConnection)url.openConnection ()), I get the "untrusted server cert chain" SSLException. When I try to connect to a website that is "trusted", such as "https://www.us.buy.com/retail/computers/category.asp", it works perfectly fine.

Is there any way around the SSLException being thrown (i.e. can I connect to the un-trusted server anyway)?

Thanks.

-
Dave Feltenberger
dave@pipelineinteractive.com
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2001
Added on Jun 27 2001
4 comments
434 views