Skip to content

CURLINFO_TLS_SSL_PTR testing - #18066

Closed
icing wants to merge 4 commits into
curl:masterfrom
icing:ssl-ptr-test
Closed

icing wants to merge 4 commits into
curl:masterfrom
icing:ssl-ptr-test

Conversation

@icing

@icing icing commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Add tests of CURLINFO_TLS_SSL_PTR and its returned value in test client 'hx-download'. Use obtained pointer to look up the negotiated TLS version.

Update manpage of CURLINFO_TLS_SSL_PTR to also describe the behaviour of wolfSSL similar to OpenSSL. Fix the wolfSSl implementation for TCP to behave like that. Update the QUIC queries.

Fix rustls get_internals() to return the rustls_connection* and not the address of the pointer.

@github-actions github-actions Bot added the tests label Jul 28, 2025
@vszakats vszakats self-assigned this Jul 28, 2025
vszakats pushed a commit to vszakats/curl that referenced this pull request Jul 28, 2025
Add tests of CURLINFO_TLS_SSL_PTR and its returned value in test client 'hx-download'. Use obtained pointer to look up the negotiated TLS version.

Update manpage of CURLINFO_TLS_SSL_PTR to also describe the behaviour of wolfSSL similar to OpenSSL. Fix the wolfSSl implementation for TCP to behave like that. Update the QUIC queries.

Fix rustls `get_internals()` to return the rustls_connection* and not the address of the pointer.

Closes curl#18066
vszakats added a commit that referenced this pull request Jul 29, 2025
For libcurl API tests that need interacting directly with TLS-backends.

Partial revert of 58b9c61 #17696 for
cmake, and implementing the same for autotools.

Ref: #18066
Closes #18069
@vszakats

Copy link
Copy Markdown
Member

Pushed a fix for an empty switch() reported by VS2022,
and rebased on 4cce314 #18069 to adjust the builds.

@vszakats vszakats removed their assignment Jul 29, 2025
icing and others added 3 commits July 30, 2025 03:49
Add tests of CURLINFO_TLS_SSL_PTR and its returned value in test
client 'hx-download'. Use obtained pointer to look up the negotiated
TLS version.

Update manpage of CURLINFO_TLS_SSL_PTR to also describe the
behaviour of wolfSSL similar to OpenSSL. Fix the wolfSSl implementation
for TCP to behave like that. Update the QUIC queries.

Fix rustls `get_internals()` to return the rustls_connection* and
not the address of the pointer.
VS2022 compiler warning:
```
tests\client\hx_download.c(199,7): warning C4065: switch statement contains 'default' but no 'case' labels
```
https://ci.appveyor.com/project/curlorg/curl/builds/52476876/job/axqek5whkn3q69s7#L257
AM Alpine MUSL https-rr c-ares:
```
../../../lib/memdebug.h:40:59: error: expected declaration specifiers or '...' before numeric constant
   40 | #define calloc(nbelem,size) curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
      |                                                           ^~~~~~~~
../../../lib/memdebug.h:40:69: error: expected declaration specifiers or '...' before string constant
   40 | #define calloc(nbelem,size) curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
      |                                                                     ^~~~~~~~
../../../lib/memdebug.h:44:38: error: expected declaration specifiers or '...' before numeric constant
   44 | #define free(ptr) curl_dbg_free(ptr, __LINE__, __FILE__)
      |                                      ^~~~~~~~
../../../lib/memdebug.h:44:48: error: expected declaration specifiers or '...' before string constant
   44 | #define free(ptr) curl_dbg_free(ptr, __LINE__, __FILE__)
      |                                                ^~~~~~~~
```
https://github.com/curl/curl/actions/runs/16610859929/job/46993519059?pr=18066#step:38:59
@vszakats

vszakats commented Jul 30, 2025 •

Copy link
Copy Markdown
Member

After rebasing to the clients+libtests merge in master, this PR
triggered a system function override issue in Alpine MUSL, this
time in tests. It was a theoretical case before, and the TLS
headers in this PR finally triggered it. As anticipated here earlier:
#17827 (comment)

I merged a fix for cli_hx_download.c in this PR, while working
on a solution for all tests in #17865.

@vszakats vszakats mentioned this pull request Jul 31, 2025
3 tasks done
@icing
icing requested a review from bagder July 31, 2025 09:57
@icing

icing commented Jul 31, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @vszakats for fixing this so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants