Merge pull request #6561 from AndrzejKurek/ecjpake-error-injection
Improve error injection in EC J-PAKE tests
This commit is contained in:
commit
b9581824f7
1 changed files with 4 additions and 4 deletions
|
@ -790,8 +790,8 @@ static void ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive,
|
||||||
|
|
||||||
if( inject_error == 1 )
|
if( inject_error == 1 )
|
||||||
{
|
{
|
||||||
buffer0[s_x1_pk_off + 8] >>= 4;
|
buffer0[s_x1_pr_off + 8] ^= 1;
|
||||||
buffer0[s_x2_pk_off + 7] <<= 4;
|
buffer0[s_x2_pr_off + 7] ^= 1;
|
||||||
expected_status = PSA_ERROR_DATA_INVALID;
|
expected_status = PSA_ERROR_DATA_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1013,8 +1013,8 @@ static void ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive,
|
||||||
|
|
||||||
if( inject_error == 2 )
|
if( inject_error == 2 )
|
||||||
{
|
{
|
||||||
buffer1[c_x1_pk_off + 12] >>= 4;
|
buffer1[c_x1_pr_off + 12] ^= 1;
|
||||||
buffer1[c_x2_pk_off + 7] <<= 4;
|
buffer1[c_x2_pr_off + 7] ^= 1;
|
||||||
expected_status = PSA_ERROR_DATA_INVALID;
|
expected_status = PSA_ERROR_DATA_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue