mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] WARN non signed modules
This commit is contained in:
parent
a3800958db
commit
f8aab10609
4 changed files with 8 additions and 19 deletions
|
@ -69,10 +69,10 @@ public static void main(String[] args) throws Exception {
|
|||
throw new IOException(e);
|
||||
}
|
||||
{
|
||||
LauncherTrustManager.CheckMode mode = (Version.RELEASE == Version.Type.LTS || Version.RELEASE == Version.Type.STABLE) ?
|
||||
(allowUnsigned ? LauncherTrustManager.CheckMode.WARN_IN_NOT_SIGNED : LauncherTrustManager.CheckMode.EXCEPTION_IN_NOT_SIGNED) :
|
||||
(allowUnsigned ? LauncherTrustManager.CheckMode.NONE_IN_NOT_SIGNED : LauncherTrustManager.CheckMode.WARN_IN_NOT_SIGNED);
|
||||
certificateManager.checkClass(LaunchServer.class, mode);
|
||||
//LauncherTrustManager.CheckMode mode = (Version.RELEASE == Version.Type.LTS || Version.RELEASE == Version.Type.STABLE) ?
|
||||
// (allowUnsigned ? LauncherTrustManager.CheckMode.WARN_IN_NOT_SIGNED : LauncherTrustManager.CheckMode.EXCEPTION_IN_NOT_SIGNED) :
|
||||
// (allowUnsigned ? LauncherTrustManager.CheckMode.NONE_IN_NOT_SIGNED : LauncherTrustManager.CheckMode.WARN_IN_NOT_SIGNED);
|
||||
certificateManager.checkClass(LaunchServer.class, LauncherTrustManager.CheckMode.NONE_IN_NOT_SIGNED);
|
||||
}
|
||||
|
||||
LaunchServerRuntimeConfig runtimeConfig;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.tree.*;
|
||||
import pro.gravit.utils.helper.IOHelper;
|
||||
import pro.gravit.utils.helper.JVMHelper;
|
||||
import pro.gravit.utils.helper.JarHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -16,17 +17,7 @@
|
|||
import static org.objectweb.asm.Opcodes.*;
|
||||
|
||||
public final class NodeUtils {
|
||||
public static final boolean JAVA9;
|
||||
|
||||
static {
|
||||
boolean java9 = false;
|
||||
try {
|
||||
Class.forName("java.lang.StackWalker");
|
||||
java9 = true;
|
||||
} catch (final Throwable e) {
|
||||
}
|
||||
JAVA9 = java9;
|
||||
}
|
||||
private NodeUtils() {
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
|
||||
import pro.gravit.launchserver.LaunchServer;
|
||||
import pro.gravit.launchserver.asm.NodeUtils;
|
||||
import pro.gravit.utils.helper.IOHelper;
|
||||
import pro.gravit.utils.helper.LogHelper;
|
||||
import pro.gravit.utils.helper.SecurityHelper;
|
||||
import pro.gravit.utils.helper.UnpackHelper;
|
||||
import pro.gravit.utils.helper.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
|
@ -61,7 +58,7 @@ public String[] buildConfig(Path inputJar, Path outputJar) {
|
|||
confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'");
|
||||
confStrs.add("-injar \'" + inputJar.toAbsolutePath() + "\'");
|
||||
confStrs.add("-outjar \'" + outputJar.toAbsolutePath() + "\'");
|
||||
Collections.addAll(confStrs, NodeUtils.JAVA9 ? JAVA9_OPTS : JAVA8_OPTS);
|
||||
Collections.addAll(confStrs, JVMHelper.JVM_VERSION >= 9 ? JAVA9_OPTS : JAVA8_OPTS);
|
||||
srv.launcherBinary.coreLibs.stream()
|
||||
.map(e -> "-libraryjars \'" + e.toAbsolutePath().toString() + "\'")
|
||||
.forEach(confStrs::add);
|
||||
|
|
|
@ -16,6 +16,7 @@ public class LaunchServerModulesManager extends SimpleModuleManager {
|
|||
public LaunchServerModulesManager(Path modulesDir, Path configDir, LauncherTrustManager trustManager) {
|
||||
super(modulesDir, configDir, trustManager);
|
||||
coreModule = new LaunchServerCoreModule();
|
||||
checkMode = LauncherTrustManager.CheckMode.NONE_IN_NOT_SIGNED;
|
||||
modules.add(coreModule);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue