From bcbeef7647bd3c98a9ab58896a5df0323955c53f Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Tue, 11 Jul 2023 09:24:20 -0600 Subject: [PATCH 1/5] Fix for curl build --- wolfssl/wolfcrypt/types.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 396b18673..77500382f 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -31,9 +31,6 @@ decouple library dependencies with standard string, memory and so on. #ifndef WOLF_CRYPT_TYPES_H #define WOLF_CRYPT_TYPES_H - #ifdef HAVE_CONFIG_H - #include - #endif #include #include From 1329543b623e7bd8db818347b34fb1af81d24ef9 Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Tue, 11 Jul 2023 09:24:27 -0600 Subject: [PATCH 2/5] Other miscellaneous fixes --- configure.ac | 3 ++- src/ocsp.c | 2 +- tests/api.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 21a66206b..ecd6d873e 100644 --- a/configure.ac +++ b/configure.ac @@ -1726,7 +1726,8 @@ AC_ARG_ENABLE([error-queue-per-thread], if test "$ENABLED_ERRORQUEUEPERTHREAD" = "check" then - AS_IF([test "$thread_ls_on" = "no"], + AS_IF([test "$thread_ls_on" = "no" || + test "$ENABLED_SINGLETHREADED" = "yes"], [ENABLED_ERRORQUEUEPERTHREAD=no], [ENABLED_ERRORQUEUEPERTHREAD=yes]) fi diff --git a/src/ocsp.c b/src/ocsp.c index b1d89a165..d8f291f4a 100644 --- a/src/ocsp.c +++ b/src/ocsp.c @@ -1137,7 +1137,7 @@ WOLFSSL_OCSP_ONEREQ* wolfSSL_OCSP_request_add0_id(OcspRequest *req, return NULL; if (req->cid != NULL) - wolfSSL_OCSP_CERTID_free(req->cid); + wolfSSL_OCSP_CERTID_free((WOLFSSL_OCSP_CERTID*)req->cid); /* Keep to free */ req->cid = (void*)cid; diff --git a/tests/api.c b/tests/api.c index ada4447ee..8c5dcb391 100644 --- a/tests/api.c +++ b/tests/api.c @@ -1447,7 +1447,8 @@ static int test_wolfSSL_CTX_load_verify_locations(void) /* Get cert cache size */ ExpectIntGT(cacheSz = wolfSSL_CTX_get_cert_cache_memsize(ctx), 0); - ExpectNotNull(cache = XMALLOC(cacheSz, NULL, DYNAMIC_TYPE_TMP_BUFFER)); + ExpectNotNull(cache = (byte*)XMALLOC(cacheSz, NULL, + DYNAMIC_TYPE_TMP_BUFFER)); ExpectIntEQ(wolfSSL_CTX_memsave_cert_cache(NULL, NULL, -1, NULL), BAD_FUNC_ARG); From 5fbe319ce9664ff4580061a5a7284bfac54504c3 Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Tue, 11 Jul 2023 10:26:19 -0600 Subject: [PATCH 3/5] Remove references to config.h from test headers --- tests/api.c | 3 ++- wolfcrypt/test/test.h | 3 --- wolfssl/test.h | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/api.c b/tests/api.c index 8c5dcb391..1fa2655ae 100644 --- a/tests/api.c +++ b/tests/api.c @@ -34729,7 +34729,8 @@ static int test_wolfSSL_Tls13_Key_Logging_test(void) #endif /* OPENSSL_EXTRA && HAVE_SECRET_CALLBACK && WOLFSSL_TLS13 */ return EXPECT_RESULT(); } -#if defined(WOLFSSL_TLS13) && defined(HAVE_ECH) +#if defined(WOLFSSL_TLS13) && defined(HAVE_ECH) && \ + defined(HAVE_IO_TESTS_DEPENDENCIES) static int test_wolfSSL_Tls13_ECH_params(void) { EXPECT_DECLS; diff --git a/wolfcrypt/test/test.h b/wolfcrypt/test/test.h index e1888d212..75f896887 100644 --- a/wolfcrypt/test/test.h +++ b/wolfcrypt/test/test.h @@ -35,9 +35,6 @@ typedef sword32 wc_test_ret_t; #endif -#ifdef HAVE_CONFIG_H - #include -#endif #include #ifdef HAVE_STACK_SIZE diff --git a/wolfssl/test.h b/wolfssl/test.h index 89661674b..eb6527e70 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -28,10 +28,8 @@ #ifndef wolfSSL_TEST_H #define wolfSSL_TEST_H -#ifdef HAVE_CONFIG_H - #include -#endif #include +#include #ifdef FUSION_RTOS #include From e140a83fad29cdece0eed57de45b5f85cf82528c Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Tue, 11 Jul 2023 11:27:45 -0600 Subject: [PATCH 4/5] Add curl gh actions test --- .github/workflows/curl.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/curl.yml diff --git a/.github/workflows/curl.yml b/.github/workflows/curl.yml new file mode 100644 index 000000000..0dbb65ff9 --- /dev/null +++ b/.github/workflows/curl.yml @@ -0,0 +1,40 @@ +name: CURL Test + +on: + push: + branches: [ '*' ] + pull_request: + branches: [ '*' ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: autogen + run: ./autogen.sh + - name: configure + run: ./configure --enable-all + - name: make + run: make + - name: install + run: sudo make install + - uses: actions/checkout@master + with: + repository: curl/curl + path: curl + - name: curl buildconf + working-directory: ./curl + run: ./buildconf + - name: curl configure + working-directory: ./curl + run: ./configure --with-wolfssl + - name: curl make + working-directory: ./curl + run: make + - name: curl unit tests + working-directory: ./curl + run: make test + From f30364a00d562e1384568a771c815f2baf4bd012 Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Tue, 11 Jul 2023 11:46:55 -0600 Subject: [PATCH 5/5] Fix test --- .github/workflows/curl.yml | 9 +++++---- .github/workflows/main.yml | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/curl.yml b/.github/workflows/curl.yml index 0dbb65ff9..da2b149a1 100644 --- a/.github/workflows/curl.yml +++ b/.github/workflows/curl.yml @@ -1,10 +1,8 @@ -name: CURL Test +name: curl Test on: push: - branches: [ '*' ] - pull_request: - branches: [ '*' ] + workflow_call: jobs: build: @@ -25,6 +23,9 @@ jobs: with: repository: curl/curl path: curl + - name: Install test dependency + working-directory: ./curl + run: sudo apt-get install nghttp2 - name: curl buildconf working-directory: ./curl run: ./buildconf diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 890acce15..081859077 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,8 @@ jobs: uses: ./.github/workflows/zephyr.yml hitch: uses: ./.github/workflows/hitch.yml + curl: + uses: ./.github/workflows/curl.yml # TODO: Currently this test fails. Enable it once it becomes passing. # haproxy: # uses: ./.github/workflows/haproxy.yml