From 8db708e588a1cc0e6c01d0f6af4383857873c7a9 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 5 Mar 2020 11:27:14 -0800 Subject: [PATCH] More Let's Encrypt Fixes --- meshcentral.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshcentral.js b/meshcentral.js index 56d09073..edfb9920 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -1068,7 +1068,7 @@ function CreateMeshCentralServer(config, args) { obj.certificateOperations.GetMeshServerCertificate(obj.args, obj.config, function (certs) { // Get the current node version const nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]); - if ((nodeVersion < 8) || (require('crypto').generateKeyPair == null) || (obj.config.letsencrypt == null) || (obj.redirserver == null)) { + if ((obj.config.letsencrypt == null) || (obj.redirserver == null) || (nodeVersion < 8) || ((obj.config.letsencrypt.lib != 'acme-client') && (require('crypto').generateKeyPair == null))) { obj.StartEx3(certs); // Just use the configured certificates } else if ((obj.config.letsencrypt != null) && (obj.config.letsencrypt.nochecks == true)) { // Use Let's Encrypt with no checking