Change the bit to flip to guarantee failure

For weistrass curves the pair is encoded as 0x04 || x || y.
Flipping one of the bits in the first byte should be a sure failure.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2022-03-31 07:17:18 -04:00 committed by Andrzej Kurek
parent 39d88d4918
commit cb33bc5d0b

View File

@ -5657,7 +5657,7 @@ void raw_key_agreement_fail( )
/* Force a simulated bitflip in the server key. to make the
* raw key agreement in ssl_write_client_key_exchange fail. */
(client.ssl).handshake->ecdh_psa_peerkey[5] ^= 0x02;
(client.ssl).handshake->ecdh_psa_peerkey[0] ^= 0x02;
TEST_ASSERT( mbedtls_move_handshake_to_state( &(client.ssl),
&(server.ssl),