From 63df8f08360205da951031c0fba241b294185d1a Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Thu, 23 Dec 2021 16:55:51 +0000 Subject: [PATCH 1/2] add fe_low_mem.c to wolfssl vs project and fix a couple warnings --- src/wolfio.c | 2 +- wolfcrypt/src/pkcs7.c | 2 +- wolfssl.vcxproj | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wolfio.c b/src/wolfio.c index 79a5dcd9a..f62fe782d 100644 --- a/src/wolfio.c +++ b/src/wolfio.c @@ -1030,7 +1030,7 @@ int wolfIO_TcpBind(SOCKET_T* sockfd, word16 port) #ifdef HAVE_SOCKADDR int wolfIO_TcpAccept(SOCKET_T sockfd, SOCKADDR* peer_addr, XSOCKLENT* peer_len) { - return accept(sockfd, peer_addr, peer_len); + return (int)accept(sockfd, peer_addr, peer_len); } #endif /* HAVE_SOCKADDR */ diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c index 7f1acafc2..c8efc66ce 100644 --- a/wolfcrypt/src/pkcs7.c +++ b/wolfcrypt/src/pkcs7.c @@ -5008,7 +5008,7 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf, version = pkcs7->version; if (ret == 0) { - byte isDynamic = pkcs7->isDynamic; + byte isDynamic = (byte)pkcs7->isDynamic; #ifndef NO_PKCS7_STREAM PKCS7State* stream = pkcs7->stream; pkcs7->stream = NULL; diff --git a/wolfssl.vcxproj b/wolfssl.vcxproj index 66b126985..a334dc0e0 100644 --- a/wolfssl.vcxproj +++ b/wolfssl.vcxproj @@ -305,6 +305,7 @@ + From c4e50ef086a19cb6652de4c6f58f4ae85c11b547 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Thu, 23 Dec 2021 09:37:09 -0800 Subject: [PATCH 2/2] fix for libz test with pkcs7 --- wolfcrypt/test/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index ecbe0e3a3..6e7915dbe 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -34259,7 +34259,7 @@ static int pkcs7signed_run_SingleShotVectors( /* compare decompressed to expected */ if (((word32)ret != testVectors[i].contentSz) || - XMEMCMP(out, testVectors[i].content, ret)) { + XMEMCMP(out, testVectors[i].content, ret)) ERROR_OUT(-12562, out); } #ifndef NO_PKCS7_ENCRYPTED_DATA