pub fn revocation_bit(
expanded_list: &[u8],
index: u64,
) -> Result<bool, AphError>Expand description
Reads the revocation bit at index from an EXPANDED bitstring
(§6.3.3.4 case 3).
Bit order is the W3C profile’s: index 0 is the MOST significant bit of the first byte. Getting this backwards reads a real bit belonging to a different mandate rather than failing, so it is pinned by test.
§Errors
APH_E008 when the list is too short to contain index, or larger than
MAX_EXPANDED_LIST_BYTES. §6.3.3.4 case 2 names “its list is too short
to contain statusListIndex” explicitly: a verifier that read a missing
bit as 0 would treat a truncated list as a blanket “nothing is
revoked”.
The over-long half of that is a BACKSTOP and nothing more: expanded_list
is already allocated by the time this function sees it, so the memory
bound has to be honoured by the expander (ExpandEncodedList) and this
check only stops an implausible list from being indexed.