perf: 支持证书颁发机构 LiteSSL

https://github.com/certd/certd/issues/590
This commit is contained in:
xiaojunnuo
2025-11-30 01:30:47 +08:00
parent 73325aaefb
commit 6be7591332
4 changed files with 27 additions and 2 deletions

View File

@@ -32,7 +32,11 @@ export const directory = {
staging: 'https://acme.ssl.com/sslcom-dv-rsa',
production: 'https://acme.ssl.com/sslcom-dv-rsa',
ec: 'https://acme.ssl.com/sslcom-dv-ecc',
}
},
litessl: {
staging: 'https://acme.litessl.com/acme/v2/directory',
production: 'https://acme.litessl.com/acme/v2/directory',
},
};
export function getDirectoryUrl(opts) {

View File

@@ -136,6 +136,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
{ value: "letsencrypt", label: "Let's Encrypt免费新手推荐", icon: "simple-icons:letsencrypt" },
{ value: "google", label: "Google免费", icon: "flat-color-icons:google" },
{ value: "zerossl", label: "ZeroSSL免费", icon: "emojione:digit-zero" },
{ value: "litessl", label: "litessl免费", icon: "roentgen:free" },
{ value: "sslcom", label: "SSL.com仅主域名和www免费", icon: "la:expeditedssl" },
{ value: "letsencrypt_staging", label: "Let's Encrypt测试环境IP证书", icon: "simple-icons:letsencrypt" },
],
@@ -250,6 +251,13 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
})
sslcomCommonEabAccessId!: number;
@TaskInput({
title: "litessl公共EAB授权",
isSys: true,
show: false,
})
litesslCommonEabAccessId!: number;
@TaskInput({
title: "EAB授权",
component: {
@@ -262,13 +270,15 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
"需要提供EAB授权" +
"\nZeroSSL请前往[zerossl开发者中心](https://app.zerossl.com/developer),生成 'EAB Credentials'" +
"\nGoogle:请查看[google获取eab帮助文档](https://certd.docmirror.cn/guide/use/google/)用过一次后会绑定邮箱后续复用EAB要用同一个邮箱" +
"\nSSL.com:[SSL.com账号页面](https://secure.ssl.com/account),然后点击api credentials链接然后点击编辑按钮查看Secret key和HMAC key",
"\nSSL.com:[SSL.com账号页面](https://secure.ssl.com/account),然后点击api credentials链接然后点击编辑按钮查看Secret key和HMAC key" +
"\nlitessl:[litesslEAB页面](https://freessl.cn/automation/eab-manager),然后点击新增EAB",
mergeScript: `
return {
show: ctx.compute(({form})=>{
return (form.sslProvider === 'zerossl' && !form.zerosslCommonEabAccessId)
|| (form.sslProvider === 'google' && !form.googleCommonEabAccessId)
|| (form.sslProvider === 'sslcom' && !form.sslcomCommonEabAccessId)
|| (form.sslProvider === 'litessl' && !form.litesslCommonEabAccessId)
})
}
`,

View File

@@ -93,6 +93,7 @@ export type PluginConfigBean = {
export type CertApplyPluginSysInput = {
googleCommonEabAccessId?: number;
zerosslCommonEabAccessId?: number;
litesslCommonEabAccessId?: number;
};
export type PluginSysSetting<T> = {
sysSetting: {

View File

@@ -26,6 +26,16 @@
</div>
</a-form-item>
<a-form-item label="公共litessl EAB授权" :name="['CertApply', 'sysSetting', 'input', 'litesslCommonEabAccessId']">
<access-selector v-model:model-value="formState.CertApply.sysSetting.input.litesslCommonEabAccessId" type="eab" from="sys"></access-selector>
<div class="helper">
<div>设置公共litessl EAB授权给用户使用避免用户自己获取litessl EAB授权</div>
<div>
<a href="https://freessl.cn/automation/eab-manager">litessl EAB授权管理 </a>
</div>
</div>
</a-form-item>
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
<a-button :loading="saveLoading" type="primary" html-type="submit">保存</a-button>
</a-form-item>