mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
perf: 证书申请支持letencrypt profile选项
This commit is contained in:
@@ -75,6 +75,9 @@ export default async (client, userOpts) => {
|
||||
|
||||
log("[auto] Placing new certificate order with ACME provider");
|
||||
const orderPayload = { identifiers: uniqueDomains.map((d) => ({ type: "dns", value: d })) };
|
||||
if (opts.profile && client.sslProvider === 'letsencrypt' ){
|
||||
orderPayload.profile = opts.profile;
|
||||
}
|
||||
const order = await client.createOrder(orderPayload);
|
||||
const authorizations = await client.getAuthorizations(order);
|
||||
|
||||
|
||||
@@ -90,10 +90,12 @@ const defaultOpts = {
|
||||
*/
|
||||
|
||||
class AcmeClient {
|
||||
sslProvider
|
||||
constructor(opts) {
|
||||
if (!Buffer.isBuffer(opts.accountKey)) {
|
||||
opts.accountKey = Buffer.from(opts.accountKey);
|
||||
}
|
||||
this.sslProvider = opts.sslProvider;
|
||||
|
||||
this.opts = { ...defaultOpts, ...opts };
|
||||
this.backoffOpts = {
|
||||
|
||||
1
packages/core/acme-client/types/index.d.ts
vendored
1
packages/core/acme-client/types/index.d.ts
vendored
@@ -66,6 +66,7 @@ export interface ClientAutoOptions {
|
||||
challengePriority?: string[];
|
||||
preferredChain?: string;
|
||||
signal?: AbortSignal;
|
||||
profile?:string;
|
||||
}
|
||||
|
||||
export class Client {
|
||||
|
||||
Reference in New Issue
Block a user