/// Protocol step: Verifies responses.
///
/// We skip the verification, as this is not necessary to test transcripts.
/// If we want to simulate an invalid response, we can simply remove the
/// (valid) response in the fixture.
Protocol step: Verifies responses.
We skip the verification, as this is not necessary to test transcripts.
If we want to simulate an invalid response, we can simply remove the
(valid) response in the fixture.
Protocol step : Verifies responses . We skip the verification as this is not necessary to test transcripts . If we want to simulate an invalid response we can simply remove the ( valid ) response in the fixture .
fn skip_verifying_responses(
        response_fixture: &ResponseFixture,
        responses: &[Option<CLibResponseBytes>],
    ) -> Vec<Option<CLibVerifiedResponseBytes>> {
        assert_eq!(response_fixture.receiver_key_sets.len(), responses.len());
        responses
            .iter()
            .cloned()
            .zip(&response_fixture.receiver_key_sets)
            .map(|(response_maybe, key_set)| {
                response_maybe.map(|CLibResponseBytes { complaints, .. }| {
                    CLibVerifiedResponseBytes {
                        complaints,
                        receiver_public_key: key_set.public_key_bytes,
                    }
                })
            })
            .collect()
    }
fn skip_verifying_responses ( response_fixture : & ResponseFixture , responses : & [ Option < CLibResponseBytes > ] , ) -> Vec < Option < CLibVerifiedResponseBytes > > { assert_eq ! ( response_fixture receiver_key_sets len ( ) responses len ( ) ) ; responses . iter ( ) . cloned ( ) . zip ( & response_fixture . receiver_key_sets ) . map ( | ( response_maybe , key_set ) | { response_maybe . map ( | CLibResponseBytes { complaints , .. } | { CLibVerifiedResponseBytes { complaints , receiver_public_key : key_set . public_key_bytes , } } ) } ) . collect ( ) }
Protocol step: Verifies responses.
Protocol step : Verifies responses .
response_fixture
&ResponseFixture
responses
&[Option<CLibResponseBytes>]