mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
perf: ssl.com支持ecc
This commit is contained in:
@@ -31,9 +31,28 @@ export const directory = {
|
|||||||
sslcom:{
|
sslcom:{
|
||||||
staging: 'https://acme.ssl.com/sslcom-dv-rsa',
|
staging: 'https://acme.ssl.com/sslcom-dv-rsa',
|
||||||
production: 'https://acme.ssl.com/sslcom-dv-rsa',
|
production: 'https://acme.ssl.com/sslcom-dv-rsa',
|
||||||
|
ec: 'https://acme.ssl.com/sslcom-dv-ecc',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export function getDirectoryUrl(opts) {
|
||||||
|
const {sslProvider, pkType} = opts
|
||||||
|
const list= directory[sslProvider]
|
||||||
|
if (!list) {
|
||||||
|
throw new Error(`sslProvider ${sslProvider} not found`)
|
||||||
|
}
|
||||||
|
pkType = pkType || 'rsa'
|
||||||
|
if (pkType) {
|
||||||
|
pkType = pkType.toLowerCase().split("_")[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pkType && list[pkType]) {
|
||||||
|
return list[pkType]
|
||||||
|
}
|
||||||
|
|
||||||
|
return list.production
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crypto
|
* Crypto
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
@@ -117,6 +117,8 @@ export const directory: {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export function getDirectoryUrl(opts:{sslProvider:string, pkType: string}): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crypto
|
* Crypto
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { logger } from "./index.js";
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import AsyncLock from "async-lock";
|
import AsyncLock from "async-lock";
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ export class AcmeService {
|
|||||||
await this.saveAccountConfig(email, conf);
|
await this.saveAccountConfig(email, conf);
|
||||||
this.logger.info(`创建新的Accountkey:${email}`);
|
this.logger.info(`创建新的Accountkey:${email}`);
|
||||||
}
|
}
|
||||||
const directoryUrl = acme.directory[this.sslProvider].production;
|
const directoryUrl = acme.getDirectoryUrl({ sslProvider: this.sslProvider, pkType: this.options.privateKeyType });
|
||||||
if (this.options.useMappingProxy) {
|
if (this.options.useMappingProxy) {
|
||||||
urlMapping.enabled = true;
|
urlMapping.enabled = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user