GeeCON Prague 2014*
The moose likes Sockets and Internet Protocols and the fly likes javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative" Watch "javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative" New topic
Author

javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative

amit sel
Greenhorn

Joined: Sep 26, 2013
Posts: 1
I am trying to open one htttps website. Url is for ex. https://10.100.908.000/. I have written the blow code.

String url = "https://10.94.218.114/";

URL obj = new URL(url);

HttpURLConnection con = (HttpURLConnection) obj.openConnection();

// optional default is GET
con.setRequestMethod("GET");

//add request header
con.setRequestProperty("User-Agent", USER_AGENT);


But its throwing the exception "javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative" . I am new to Java.
Can anyone help me how to resolve the above issue.

 
GeeCON Prague 2014
 
subject: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative