From 83b0847e667ff1d5afaa68ed94d8749a27dde815 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 4 Nov 2020 10:37:47 -0700 Subject: [PATCH 1/2] add rc2.c to Visual Studio projects --- wolfssl-ntru.vcproj | 4 ++++ wolfssl.vcproj | 4 ++++ wolfssl.vcxproj | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wolfssl-ntru.vcproj b/wolfssl-ntru.vcproj index 18964c739..e6c6d66b0 100755 --- a/wolfssl-ntru.vcproj +++ b/wolfssl-ntru.vcproj @@ -290,6 +290,10 @@ RelativePath=".\wolfcrypt\src\random.c" > + + diff --git a/wolfssl.vcproj b/wolfssl.vcproj index 5505e4912..ebf0007da 100755 --- a/wolfssl.vcproj +++ b/wolfssl.vcproj @@ -319,6 +319,10 @@ RelativePath=".\wolfcrypt\src\random.c" > + + diff --git a/wolfssl.vcxproj b/wolfssl.vcxproj index 834c307e0..d890f8cc9 100644 --- a/wolfssl.vcxproj +++ b/wolfssl.vcxproj @@ -321,6 +321,7 @@ + @@ -369,4 +370,4 @@ - \ No newline at end of file + From 695304930533034156a417c4aa9a3db42a903f92 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 4 Nov 2020 11:11:40 -0700 Subject: [PATCH 2/2] fix Visual Studio type conversion warnings --- src/internal.c | 2 +- src/ssl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal.c b/src/internal.c index a2e856542..63b009013 100644 --- a/src/internal.c +++ b/src/internal.c @@ -9373,7 +9373,7 @@ int CheckForAltNames(DecodedCert* dCert, const char* domain, int* checkCN) XMEMSET(tmp, 0, sizeof(tmp)); XSNPRINTF(tmp, sizeof(tmp), (altName->len <= 4) ? "%u" : "%02X", altName->name[i]); - idx += XSTRLEN(tmp); + idx += (word32)XSTRLEN(tmp); XSTRNCAT(name, tmp, (altName->len <= 4) ? 3 : 2); if ((idx < WOLFSSL_MAX_IPSTR ) && ((i + 1) < altName->len)) { name[idx++] = (altName->len <= 4) ? '.' : ':'; diff --git a/src/ssl.c b/src/ssl.c index b1c0a9871..f7e913f04 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -41207,12 +41207,12 @@ int wolfSSL_BIO_new_bio_pair(WOLFSSL_BIO **bio1_p, size_t writebuf1, } } if (ret && writebuf1) { - if (!(ret = wolfSSL_BIO_set_write_buf_size(bio1, writebuf1))) { + if (!(ret = wolfSSL_BIO_set_write_buf_size(bio1, (long)writebuf1))) { WOLFSSL_MSG("wolfSSL_BIO_set_write_buf() failure"); } } if (ret && writebuf2) { - if (!(ret = wolfSSL_BIO_set_write_buf_size(bio2, writebuf2))) { + if (!(ret = wolfSSL_BIO_set_write_buf_size(bio2, (long)writebuf2))) { WOLFSSL_MSG("wolfSSL_BIO_set_write_buf() failure"); } }