From 783f9c3514779334aea617c6bfd2af7b94107765 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 20 Nov 2018 12:12:31 +0000 Subject: [PATCH 1/3] Fix signed-to-unsigned integer conversion warning in X.509 module Fixes #2212. --- library/x509_crt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/x509_crt.c b/library/x509_crt.c index 76558342e..3c32d1bde 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -368,7 +368,7 @@ static void x509_crt_verify_chain_reset( for( i = 0; i < MBEDTLS_X509_MAX_VERIFY_CHAIN_SIZE; i++ ) { ver_chain->items[i].crt = NULL; - ver_chain->items[i].flags = -1; + ver_chain->items[i].flags = -1u; } ver_chain->len = 0; From a9375b35c08f89f4953bd8068119e39dddc5f529 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 10 Jan 2019 09:19:26 +0000 Subject: [PATCH 2/3] Avoid MSVC compiler warning MSVC warns about use of unary `-` operator on unsigned integers. --- library/x509_crt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/x509_crt.c b/library/x509_crt.c index 3c32d1bde..325bbc0b1 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -368,7 +368,7 @@ static void x509_crt_verify_chain_reset( for( i = 0; i < MBEDTLS_X509_MAX_VERIFY_CHAIN_SIZE; i++ ) { ver_chain->items[i].crt = NULL; - ver_chain->items[i].flags = -1u; + ver_chain->items[i].flags = (uint32_t) -1; } ver_chain->len = 0; From 1b6d2b228d38101f33486b5f29fbc57ac907fe18 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 10 Jan 2019 09:22:16 +0000 Subject: [PATCH 3/3] Adapt ChangeLog --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index be28645d6..5703b960e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ mbed TLS ChangeLog (Sorted per branch, date) += mbed TLS x.xx.x branch released xxxx-xx-xx + +Bugfix + * Fix signed-to-unsigned integer conversion warning + in X.509 module. Fixes #2212. + = mbed TLS 2.16.0 branch released 2018-12-21 Features