Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Overriding the Security Certificate

Omkar Shetkar
Ranch Hand
Posts: 81
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


String httpsURL = "";

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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic