From ca8b465dbf0c1f7bc6774e31e57798e9080f6d5f Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Fri, 15 Nov 2024 09:17:41 -0500 Subject: [PATCH 1/2] Fix missing cast Introduced in PR#8176. --- tests/api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/api.c b/tests/api.c index 2d23ab620..3c376bbae 100644 --- a/tests/api.c +++ b/tests/api.c @@ -76347,7 +76347,7 @@ static int test_wolfSSL_X509V3_EXT_aia(void) sk = NULL; } /* Extension stack set but empty. */ - ExpectNotNull(aia = wolfSSL_X509V3_EXT_d2i(ext)); + ExpectNotNull(aia = (WOLFSSL_AUTHORITY_INFO_ACCESS *)wolfSSL_X509V3_EXT_d2i(ext)); wolfSSL_AUTHORITY_INFO_ACCESS_free(aia); aia = NULL; @@ -76367,7 +76367,7 @@ static int test_wolfSSL_X509V3_EXT_aia(void) node = NULL; } } - ExpectNotNull(aia = wolfSSL_X509V3_EXT_d2i(ext)); + ExpectNotNull(aia = (WOLFSSL_AUTHORITY_INFO_ACCESS *)wolfSSL_X509V3_EXT_d2i(ext)); wolfSSL_ACCESS_DESCRIPTION_free(NULL); wolfSSL_AUTHORITY_INFO_ACCESS_pop_free(aia, From d99a1c6a135179e99c2ec8dcf0a452460c7c78d3 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Fri, 15 Nov 2024 10:12:13 -0500 Subject: [PATCH 2/2] Fix another compilation issue In file included from ./wolfssl/error-ssl.h:27, from ./wolfssl/ssl.h:35, from ./wolfssl/internal.h:28, from src/ssl.c:36: ./src/x509_str.c: In function 'int X509StoreLoadCertBuffer(WOLFSSL_X509_STORE*, byte*, word32, int)': ./wolfssl/wolfcrypt/error-crypt.h:336:37: error: 'CONST_NUM_ERR_WOLFSSL_SUCCESS' was not declared in this scope; did you mean 'CONST_NUM_ERR_WOLFSSL_UNKNOWN'? 336 | #define WC_NO_ERR_TRACE(label) (CONST_NUM_ERR_ ## label) | ^~~~~~~~~~~~~~ ./src/x509_str.c:1456:15: note: in expansion of macro 'WC_NO_ERR_TRACE' 1456 | int ret = WC_NO_ERR_TRACE(WOLFSSL_SUCCESS); | ^~~~~~~~~~~~~~~ --- src/x509_str.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/x509_str.c b/src/x509_str.c index 804428dfd..b0f575229 100644 --- a/src/x509_str.c +++ b/src/x509_str.c @@ -1453,7 +1453,8 @@ int wolfSSL_X509_STORE_set_default_paths(WOLFSSL_X509_STORE* store) int X509StoreLoadCertBuffer(WOLFSSL_X509_STORE *str, byte *buf, word32 bufLen, int type) { - int ret = WC_NO_ERR_TRACE(WOLFSSL_SUCCESS); + int ret = WOLFSSL_SUCCESS; + WOLFSSL_X509 *x509 = NULL; if (str == NULL || buf == NULL) {