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] [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)) {