More Let's Encrypt Fixes

Ylian Saint-Hilaire committed Mar 5, 2020 at 11:27 UTC 8db708e588a1cc0e6c01d0f6af4383857873c7a9
1 file changed +1 -1
meshcentral.js
+1 -1
@@ -1068,7 +1068,7 @@ function CreateMeshCentralServer(config, args) {
1068 obj.certificateOperations.GetMeshServerCertificate(obj.args, obj.config, function (certs) {
1069 // Get the current node version
1070 const nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
1071 - if ((nodeVersion < 8) || (require('crypto').generateKeyPair == null) || (obj.config.letsencrypt == null) || (obj.redirserver == null)) {
1071 + if ((obj.config.letsencrypt == null) || (obj.redirserver == null) || (nodeVersion < 8) || ((obj.config.letsencrypt.lib != 'acme-client') && (require('crypto').generateKeyPair == null))) {
1072 obj.StartEx3(certs); // Just use the configured certificates
1073 } else if ((obj.config.letsencrypt != null) && (obj.config.letsencrypt.nochecks == true)) {
1074 // Use Let's Encrypt with no checking