Skip to content

Commit 8fc63e9

Browse files
remove: remove obsolete ssl fix
1 parent a059396 commit 8fc63e9

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/main/java/gg/skytils/skytilsmod/tweaker/EssentialPlatformSetup.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -64,38 +64,6 @@ public static void setup() throws Throwable {
6464
EarlyTweakerLoader.ensureLoaded(SkytilsEarlyTweakerRegistrant.class);
6565
}
6666

67-
try {
68-
String ver = System.getProperty("java.runtime.version", "unknown");
69-
String javaLoc = System.getProperty("java.home");
70-
if (ver.contains("1.8.0_51") || javaLoc.contains("jre-legacy")) {
71-
System.out.println("Minecraft is running on legacy Java 8");
72-
Path keyStoreLoc = Paths.get("./config/skytils/updates/files/skytilscacerts.jks");
73-
File keyStoreFile = keyStoreLoc.toFile();
74-
//check if the file matches what's in the jar based on filesize
75-
if (!keyStoreFile.exists()) {
76-
System.out.println("Skytils is attempting to run keytool.");
77-
Files.createDirectories(keyStoreLoc.getParent());
78-
try (InputStream in = EssentialPlatformSetup.class.getResourceAsStream("/skytilscacerts.jks"); OutputStream os = Files.newOutputStream(keyStoreLoc)) {
79-
IOUtils.copy(Objects.requireNonNull(in), os);
80-
}
81-
String os = System.getProperty("os.name", "unknown");
82-
83-
Path keyStorePath = Paths.get(javaLoc, "lib", "security", "cacerts").toAbsolutePath();
84-
Path keyToolPath = Paths.get(javaLoc, "bin", (os.toLowerCase(Locale.ENGLISH).startsWith("windows") ? "keytool.exe" : "keytool")).toAbsolutePath();
85-
File log = new File("./config/skytils/updates/files/sslfix-" + System.currentTimeMillis() + ".log");
86-
new ProcessBuilder()
87-
.command(keyToolPath.toString(), "-importkeystore", "-srckeystore", keyStoreFile.getAbsolutePath(), "-destkeystore", keyStorePath.toString(), "-srcstorepass", "skytilsontop", "-deststorepass", "changeit", "-noprompt")
88-
.redirectOutput(log)
89-
.redirectError(log)
90-
.start().waitFor();
91-
System.out.println("A reboot of Minecraft is required for the code to work, force closing the game");
92-
exit();
93-
}
94-
}
95-
} catch (Throwable t) {
96-
t.printStackTrace();
97-
}
98-
9967
registerTransformerExclusions(
10068
"kotlin.",
10169
"kotlinx.",

0 commit comments

Comments
 (0)