Remove leftover ACMEv1 combinations code (#6640)

Clean up unused ACMEv1 "combinations" code.

Fixes #6624
This commit is contained in:
Phil Porada 2023-02-08 12:36:35 -05:00 committed by GitHub
parent 6dae612e81
commit 3f3962bef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 15 deletions

View File

@ -337,9 +337,6 @@ type Authorization struct {
// slice and the order of these challenges may not be predictable.
Challenges []Challenge `json:"challenges,omitempty" db:"-"`
// This field is deprecated. It's filled in by WFE for the ACMEv1 API.
Combinations [][]int `json:"combinations,omitempty" db:"combinations"`
// Wildcard is a Boulder-specific Authorization field that indicates the
// authorization was created as a result of an order containing a name with
// a `*.`wildcard prefix. This will help convey to users that an

View File

@ -76,7 +76,7 @@ message Authorization {
string status = 4;
int64 expires = 5; // Unix timestamp (nanoseconds)
repeated core.Challenge challenges = 6;
reserved 7; // previously combinations
reserved 7; // previously ACMEv1 combinations
reserved 8; // previously v2
}

View File

@ -1144,10 +1144,6 @@ func (wfe *WebFrontEndImpl) prepAuthorizationForDisplay(request *http.Request, a
authz.ID = ""
authz.RegistrationID = 0
// Combinations are a relic of the V1 API. Since they are tagged omitempty we
// can set this field to nil to avoid sending it to users of the V2 API.
authz.Combinations = nil
// The ACME spec forbids allowing "*" in authorization identifiers. Boulder
// allows this internally as a means of tracking when an authorization
// corresponds to a wildcard request (e.g. to handle CAA properly). We strip

View File

@ -3234,7 +3234,6 @@ func TestPrepAuthzForDisplay(t *testing.T) {
ProvidedKeyAuthorization: " 🔑",
},
},
Combinations: [][]int{{1, 2, 3}, {4}, {5, 6}},
}
// Prep the wildcard authz for display
@ -3244,12 +3243,6 @@ func TestPrepAuthzForDisplay(t *testing.T) {
test.AssertEquals(t, strings.HasPrefix(authz.Identifier.Value, "*."), false)
// The authz should be marked as corresponding to a wildcard name
test.AssertEquals(t, authz.Wildcard, true)
// The authz should not have any combinations
// NOTE(@cpu): We don't use test.AssertNotNil here because its use of
// interface{} types makes a comparison of [][]int{nil} and nil fail.
if authz.Combinations != nil {
t.Errorf("Authz had a non-nil combinations")
}
// We expect the authz challenge has its URL set and the URI emptied.
authz.ID = "12345"