Skip to content

Commit

Permalink
Calculate required in a var like PerformValidation
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy committed Nov 19, 2024
1 parent a6d7f85 commit aee0ba1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion va/vampic.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func (va *ValidationAuthorityImpl) remoteDoDCV(ctx context.Context, req *vapb.DC
}(va.remoteVAs[i])
}

required := remoteVACount - va.maxRemoteFailures
var passed []string
var failed []string
passedRIRs := make(map[string]struct{})
Expand Down Expand Up @@ -161,7 +162,7 @@ func (va *ValidationAuthorityImpl) remoteDoDCV(ctx context.Context, req *vapb.DC
return summary, probs.ServerInternal("Secondary domain validation failed due to too many failures")
}

if len(passed) < (remoteVACount - va.maxRemoteFailures) {
if len(passed) < required {
// Too few successful responses to reach quorum.
if firstProb != nil {
firstProb.Detail = fmt.Sprintf("During secondary domain validation: %s", firstProb.Detail)
Expand Down

0 comments on commit aee0ba1

Please sign in to comment.