Skip to content

Commit d7ccffa

Browse files
authored
wfe: remove special "multiple certificates" error (#6983)
This was introduced early in Boulder development when we had the concept of a "short serial" (monotonically increasing) which would be prepended to random bytes to form the full serial. We wanted to specially report the case that there were duplicates of a given short serial since it meant a problem with our monotonicity. We've long since abandoned that idea, and also this code can't be exercised because sa.SelectCertificate does a LIMIT 1 anyhow.
1 parent 947e199 commit d7ccffa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

wfe2/wfe.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,9 +1583,7 @@ func (wfe *WebFrontEndImpl) Certificate(ctx context.Context, logEvent *web.Reque
15831583

15841584
cert, err := wfe.sa.GetCertificate(ctx, &sapb.Serial{Serial: serial})
15851585
if err != nil {
1586-
if strings.HasPrefix(err.Error(), "gorp: multiple rows returned") {
1587-
wfe.sendError(response, logEvent, probs.Conflict("Multiple certificates with same serial"), nil)
1588-
} else if errors.Is(err, berrors.NotFound) {
1586+
if errors.Is(err, berrors.NotFound) {
15891587
wfe.sendError(response, logEvent, probs.NotFound("Certificate not found"), nil)
15901588
} else {
15911589
wfe.sendError(response, logEvent, web.ProblemDetailsForError(err, "Failed to retrieve certificate"), err)

0 commit comments

Comments
 (0)