File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Overriding the Security Certificate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Overriding the Security Certificate" Watch "Overriding the Security Certificate" New topic
Author

Overriding the Security Certificate

Omkar Shetkar
Ranch Hand

Joined: Jun 22, 2006
Posts: 41

Hi All,

I am trying to connect to a dummy site with ssl. This site is setup for testing. Right now no valid security certificate is associated with this site.


import javax.net.ssl.HttpsURLConnection;
import java.net.URL;

String httpsURL = "https://www.site.com/";

URL myurl = new URL(httpsURL);

HttpsURLConnection con =
(HttpsURLConnection) myurl.openConnection();

When I try to execute the above code I get Invalid Certificate as the exception message. Is there any way to override the security certificate settings for HttpsURLConnections?

Thanks in Advance


http://writingsontech.blogspot.in/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Overriding the Security Certificate
 
Similar Threads
HTTPS Certificate Requests
Problem in httpsConnection
HTTPS and Java
certificate format for cacerts
Servlets and SSL