tls: psa_pake: add a check on read size on both rounds
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
parent
a988364767
commit
30ebe11f86
1 changed files with 6 additions and 0 deletions
|
@ -8231,6 +8231,9 @@ int mbedtls_psa_ecjpake_read_round_one(
|
|||
}
|
||||
}
|
||||
|
||||
if ( input_offset != len )
|
||||
return PSA_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
@ -8286,6 +8289,9 @@ int mbedtls_psa_ecjpake_read_round_two(
|
|||
input_offset += length;
|
||||
}
|
||||
|
||||
if ( input_offset != len )
|
||||
return PSA_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue