接入按服务器HTTPS校验

将生产证书部署工作流接入按目标服务器地址进行HTTPS验证,保留域名SNI和证书链校验。
This commit is contained in:
xuans 2026-10-01 06:43:25 +08:00
parent 840d48d2e5
commit 1164d502ca

View File

@ -134,8 +134,8 @@ func NewWithConfigPath(ctx context.Context, cfg config.Config, configPath string
Domains: repo,
Servers: serverRepo,
Deployment: deploymentService,
RemoteVerifier: func(ctx context.Context, endpoint string, expectedDomains []string) (certificate.ValidationResult, error) {
return remoteValidator.ValidateHTTPS(ctx, endpoint, expectedDomains)
RemoteVerifierForServer: func(ctx context.Context, server deployment.Server, endpoint string, expectedDomains []string) (certificate.ValidationResult, error) {
return remoteValidator.ValidateHTTPSAt(ctx, endpoint, server.Address, expectedDomains)
},
Notifier: notifier,
NotifyError: func(err error) { logger.Error("发送邮件通知失败", "error", err) },