This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes HTTPS and Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "HTTPS and Java" Watch "HTTPS and Java" New topic

HTTPS and Java

Matthew Mellott

Joined: Nov 29, 2010
Posts: 14
So I've been trying to post to this url. Every diffrent way I try it I get the same errors:

I have no idea what these errors mean, let alone how to fix them. Here's my code:

I've used the SSLSocket class before without getting this error. I also tried implementing the above code using an SSLSocket and got identical errors to the ones above.
Thanks for the help!
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41148
You're in luck: that's a FAQ - the SecurityFaq answers it.

Ping & DNS - my free Android networking tools app
Unnar Björnsson
Ranch Hand

Joined: Apr 30, 2005
Posts: 164
I've never done any http work with java but it seems to me that the site you are requesting https connection is missing or has expired SSL certificate. If you request webpage through https that has no SSL via browser the browser emits a warning. You can add an exception to that site if you want to, similarly (assuming that my first assumption about this exception is correct) you should be able to ignore this exception by putting the corresponding code in a try-catch block.
jQuery in Action, 2nd edition
subject: HTTPS and Java
Similar Threads
HELP:Regarding CAed SSL certificate!
Not able to add certificate in keystore
https client certificate
https client certificate
HTTP transport error - Webservices call