修复启动恢复未等待实际证书切换导致残锁的问题

This commit is contained in:
xuans committed 2026-10-01 22:06:04 +08:00
1 parent adbb3980ff
commit 00aeedc3ef
3 files changed
+147 -2

No files matched your search

@@ -0,0 +1,27 @@
package app
import (
"context"
"git.pcux.cn/xuans/Scert/backend/internal/certificate"
"git.pcux.cn/xuans/Scert/backend/internal/deployment"
)
func verifyRecoveryHTTPS(
ctx context.Context,
validate func(context.Context, string, string, []string) (certificate.ValidationResult, error),
server deployment.Server,
baseline deployment.RecoveryBaseline,
expected string,
) (certificate.ValidationResult, error) {
var result certificate.ValidationResult
workflow := CertificateWorkflow{
RemoteVerifierForServer: func(ctx context.Context, target deployment.Server, endpoint string, domains []string) (certificate.ValidationResult, error) {
var err error
result, err = validate(ctx, endpoint, target.Address, domains)
return result, err
},
}
err := workflow.verifyRemoteDeploymentForServer(ctx, server, baseline.Endpoint, baseline.Domains, expected)
return result, err
}