Cannot connect using URLConnection and JSSE
Hi,
I am using the following code:
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
I also pass -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
as argument to the java VM. However, the code below throws IOException with the message: "HTTPS hostname wrong: should be <mail.yahoo.com>"
URLConnection con;
URL url = new URL("https://mail.yahoo.com");
con = url.openConnection();
con.connect();
What can I do?

