mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] Bug fixes
This commit is contained in:
parent
edbed3db1d
commit
1cb2369bfa
3 changed files with 12 additions and 9 deletions
|
@ -317,7 +317,7 @@ public void run() {
|
|||
LogHelper.error(e);
|
||||
LogHelper.error("Updates/Profiles not synced");
|
||||
}
|
||||
});
|
||||
}).start();
|
||||
}
|
||||
if (config.netty != null)
|
||||
rebindNettyServerSocket();
|
||||
|
|
|
@ -13,6 +13,7 @@ public static void registerComponents() {
|
|||
providers.register("authLimiter", AuthLimiterComponent.class);
|
||||
providers.register("regLimiter", RegLimiterComponent.class);
|
||||
providers.register("commandRemover", CommandRemoverComponent.class);
|
||||
providers.register("proguard", ProGuardComponent.class);
|
||||
registredComp = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,10 +28,8 @@
|
|||
|
||||
import java.io.*;
|
||||
import java.math.BigInteger;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.SimpleFileVisitor;
|
||||
import java.net.URL;
|
||||
import java.nio.file.*;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.security.*;
|
||||
import java.security.cert.CertificateException;
|
||||
|
@ -170,12 +168,16 @@ public X509CertificateHolder readCertificate(Reader reader) throws IOException {
|
|||
public void readTrustStore(Path dir) throws IOException, CertificateException {
|
||||
if (!IOHelper.isDir(dir)) {
|
||||
Files.createDirectories(dir);
|
||||
try {
|
||||
URL inBuildCert = IOHelper.getResourceURL("pro/gravit/launchserver/defaults/BuildCertificate.crt");
|
||||
try (OutputStream outputStream = IOHelper.newOutput(dir.resolve("BuildCertificate.crt"));
|
||||
InputStream inputStream = IOHelper.newInput(IOHelper.getResourceURL("pro/gravit/launchserver/defaults/BuildCertificate.crt"))) {
|
||||
InputStream inputStream = IOHelper.newInput(inBuildCert)) {
|
||||
IOHelper.transfer(inputStream, outputStream);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
} catch (NoSuchFileException ignored) {
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
if(IOHelper.exists(dir.resolve("GravitCentralRootCA.crt"))) {
|
||||
LogHelper.warning("Found old default certificate - 'GravitCentralRootCA.crt'. Delete...");
|
||||
|
|
Loading…
Reference in a new issue