Skip to main content

parse_reach

Function parse_reach 

Source
pub fn parse_reach(reach_json: &str) -> Result<ReachConfig, String>
Expand description

Parse the reach JSON the frontend emits into a ReachConfig, base64-decoding the cert hashes.

A cert pin is a security control: silently dropping an undecodable entry and falling back to system roots would connect unpinned without ever telling the caller. So an individual undecodable entry is an error (not skipped) whenever the list is non-empty — the only silent case is a genuinely empty certHashes list, which is the documented “use the browser’s system roots” contract.