Merge pull request #51 from certd/acme_sync

[acme] sync upgrade [trident-sync]
This commit is contained in:
Greper
2024-05-22 03:24:13 +08:00
committed by GitHub
7 changed files with 11 additions and 7 deletions
+2 -3
View File
@@ -59,9 +59,8 @@ module.exports = async function(client, userOpts) {
*/
log('[auto] Parsing domains from Certificate Signing Request');
const csrDomains = readCsrDomains(opts.csr);
const domains = [csrDomains.commonName].concat(csrDomains.altNames);
const uniqueDomains = Array.from(new Set(domains));
const { commonName, altNames } = readCsrDomains(opts.csr);
const uniqueDomains = Array.from(new Set([commonName].concat(altNames).filter((d) => d)));
log(`[auto] Resolved ${uniqueDomains.length} unique domains from parsing the Certificate Signing Request`);
+1 -1
View File
@@ -261,7 +261,7 @@ class AcmeClient {
const accountUrl = this.api.getAccountUrl();
/* Create new HTTP and API clients using new key */
const newHttpClient = new HttpClient(this.opts.directoryUrl, newAccountKey);
const newHttpClient = new HttpClient(this.opts.directoryUrl, newAccountKey, this.opts.externalAccountBinding);
const newApiClient = new AcmeApi(newHttpClient, accountUrl);
/* Get old JWK */