From 9c82d767817e1534e33491612191f10f7e79c31a Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 20 Jul 2024 19:19:41 +0700 Subject: [PATCH 1/4] [FEATURE][REFACTOR] Refactoring GenerateCertificateModule --- .../pro/gravit/launchserver/manangers/KeyAgreementManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/KeyAgreementManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/KeyAgreementManager.java index 4ddee0cc..4f42c5e3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/KeyAgreementManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/KeyAgreementManager.java @@ -22,6 +22,7 @@ public class KeyAgreementManager { public final RSAPublicKey rsaPublicKey; public final RSAPrivateKey rsaPrivateKey; public final String legacySalt; + public final Path keyDirectory; public KeyAgreementManager(ECPublicKey ecdsaPublicKey, ECPrivateKey ecdsaPrivateKey, RSAPublicKey rsaPublicKey, RSAPrivateKey rsaPrivateKey, String legacySalt) { this.ecdsaPublicKey = ecdsaPublicKey; @@ -29,9 +30,11 @@ public KeyAgreementManager(ECPublicKey ecdsaPublicKey, ECPrivateKey ecdsaPrivate this.rsaPublicKey = rsaPublicKey; this.rsaPrivateKey = rsaPrivateKey; this.legacySalt = legacySalt; + this.keyDirectory = null; } public KeyAgreementManager(Path keyDirectory) throws IOException, InvalidKeySpecException { + this.keyDirectory = keyDirectory; Path ecdsaPublicKeyPath = keyDirectory.resolve("ecdsa_id.pub"), ecdsaPrivateKeyPath = keyDirectory.resolve("ecdsa_id"); Logger logger = LogManager.getLogger(); if (IOHelper.isFile(ecdsaPublicKeyPath) && IOHelper.isFile(ecdsaPrivateKeyPath)) { From c2926b5b40d753e5860792216bfeddb3470f4b4f Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 20 Jul 2024 19:20:12 +0700 Subject: [PATCH 2/4] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 0b9e8819..9f1ccd0b 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 0b9e8819db5c3d7db874b334cfa629a73daabf01 +Subproject commit 9f1ccd0bbc767d04a8a2d2909cc050980c8a458f From 7d7485afdc46dab38aac869e25eeed3b275aaa00 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 21 Jul 2024 19:48:55 +0700 Subject: [PATCH 3/4] [FIX] Downloader downloadList truncate file --- .../src/main/java/pro/gravit/launcher/base/Downloader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java index 6eecdc21..6fb5bd20 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java @@ -256,7 +256,7 @@ protected HttpRequest makeHttpRequest(URI baseUri, String filePath) throws URISy } protected ProgressTrackingBodyHandler makeBodyHandler(Path file, DownloadCallback callback) { - return new ProgressTrackingBodyHandler<>(HttpResponse.BodyHandlers.ofFile(file, StandardOpenOption.CREATE, StandardOpenOption.WRITE), callback); + return new ProgressTrackingBodyHandler<>(HttpResponse.BodyHandlers.ofFile(file, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING), callback); } public interface DownloadCallback { From 68e9affbe0ee27985a3866472fb8d6ea3a618fb4 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 21 Jul 2024 20:17:51 +0700 Subject: [PATCH 4/4] [ANY] 5.6.5-stable --- LauncherCore/src/main/java/pro/gravit/utils/Version.java | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index 61f4deea..8201c010 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -6,7 +6,7 @@ public final class Version implements Comparable { public static final int MAJOR = 5; public static final int MINOR = 6; - public static final int PATCH = 4; + public static final int PATCH = 5; public static final int BUILD = 1; public static final Version.Type RELEASE = Type.STABLE; public final int major; diff --git a/build.gradle b/build.gradle index 2009e0fa..473b0c47 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ id 'org.openjfx.javafxplugin' version '0.1.0' apply false } group = 'pro.gravit.launcher' -version = '5.6.4' +version = '5.6.5' apply from: 'props.gradle'