mirror of
https://github.com/curl/curl.git
synced 2026-08-05 02:16:13 +03:00
CURLINFO_TLS_SSL_PTR testing
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.
This commit is contained in:
parent
58e0ff809f
commit
180a1e64ef
7 changed files with 116 additions and 9 deletions
|
|
@ -2658,7 +2658,7 @@ static CURLcode cf_ngtcp2_query(struct Curl_cfilter *cf,
|
|||
case CF_QUERY_SSL_CTX_INFO: {
|
||||
struct curl_tlssessioninfo *info = pres2;
|
||||
if(Curl_vquic_tls_get_ssl_info(&ctx->tls,
|
||||
(query == CF_QUERY_SSL_INFO), info))
|
||||
(query == CF_QUERY_SSL_CTX_INFO), info))
|
||||
return CURLE_OK;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2352,7 +2352,7 @@ static CURLcode cf_osslq_query(struct Curl_cfilter *cf,
|
|||
case CF_QUERY_SSL_CTX_INFO: {
|
||||
struct curl_tlssessioninfo *info = pres2;
|
||||
if(Curl_vquic_tls_get_ssl_info(&ctx->tls,
|
||||
(query == CF_QUERY_SSL_INFO), info))
|
||||
(query == CF_QUERY_SSL_CTX_INFO), info))
|
||||
return CURLE_OK;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1551,7 +1551,7 @@ static CURLcode cf_quiche_query(struct Curl_cfilter *cf,
|
|||
case CF_QUERY_SSL_CTX_INFO: {
|
||||
struct curl_tlssessioninfo *info = pres2;
|
||||
if(Curl_vquic_tls_get_ssl_info(&ctx->tls,
|
||||
(query == CF_QUERY_SSL_INFO), info))
|
||||
(query == CF_QUERY_SSL_CTX_INFO), info))
|
||||
return CURLE_OK;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1300,7 +1300,7 @@ cr_get_internals(struct ssl_connect_data *connssl,
|
|||
struct rustls_ssl_backend_data *backend =
|
||||
(struct rustls_ssl_backend_data *)connssl->backend;
|
||||
DEBUGASSERT(backend);
|
||||
return &backend->conn;
|
||||
return backend->conn;
|
||||
}
|
||||
|
||||
static CURLcode
|
||||
|
|
|
|||
|
|
@ -2240,12 +2240,12 @@ static CURLcode wssl_sha256sum(const unsigned char *tmp, /* input */
|
|||
}
|
||||
|
||||
static void *wssl_get_internals(struct ssl_connect_data *connssl,
|
||||
CURLINFO info UNUSED_PARAM)
|
||||
CURLINFO info)
|
||||
{
|
||||
struct wssl_ctx *wssl = (struct wssl_ctx *)connssl->backend;
|
||||
(void)info;
|
||||
DEBUGASSERT(wssl);
|
||||
return wssl->ssl;
|
||||
return info == CURLINFO_TLS_SESSION ?
|
||||
(void *)wssl->ssl_ctx : (void *)wssl->ssl;
|
||||
}
|
||||
|
||||
const struct Curl_ssl Curl_ssl_wolfssl = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue