feat: add ssl.com ca

This commit is contained in:
Fu Diwei
2025-03-30 21:46:59 +08:00
parent a72737fdd5
commit f77c2dae23
19 changed files with 285 additions and 96 deletions

View File

@@ -1,3 +1,5 @@
import { type ApplyCAProviderType } from "./provider";
export const SETTINGS_NAMES = Object.freeze({
EMAILS: "emails",
NOTIFY_TEMPLATES: "notifyTemplates",
@@ -134,37 +136,12 @@ export const notifyChannelsMap: Map<NotifyChannel["type"], NotifyChannel> = new
// #endregion
// #region Settings: SSLProvider
export const SSLPROVIDERS = Object.freeze({
LETS_ENCRYPT: "letsencrypt",
LETS_ENCRYPT_STAGING: "letsencryptstaging",
ZERO_SSL: "zerossl",
GOOGLE_TRUST_SERVICES: "googletrustservices",
} as const);
export type SSLProviders = (typeof SSLPROVIDERS)[keyof typeof SSLPROVIDERS];
export type SSLProviderSettingsContent = {
provider: (typeof SSLPROVIDERS)[keyof typeof SSLPROVIDERS];
provider: ApplyCAProviderType;
config: {
[key: string]: Record<string, unknown> | undefined;
[SSLPROVIDERS.LETS_ENCRYPT]?: SSLProviderLetsEncryptConfig;
[SSLPROVIDERS.LETS_ENCRYPT_STAGING]?: SSLProviderLetsEncryptConfig;
[SSLPROVIDERS.ZERO_SSL]?: SSLProviderZeroSSLConfig;
[SSLPROVIDERS.GOOGLE_TRUST_SERVICES]?: SSLProviderGoogleTrustServicesConfig;
};
};
export type SSLProviderLetsEncryptConfig = NonNullable<unknown>;
export type SSLProviderZeroSSLConfig = {
eabKid: string;
eabHmacKey: string;
};
export type SSLProviderGoogleTrustServicesConfig = {
eabKid: string;
eabHmacKey: string;
};
// #endregion
// #region Settings: Persistence