Skip to main content

topmost_supported

Function topmost_supported 

Source
pub fn topmost_supported(challenges: Vec<Challenge>) -> Option<Challenge>
Expand description

Pick the first challenge offered, which is RFC 8760 §2.4’s own rule.

The server lists algorithms “in the order in which it would prefer to see them used” (§2.3), and honouring that is the specified behaviour. Prefer strongest unless the ordering genuinely carries information — see the downgrade note there for what this gives up.

Challenges the parser could not read never reach here: §2.4 also says “the client MUST ignore any challenge it does not understand”, and an unknown algorithm fails to parse into a Challenge rather than being answered with the wrong hash.