mirror of
https://github.com/certd/certd.git
synced 2026-04-28 07:57:25 +08:00
perf: add preferred chain option (#519) @ZeroClover
This commit is contained in:
@@ -329,8 +329,9 @@ export class AcmeService {
|
|||||||
isTest?: boolean;
|
isTest?: boolean;
|
||||||
privateKeyType?: string;
|
privateKeyType?: string;
|
||||||
profile?: string;
|
profile?: string;
|
||||||
|
preferredChain?: string;
|
||||||
}): Promise<CertInfo> {
|
}): Promise<CertInfo> {
|
||||||
const { email, isTest, csrInfo, dnsProvider, domainsVerifyPlan, profile } = options;
|
const { email, isTest, csrInfo, dnsProvider, domainsVerifyPlan, profile, preferredChain } = options;
|
||||||
const client: acme.Client = await this.getAcmeClient(email, isTest);
|
const client: acme.Client = await this.getAcmeClient(email, isTest);
|
||||||
|
|
||||||
let domains = options.domains;
|
let domains = options.domains;
|
||||||
@@ -404,6 +405,7 @@ export class AcmeService {
|
|||||||
},
|
},
|
||||||
signal: this.options.signal,
|
signal: this.options.signal,
|
||||||
profile,
|
profile,
|
||||||
|
preferredChain,
|
||||||
});
|
});
|
||||||
|
|
||||||
const crtString = crt.toString();
|
const crtString = crt.toString();
|
||||||
|
|||||||
@@ -292,6 +292,29 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
})
|
})
|
||||||
certProfile!: string;
|
certProfile!: string;
|
||||||
|
|
||||||
|
@TaskInput({
|
||||||
|
title: "首选链",
|
||||||
|
value: "ISRG Root X1",
|
||||||
|
component: {
|
||||||
|
name: "a-select",
|
||||||
|
vModel: "value",
|
||||||
|
options: [
|
||||||
|
{ value: "ISRG Root X1", label: "ISRG Root X1" },
|
||||||
|
{ value: "ISRG Root X2", label: "ISRG Root X2" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
helper: "仅 Let's Encrypt 可选,默认为 ISRG Root X1",
|
||||||
|
required: false,
|
||||||
|
mergeScript: `
|
||||||
|
return {
|
||||||
|
show: ctx.compute(({form})=>{
|
||||||
|
return form.sslProvider === 'letsencrypt'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
})
|
||||||
|
preferredChain!: string;
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "使用代理",
|
title: "使用代理",
|
||||||
value: false,
|
value: false,
|
||||||
@@ -438,6 +461,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
isTest: false,
|
isTest: false,
|
||||||
privateKeyType: this.privateKeyType,
|
privateKeyType: this.privateKeyType,
|
||||||
profile: this.certProfile,
|
profile: this.certProfile,
|
||||||
|
preferredChain: this.preferredChain,
|
||||||
});
|
});
|
||||||
|
|
||||||
const certInfo = this.formatCerts(cert);
|
const certInfo = this.formatCerts(cert);
|
||||||
|
|||||||
@@ -934,6 +934,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
|||||||
"sslProvider": "letsencrypt",
|
"sslProvider": "letsencrypt",
|
||||||
"privateKeyType": "rsa_2048",
|
"privateKeyType": "rsa_2048",
|
||||||
"certProfile": "classic",
|
"certProfile": "classic",
|
||||||
|
"preferredChain": "ISRG Root X1",
|
||||||
"useProxy": false,
|
"useProxy": false,
|
||||||
"skipLocalVerify": false,
|
"skipLocalVerify": false,
|
||||||
"maxCheckRetryCount": 20,
|
"maxCheckRetryCount": 20,
|
||||||
|
|||||||
Reference in New Issue
Block a user