-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: improve wolfSSL detection #14064
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as resolved.
This comment was marked as resolved.
could not test the ECB one.
``` ./curl/lib/mqtt.c: In function 'mqtt_doing': ./curl/lib/mqtt.c:746:17: error: declaration of 'byte' shadows a global declaration [-Werror=shadow] 746 | unsigned char byte; | ^~~~ In file included from /opt/homebrew/Cellar/wolfssl/5.7.0_1/include/wolfssl/openssl/sha.h:29, from ./curl/lib/curl_sha256.h:40, from ./curl/lib/http_aws_sigv4.c:33, from ./curl/build/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_0_c.c:202: /opt/homebrew/Cellar/wolfssl/5.7.0_1/include/wolfssl/wolfcrypt/types.h:85:36: note: shadowed declaration is here 85 | typedef unsigned char byte; | ^~~~ ``` Ref: https://github.com/curl/curl/actions/runs/9731571038/job/26856167259?pr=14064#step:7:19
I'm thinking this qualifies better as a bugfix than a new feature to merge before the release. Any thoughts? |
vszakats
added a commit
that referenced
this pull request
Nov 21, 2024
It was missing while detecting `wolfSSL_DES_ecb_encrypt`, `wolfSSL_BIO_new` and `wolfSSL_BIO_set_shutdown`. We have not seen it causing issues in stable wolfSSL releases as of v5.7.4, until a recent commit in wolfSSL master, which broke detections: ``` curl/CMakeFiles/CMakeScratch//CheckSymbolExists.c:8:19: error: ‘wolfSSL_BIO_new’ undeclared (first use in this function); did you mean ‘wolfSSL_CTX_new’? curl/CMakeFiles/CMakeScratch//CheckSymbolExists.c:8:19: error: ‘wolfSSL_BIO_set_shutdown’ undeclared (first use in this function); did you mean ‘wolfSSL_set_shutdown’? ``` This in turn disabled `HTTPS-proxy` and failed related pytests: https://github.com/curl/curl/actions/runs/11953800545/job/33324250039?pr=15620 wolfSSL source diff causing the regression: https://github.com/wolfSSL/wolfSSL/compare/be70bea687526a51e3d751d425bbaaa412b451ee..c06f65a8ace311667d9b9d7fd320b6b25f8b1bf8 The wolfSSL build says: ``` Note: Make sure your application includes "wolfssl/options.h" before any other wolfSSL headers. You can define "WOLFSSL_USE_OPTIONS_H" in your application to include this automatically. ``` This patch makes sure to follow this rule across the curl codebase. Also: - include `wolfssl/options.h` first in `lib/vtls/wolfssl.c`. It was preceded by `wolfssl/version.h`, which did not cause issues. Background for the pre-existing include order: Ref: deb9462 #3903 Ref: https://curl.se/mail/lib-2015-04/0069.html Bug: #15620 (comment) Follow-up to d68a121 #14064 Closes #15623
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
support detecting wolfSSL via pkg-config (like autotools.)
detect wolfSSL version.
detect
HAVE_WOLFSSL_DES_ECB_ENCRYPT
.(needs e.g.
--enable-curl
when building wolfSSL)detect
HAVE_WOLFSSL_FULL_BIO
and enable HTTPS-proxy feature.(needs e.g.
--enable-opensslall
when building wolfSSL)fix to show
HTTPS-proxy
in cmake feature list.Ref: 55807e6 tls backends using connection filter IO #9962
fix to show
NTLM
in cmake feature list.fix to show
smb
andsmbs
in cmake protocol list.add wolfSSL CMake job to GHA (for macOS).
fix mqtt and wolfSSL symbol clash.
format
FindWolfSSL.cmake
closer to neighbours.Closes #14064