diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java index 2bfead8d..fc624a3b 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java @@ -11,6 +11,7 @@ import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.request.Request; +import ru.gravit.launcher.request.update.LegacyLauncherRequest; import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.stream.StreamObject; @@ -34,8 +35,6 @@ import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.PosixFilePermission; import java.util.*; -import java.util.Timer; -import java.util.concurrent.TimeUnit; public final class ClientLauncher { private static Gson gson = new Gson(); @@ -300,7 +299,6 @@ private static void launch(ClientProfile profile, Params params) throws Throwabl public static Process launch( HashedDir assetHDir, HashedDir clientHDir, ClientProfile profile, Params params, boolean pipeOutput) throws Throwable { - // Write params file (instead of CLI; Mustdie32 API can't handle command line > 32767 chars) LogHelper.debug("Writing ClientLauncher params"); ClientLauncherContext context = new ClientLauncherContext(); clientStarted = false; @@ -427,7 +425,6 @@ public static void main(String... args) throws Throwable { engine.runtimeProvider.init(true); engine.runtimeProvider.preLoad(); LauncherGuardManager.initGuard(true); - // Read and delete params file LogHelper.debug("Reading ClientLauncher params"); Params params; ClientProfile profile; @@ -438,8 +435,6 @@ public static void main(String... args) throws Throwable { try (HInput input = new HInput(socket.getInputStream())) { params = new Params(input); profile = gson.fromJson(input.readString(0), ClientProfile.class); - - // Read hdirs assetHDir = new HashedDir(input); clientHDir = new HashedDir(input); } @@ -455,8 +450,8 @@ public static void main(String... args) throws Throwable { Launcher.modulesManager.initModules(); // Verify ClientLauncher sign and classpath LogHelper.debug("Verifying ClientLauncher sign and classpath"); - //TODO: GO TO DIGEST - //SecurityHelper.verifySign(LegacyLauncherRequest.BINARY_PATH, params.launcherDigest, publicKey); + //Warning - experimental. + SecurityHelper.verifySign(LegacyLauncherRequest.BINARY_PATH, params.launcherDigest, Launcher.getConfig().publicKey); LinkedList classPath = resolveClassPathList(params.clientDir, profile.getClassPath()); for (Path classpathURL : classPath) { LauncherAgent.addJVMClassPath(classpathURL.toAbsolutePath().toString()); diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index 1a9366f9..95d23990 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -4,6 +4,7 @@ dependencies { compile project(':libLauncher') compile 'org.java-websocket:Java-WebSocket:1.3.9' + compile 'org.apache.httpcomponents:httpclient:4.5.7' compileOnly 'com.google.guava:guava:26.0-jre' compile files('../compat/authlib/authlib-clean.jar') }