修复启动恢复未等待实际证书切换导致残锁的问题
This commit is contained in:
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
|
||||
}
|
||||
Reference in new issue
Block a user