programs_benchmark: Updated to use mbedtls_dhm_read_public().

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
Minos Galanakis 2024-01-15 15:54:19 +00:00
parent 97489dc7e5
commit 8ee1b5f46e

View File

@ -1105,7 +1105,8 @@ int main(int argc, char *argv[])
n = mbedtls_dhm_get_len(&dhm);
mbedtls_dhm_make_public(&dhm, (int) n, buf, n, myrand, NULL);
if (mbedtls_mpi_copy(&dhm.MBEDTLS_PRIVATE(GY), &dhm.MBEDTLS_PRIVATE(GX)) != 0) {
if (mbedtls_dhm_read_public(&dhm, buf, n) != 0) {
mbedtls_exit(1);
}