Fix MSVC warnings
library\x509_crt.c(2137): warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data
library\x509_crt.c(2265): warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 5625b94..30ec120 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -2009,8 +2009,8 @@
static mbedtls_x509_crt *x509_crt_find_parent( mbedtls_x509_crt *child,
mbedtls_x509_crt *trust_ca,
int *parent_is_trusted,
- int path_cnt,
- int self_cnt )
+ size_t path_cnt,
+ size_t self_cnt )
{
mbedtls_x509_crt *parent;
@@ -2096,7 +2096,7 @@
mbedtls_x509_crt *parent;
int parent_is_trusted = 0;
int child_is_trusted = 0;
- int self_cnt = 0;
+ size_t self_cnt = 0;
child = crt;
*chain_len = 0;
@@ -2262,7 +2262,7 @@
cur_flags = ver_chain[i-1].flags;
if( NULL != f_vrfy )
- if( ( ret = f_vrfy( p_vrfy, ver_chain[i-1].crt, i-1, &cur_flags ) ) != 0 )
+ if( ( ret = f_vrfy( p_vrfy, ver_chain[i-1].crt, (int) i-1, &cur_flags ) ) != 0 )
return( ret );
*flags |= cur_flags;