From ac27882ad1a105759e0d740a43bb2c825f68a02e Mon Sep 17 00:00:00 2001 From: Ziver Koc Date: Sun, 22 Aug 2021 02:11:06 +0200 Subject: [PATCH] Fixed programmatically using a Certificate object for HttpServer --- hal-core/src/se/hal/HalServer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hal-core/src/se/hal/HalServer.java b/hal-core/src/se/hal/HalServer.java index dc349b7a..0fff6639 100644 --- a/hal-core/src/se/hal/HalServer.java +++ b/hal-core/src/se/hal/HalServer.java @@ -95,12 +95,12 @@ public class HalServer { HttpServer tmpHttpServer = null; if ("dns".equals(HalContext.getStringProperty(HalContext.CONFIG_HTTP_EXTERNAL_ACME_TYPE, ""))) { - acme = new AcmeClient(acmeDataStore, new AcmeManualDnsChallengeFactory(), AcmeClient.ACME_SERVER_LETSENCRYPT_STAGING); + acme = new AcmeClient(acmeDataStore, new AcmeManualDnsChallengeFactory()); } else if ("http".equals(HalContext.getStringProperty(HalContext.CONFIG_HTTP_EXTERNAL_ACME_TYPE, "http"))) { tmpHttpServer = new HttpServer(80); tmpHttpServer.start(); - acme = new AcmeClient(acmeDataStore, new AcmeHttpChallengeFactory(tmpHttpServer), AcmeClient.ACME_SERVER_LETSENCRYPT_STAGING); + acme = new AcmeClient(acmeDataStore, new AcmeHttpChallengeFactory(tmpHttpServer)); } else { throw new IllegalArgumentException("Unknown config value for " + externalServerUrl); } @@ -118,7 +118,7 @@ public class HalServer { } } - httpExternal = new HttpServer(HalContext.getIntegerProperty(CONFIG_HTTP_EXTERNAL_PORT), certificate); + httpExternal = new HttpServer(HalContext.getIntegerProperty(CONFIG_HTTP_EXTERNAL_PORT), acmeDataStore.getDomainKeyPair().getPrivate(), certificate); httpExternal.start(); logger.info("External https server up and running at: " + externalServerUrl);