add custom acme server url support #7450
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Dec 2, 2025 at 15:13 UTC
a01269620ffa9dcfa1a1abdbae943eb049be8c9f
3 files changed
+44
letsencrypt.js
+12
@@ -180,6 +180,18 @@ module.exports.CreateLetsEncrypt = function (parent) {
180
hmacKey: obj.zerossl.hmackey
181
}
182
});
183
+ } else if (obj.custom) {
184
+ if (obj.custom.kid == "") { obj.log("EAB KID hasn't been set, invalid configuration."); return; }
185
+ if (obj.custom.hmackey == "") { obj.log("EAB HMAC KEY hasn't been set, invalid configuration."); return; }
186
+ if (obj.custom.server == "") { obj.log("Custom ACME server URL hasn't been set, invalid configuration."); return; }
187
+ obj.client = new acme.Client({
188
+ directoryUrl: obj.custom.server,
189
+ accountKey: accountKey,
190
+ externalAccountBinding: {
191
+ kid: obj.custom.kid,
192
+ hmacKey: obj.custom.hmackey
193
+ }
194
+ });
195
} else {
196
obj.client = new acme.Client({
197
directoryUrl: obj.runAsProduction ? acme.directory.letsencrypt.production : acme.directory.letsencrypt.staging,
meshcentral-config-schema.json
+26
@@ -4014,6 +4014,32 @@
4014
"default": false,
4015
"description": "If you choose \"true\", MeshCentral won't verify if \"email\" is valid, has a valid MX record, AND if \"names\" doesn't contain a wildcard, can be resolved by DNS A/AAAA record."
4016
},
4017
+ "acme": {
4018
+ "type": "object",
4019
+ "description": "If this object is set, we will use a custom acme server with custom kid and hmackey for SSL creation instead of Let's Encrypt",
4020
+ "required": [
4021
+ "server",
4022
+ "kid",
4023
+ "hmackey"
4024
+ ],
4025
+ "properties": {
4026
+ "server": {
4027
+ "type": "string",
4028
+ "description": "ACME server URL e.g. https://acme.zerossl.com/v2/DV90",
4029
+ "default": ""
4030
+ },
4031
+ "kid": {
4032
+ "type": "string",
4033
+ "description": "EAB KID",
4034
+ "default": ""
4035
+ },
4036
+ "hmackey": {
4037
+ "type": "string",
4038
+ "description": "EAB HMAC KEY",
4039
+ "default": ""
4040
+ }
4041
+ }
4042
+ },
4043
"zerossl": {
4044
"type": "object",
4045
"description": "If this object is set, we will use ZeroSSL for SSL creation instead of Let's Encrypt",
sample-config-advanced.json
+6
@@ -612,6 +612,12 @@
612
"names": "myserver.com,customer1.myserver.com",
613
"skipChallengeVerification": false,
614
"production": false,
615
+ "rsaKeySize": 2048,
616
+ "custom": {
617
+ "server": "https://acme.zerossl.com/v2/DV90",
618
+ "kid": "a1b2c3d4e5",
619
+ "hmacKey": "a1b2c3d4e5"
620
+ },
621
"zerossl": {
622
"kid": "a1b2c3d4e5",
623
"hmacKey": "a1b2c3d4e5"