mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:13:34 +03:00
quic: implement CURLINFO_TLS_SSL_PTR
Replace the old Curl_ssl_get_internals() with a new connection filter query to retrieve the information. Implement that filter query for TCP and QUIC TLS filter types. Add tests in client tls_session_reuse to use the info option and check that pointers are returned. Reported-by: Larry Campbell Fixes #17801 Closes #17809
This commit is contained in:
parent
81693c77be
commit
2db8ae480f
13 changed files with 144 additions and 85 deletions
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "urldata.h"
|
||||
#include "getinfo.h"
|
||||
#include "cfilters.h"
|
||||
#include "vtls/vtls.h"
|
||||
#include "connect.h" /* Curl_getconnectinfo() */
|
||||
#include "progress.h"
|
||||
|
|
@ -579,19 +580,14 @@ static CURLcode getinfo_slist(struct Curl_easy *data, CURLINFO info,
|
|||
struct curl_tlssessioninfo **tsip = (struct curl_tlssessioninfo **)
|
||||
param_slistp;
|
||||
struct curl_tlssessioninfo *tsi = &data->tsi;
|
||||
#ifdef USE_SSL
|
||||
struct connectdata *conn = data->conn;
|
||||
#endif
|
||||
|
||||
/* we are exposing a pointer to internal memory with unknown
|
||||
* lifetime here. */
|
||||
*tsip = tsi;
|
||||
tsi->backend = Curl_ssl_backend();
|
||||
tsi->internals = NULL;
|
||||
|
||||
#ifdef USE_SSL
|
||||
if(conn && tsi->backend != CURLSSLBACKEND_NONE) {
|
||||
tsi->internals = Curl_ssl_get_internals(data, FIRSTSOCKET, info, 0);
|
||||
if(!Curl_conn_get_ssl_info(data, data->conn, FIRSTSOCKET, tsi)) {
|
||||
tsi->backend = Curl_ssl_backend();
|
||||
tsi->internals = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue