diff --git a/1.13.1/build.properties b/1.13.1/build.properties index cc09380..d5de599 100644 --- a/1.13.1/build.properties +++ b/1.13.1/build.properties @@ -2,6 +2,6 @@ minecraft_version=1.13.1 minecraft_full_versions=1.13.1 #forge gradle needs forge version forge_mc_version=1.12.2 -forge_version=14.23.4.2705 +forge_version=14.23.5.2768 mappings_version=stable_39 srg_notch_map=1.13.1.srg \ No newline at end of file diff --git a/1.13.2/build.properties b/1.13.2/build.properties index 4fa3079..b8ccf54 100644 --- a/1.13.2/build.properties +++ b/1.13.2/build.properties @@ -2,6 +2,6 @@ minecraft_version=1.13.2 minecraft_full_versions=1.13.2 #forge gradle needs forge version forge_mc_version=1.12.2 -forge_version=14.23.4.2705 +forge_version=14.23.5.2768 mappings_version=stable_39 srg_notch_map=1.13.2.srg \ No newline at end of file diff --git a/1.13/build.properties b/1.13/build.properties index cd0d35c..3a988da 100644 --- a/1.13/build.properties +++ b/1.13/build.properties @@ -2,6 +2,6 @@ minecraft_version=1.13 minecraft_full_versions=1.13 #forge gradle needs forge version forge_mc_version=1.12.2 -forge_version=14.23.4.2705 +forge_version=14.23.5.2768 mappings_version=stable_39 srg_notch_map=1.13.srg \ No newline at end of file diff --git a/Common/source/customskinloader/utils/HttpUtil0.java b/Common/source/customskinloader/utils/HttpUtil0.java index 3ff7c16..2386fc5 100644 --- a/Common/source/customskinloader/utils/HttpUtil0.java +++ b/Common/source/customskinloader/utils/HttpUtil0.java @@ -1,15 +1,12 @@ package customskinloader.utils; +import java.io.IOException; import java.net.InetAddress; +import java.net.Socket; import java.net.UnknownHostException; import java.security.cert.X509Certificate; -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSession; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; +import javax.net.ssl.*; import org.apache.commons.lang3.StringUtils; @@ -37,7 +34,8 @@ public class HttpUtil0 { try { SSLContext sc = SSLContext.getInstance("TLS"); sc.init(null, trustAllCerts, new java.security.SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); + //HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); + HttpsURLConnection.setDefaultSSLSocketFactory(new SSLSocketFactoryFacade()); HttpsURLConnection.setDefaultHostnameVerifier(doNotVerify); } catch (Exception e) { e.printStackTrace(); @@ -76,4 +74,49 @@ public class HttpUtil0 { num+=Integer.parseInt(ips[i])*(256^(3-i)); return num; } + + //https://stackoverflow.com/questions/30817934/extended-server-name-sni-extension-not-sent-with-jdk1-8-0-but-send-with-jdk1-7 + public static class SSLSocketFactoryFacade extends SSLSocketFactory { + + SSLSocketFactory sslsf; + + public SSLSocketFactoryFacade() { + sslsf = (SSLSocketFactory) SSLSocketFactory.getDefault();; + } + + @Override + public String[] getDefaultCipherSuites() { + return sslsf.getDefaultCipherSuites(); + } + + @Override + public String[] getSupportedCipherSuites() { + return sslsf.getSupportedCipherSuites(); + } + + @Override + public Socket createSocket(Socket socket, String s, int i, boolean b) throws IOException { + return sslsf.createSocket(socket, s, i, b); + } + + @Override + public Socket createSocket(String s, int i) throws IOException, UnknownHostException { + return sslsf.createSocket(s, i); + } + + @Override + public Socket createSocket(String s, int i, InetAddress inetAddress, int i1) throws IOException, UnknownHostException { + return sslsf.createSocket(s, i, inetAddress, i1); + } + + @Override + public Socket createSocket(InetAddress inetAddress, int i) throws IOException { + return createSocket(inetAddress, i); + } + + @Override + public Socket createSocket(InetAddress inetAddress, int i, InetAddress inetAddress1, int i1) throws IOException { + return createSocket(inetAddress, i, inetAddress1, i1); + } + } } \ No newline at end of file diff --git a/Forge/build.gradle b/Forge/build.gradle index a2964ff..5e896c8 100644 --- a/Forge/build.gradle +++ b/Forge/build.gradle @@ -14,7 +14,7 @@ buildscript { apply plugin: 'net.minecraftforge.gradle.forge' ext.MINECRAFT_VERSION = "1.12.2" -ext.FORGE_VERSION = "14.23.4.2705" +ext.FORGE_VERSION = "14.23.5.2768" ext.MAPPING_VERSION = "stable_39" ext.MINECRAFT_FULL_VERSIONS = "1.8,1.8.8,1.8.9,1.9,1.9.4,1.10,1.10.2,1.11,1.11.2,1.12,1.12.1,1.12.2"