diff --git a/jams-server/src/main/java/net/jami/jams/server/licensing/LicenseService.java b/jams-server/src/main/java/net/jami/jams/server/licensing/LicenseService.java index 2dd3badda888906b58cdc695afba8a111dd9c1e3..772a2fd438bf350a37ada3809a1da708f543a472 100644 --- a/jams-server/src/main/java/net/jami/jams/server/licensing/LicenseService.java +++ b/jams-server/src/main/java/net/jami/jams/server/licensing/LicenseService.java @@ -69,18 +69,16 @@ public class LicenseService { } try { certificate.verify(caCertificate.getPublicKey()); + //If all these checks have passed then: + Server.activated.set(true); + log.info("Server is activated with valid license: {}", Server.activated.get()); + Server.appUpdater.setLicense(certificate,privateKey); + log.info("Successfully set license inside updater module!"); } catch (Exception e) { log.error("The license file you have provided could not be verified!"); Server.activated.set(false); } - //If all these checks have passed then: - Server.activated.set(true); - licenseInformation = X509Utils.extractSubscriptionTypeFromCertificate(certificate); - log.info("Server is activated with valid license: {}", Server.activated.get()); - log.info("License type: {}",licenseInformation.getType()); - Server.appUpdater.setLicense(certificate,privateKey); - log.info("Successfully set license inside updater module!"); } catch (Exception e){ log.error("A generic occurred while trying to load your license or your license could not be found");