From ff215726b4bdd49c17d4ef1526e00c00298e73fd Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Tue, 11 Sep 2018 14:34:21 +0100 Subject: [PATCH] rsa: pss: Use size_t when computing signatures Functions like `mbedtls_md_get_size()` and `mgf_mask()` work with `size_t`. Use local variables with `size_t` to match. --- library/rsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/rsa.c b/library/rsa.c index 88c1cf100..58746e55b 100644 --- a/library/rsa.c +++ b/library/rsa.c @@ -1521,7 +1521,7 @@ int mbedtls_rsa_rsassa_pss_sign( mbedtls_rsa_context *ctx, size_t olen; unsigned char *p = sig; unsigned char salt[MBEDTLS_MD_MAX_SIZE]; - unsigned int slen, hlen, offset = 0; + size_t slen, hlen, offset = 0; int ret; size_t msb; const mbedtls_md_info_t *md_info;