← Commit list

85a895c59f

Viktor Szakats
Viktor Szakats
2026-02-11
SUCCESS Duration: 330s

Subject

cli_hx_download: add Schannel support

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/libtest/cli_hx_download.c+22 -1
@@ -42,6 +42,11 @@
#ifdef USE_RUSTLS
#include <rustls.h>
#endif
+#ifdef USE_SCHANNEL
+#include <sspi.h> /* for CtxtHandle, QueryContextAttributes() */
+#include <schannel.h> /* for SecPkgContext_ConnectionInfo,
+ SECPKG_ATTR_CONNECTION_INFO */
+#endif
static int verbose_d = 1;
@@ -133,7 +138,8 @@ static int my_progress_d_cb(void *userdata,
}
#if defined(USE_QUICHE) || defined(USE_OPENSSL) || defined(USE_WOLFSSL) || \
- defined(USE_GNUTLS) || defined(USE_MBEDTLS) || defined(USE_RUSTLS)
+ defined(USE_GNUTLS) || defined(USE_MBEDTLS) || defined(USE_RUSTLS) || \
+ defined(USE_SCHANNEL)
if(!t->checked_ssl && dlnow > 0) {
struct curl_tlssessioninfo *tls;
CURLcode result;
@@ -196,6 +202,21 @@ static int my_progress_d_cb(void *userdata,
t->idx, v);
break;
}
+#endif
+#ifdef USE_SCHANNEL
+ case CURLSSLBACKEND_SCHANNEL: {
+ CtxtHandle *ctxt_handle = (CtxtHandle *)tls->internals;
+ SecPkgContext_ConnectionInfo info;
+ SECURITY_STATUS sspi_status;
+ sspi_status = QueryContextAttributes(ctxt_handle,
+ SECPKG_ATTR_CONNECTION_INFO,
+ &info);
+ assert(sspi_status == SEC_E_OK);
+ (void)sspi_status;
+ curl_mfprintf(stderr, "[t-%zu] info Schannel TLS version 0x%08lx\n",
+ t->idx, info.dwProtocol);
+ break;
+ }
#endif
default:
curl_mfprintf(stderr, "[t-%zu] info SSL_PTR backend=%d, ptr=%p\n",