Repository navigation
Conversation
This should return a SSL_CTX pointer but it was accidentally broken. Follow-up to 2db8ae4 Spotted by Codex Security
There was a problem hiding this comment.
Pull request overview
Fixes curl_easy_getinfo() handling of CURLINFO_TLS_SESSION so it again returns the legacy TLS “session” internal pointer (e.g., SSL_CTX* for OpenSSL / WOLFSSL_CTX* for wolfSSL), which had regressed and started returning the same pointer as CURLINFO_TLS_SSL_PTR.
Changes:
- Select the appropriate cfilter query (
CF_QUERY_SSL_INFOvsCF_QUERY_SSL_CTX_INFO) depending on whetherCURLINFO_TLS_SSL_PTRorCURLINFO_TLS_SESSIONis requested. - Extend
Curl_conn_get_ssl_info()to accept aqueryparameter and pass it through to the connection filter chain.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/getinfo.c | Uses CF_QUERY_SSL_CTX_INFO for CURLINFO_TLS_SESSION to restore SSL_CTX/WOLFSSL_CTX semantics. |
| lib/cfilters.h | Updates Curl_conn_get_ssl_info() declaration to accept a query selector. |
| lib/cfilters.c | Updates Curl_conn_get_ssl_info() definition to forward the requested query type to cft->query(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
augment review |
🤖 Augment PR SummarySummary: Repairs the legacy behavior of Changes:
Technical Notes: Uses the existing cfilter 🤖 Was this summary useful? React with 👍 or 👎 |
This should return a SSL_CTX pointer but it was accidentally broken. Verify with test 1587 Follow-up to 2db8ae4 Spotted by Codex Security Closes curl#21290
This should return a SSL_CTX pointer but it was accidentally broken. Verify with test 1587 Follow-up to 2db8ae4 Spotted by Codex Security Closes curl#21290
By exposing and reusing existing custom type via `vtls/openss.h`.
Also:
- GHA/curl-for-win: test in CI by enabling building tests.
Cost is 45s per job, so limit it to the gcc job.
Seen with Windows x64 gcc (not tested in CI prior to this patch):
```
tests/libtest/lib1587.c:50:7: error: conversion from 'opt1587' {aka 'long long unsigned int'} to 'long int' may change value [-Werror=conversion]
50 | SSL_CTX_set_options(info->internals, opts);
| ^~~~~~~~~~~~~~~~~~~
tests/libtest/lib1587.c:59:7: error: conversion from 'opt1587' {aka 'long long unsigned int'} to 'long int' may change value [-Werror=conversion]
59 | SSL_set_options(info->internals, opts);
| ^~~~~~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/28258372229/job/83727170184?pr=22195#step:3:4884
Ref: da2f05e #22198
Ref: 6163566 #22197
Follow-up to 3e40ccb #21290
Follow-up to 2db8ae4 #17809 #17801
Closes #22195
This should return a SSL_CTX pointer but it was accidentally broken.
Follow-up to 2db8ae4
Spotted by Codex Security