getinfo: repair CURLINFO_TLS_SESSION#21290
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.
Follow-up to 2db8ae4
Spotted by Codex Security