fix for "handshake alert: unrecognized_name" (fix #685)

This commit is contained in:
Athou
2014-12-01 16:19:30 +01:00
parent d06359cb81
commit f93796d036

View File

@@ -58,6 +58,9 @@ public class HttpGetter {
private static SSLContext SSL_CONTEXT = null;
static {
// fix for "handshake alert: unrecognized_name"
System.setProperty("jsse.enableSNIExtension", "false");
try {
SSL_CONTEXT = SSLContext.getInstance("TLS");
SSL_CONTEXT.init(new KeyManager[0], new TrustManager[] { new DefaultTrustManager() }, new SecureRandom());