programs_rsa_encrypt/decrypt: Updated programs to use mbedtls_rsa_get_len()

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
Minos Galanakis 2024-01-12 15:06:20 +00:00
parent b6a96195fb
commit ee757d35df
2 changed files with 2 additions and 2 deletions

View file

@ -133,7 +133,7 @@ int main(int argc, char *argv[])
fclose(f);
if (i != rsa.MBEDTLS_PRIVATE(len)) {
if (i != mbedtls_rsa_get_len(&rsa)) {
mbedtls_printf("\n ! Invalid RSA signature format\n\n");
goto exit;
}

View file

@ -126,7 +126,7 @@ int main(int argc, char *argv[])
goto exit;
}
for (i = 0; i < rsa.MBEDTLS_PRIVATE(len); i++) {
for (i = 0; i < mbedtls_rsa_get_len(&rsa); i++) {
mbedtls_fprintf(f, "%02X%s", buf[i],
(i + 1) % 16 == 0 ? "\r\n" : " ");
}