letsencrypt / boulder

An ACME-based certificate authority, written in Go.
Mozilla Public License 2.0
5.16k stars 605 forks source link

Unify sa.GetAuthorizations2 and sa.GetValidAuthorizations2 #7663

Closed aarongable closed 1 month ago

aarongable commented 1 month ago

These two methods were already nearly identical, their only meaningful differences being the set of statuses they select for in their database query, and the condition on which they prioritize entries in their output.

Update them to have the exact same structure and logic. Most meaningfully, update GetValidAuthorizations2 to hint the database to use the same index which GetAuthorizations2 already hints.