Skip to content

build: make NTLM disabled by default - #20698

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/ntlm-disabled
Closed

bagder wants to merge 2 commits into
masterfrom
bagder/ntlm-disabled

Conversation

@bagder

@bagder bagder commented Feb 23, 2026 •

Copy link
Copy Markdown
Member

NTLM has weak security and does not work over HTTP/2 or HTTP/3.

Note: this also disables SMB(S) support by default as it depends on NTLM to function.

Enable in cmake or configure to get support for it. (Tentatively to get merged in the coming feature window, late March 2026)

  • document this
  • enabled in many CI jobs (at least once for each TLS backend)

@bagder bagder added feature-window A merge of this requires an open feature window authentication labels Feb 23, 2026
@github-actions github-actions Bot added the CI Continuous Integration label Feb 23, 2026
@BillyONeal

BillyONeal commented Feb 23, 2026 •

Copy link
Copy Markdown
Contributor

Related: https://techcommunity.microsoft.com/blog/windows-itpro-blog/advancing-windows-security-disabling-ntlm-by-default/4489526

EDIT: And also https://youtu.be/zlhoAYsSd4c

Comment thread .github/workflows/macos.yml Resolved
vszakats added a commit to curl/curl-for-win that referenced this pull request Feb 24, 2026
@bagder
bagder force-pushed the bagder/ntlm-disabled branch from 98b839d to 8f13081 Compare February 25, 2026 14:12
@michael-o

Copy link
Copy Markdown
Contributor

@bagder
bagder force-pushed the bagder/ntlm-disabled branch 2 times, most recently from 6ec6716 to 9908d09 Compare March 2, 2026 15:47
@bagder
bagder marked this pull request as ready for review March 2, 2026 16:04
bagder added a commit that referenced this pull request Mar 21, 2026
NTLM has weak security and does not work over HTTP/2 or HTTP/3.

Enable in cmake or configure to get support for it.

Closes #20698
@bagder
bagder force-pushed the bagder/ntlm-disabled branch from 9908d09 to 1ccdf8b Compare March 21, 2026 11:30
bagder added 2 commits March 21, 2026 15:09
NTLM has weak security and does not work over HTTP/2 or HTTP/3.

Enable in cmake or configure to get support for it.

Closes #20698
@bagder
bagder force-pushed the bagder/ntlm-disabled branch from 1ccdf8b to 3032efb Compare March 21, 2026 14:10
@bagder bagder closed this in cc0c83c Mar 21, 2026
@bagder
bagder deleted the bagder/ntlm-disabled branch March 21, 2026 14:30
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
NTLM has weak security and does not work over HTTP/2 or HTTP/3.

Enable in cmake or configure to get support for it.

Closes curl#20698
ns-ylambert added a commit to ns-ylambert/curl-rust that referenced this pull request Sep 30, 2026
libcurl 8.20 (released 2026-04-29) flipped NTLM to opt-in behind
`CURL_ENABLE_NTLM` (curl/curl#20698, commit [`cc0c83c5f853`]).
In `lib/curl_setup.h`:

    /* Single point where USE_NTLM definition might be defined */
   -#ifndef CURL_DISABLE_NTLM
   +#ifdef CURL_ENABLE_NTLM

The change was security-driven (weak auth, no HTTP/2/3 support). Same PR also
removed every reference to `CURL_DISABLE_NTLM` from libcurl's source, docs,
CMake, and configure logic. **The old opt-out symbol was retired entirely**.

curl-sys did not propagate the change downstream: the `ntlm` cargo feature
(sagebind#428, commit [`f0bbf37241e2`]) still only compiles NTLM
source files. Else-branch defines `CURL_DISABLE_NTLM`, which is now dead code.
The `.define("CURL_ENABLE_NTLM", None)` that the opt-in contract now requires
was never added.

Result: from curl-sys 0.4.90+curl-8.20.0 onward (released 2026-05-01),
`--features curl-sys/ntlm` compiles the NTLM sources but exports zero NTLM
symbols, so the feature does nothing.

Two edits, cross-platform (not target-scoped): whoever activates
`curl-sys/ntlm` opts in on any platform.

- Add `.define("CURL_ENABLE_NTLM", None)` alongside the existing NTLM
  `.file(...)` calls so the feature does what it advertises again.

- Drop the now-dead `else { cfg.define("CURL_DISABLE_NTLM", None); }` branch
  (macro unused in libcurl >= 8.20).

Add a regression test in `src/lib.rs`'s `mod tests` asserting that
`Version::feature_ntlm()` is `true` when the `ntlm` feature is enabled.
Fails on any `curl-sys 0.4.90+curl-8.20.0` or later without this fix.

[`cc0c83c5f853`]: curl/curl@cc0c83c5f853
[`f0bbf37241e2`]: sagebind@f0bbf37241e2
ns-ylambert added a commit to ns-ylambert/curl-rust that referenced this pull request Sep 30, 2026
libcurl 8.20 (released 2026-04-29) flipped NTLM to opt-in behind
`CURL_ENABLE_NTLM` (curl/curl#20698, commit [`cc0c83c5f853`]).
In `lib/curl_setup.h`:

    /* Single point where USE_NTLM definition might be defined */
   -#ifndef CURL_DISABLE_NTLM
   +#ifdef CURL_ENABLE_NTLM

The change was security-driven (weak auth, no HTTP/2/3 support). Same PR also
removed every reference to `CURL_DISABLE_NTLM` from libcurl's source, docs,
CMake, and configure logic. **The old opt-out symbol was retired entirely**.

curl-sys did not propagate the change downstream: the `ntlm` cargo feature
(sagebind#428, commit [`f0bbf37241e2`]) still only compiles NTLM
source files. Else-branch defines `CURL_DISABLE_NTLM`, which is now dead code.
The `.define("CURL_ENABLE_NTLM", None)` that the opt-in contract now requires
was never added.

Result: from curl-sys 0.4.90+curl-8.20.0 onward (released 2026-05-01),
`--features curl-sys/ntlm` compiles the NTLM sources but exports zero NTLM
symbols, so the feature does nothing.

Two edits, cross-platform (whoever activates `curl-sys/ntlm` opts in on any
platform):

- Add `.define("CURL_ENABLE_NTLM", None)` alongside the existing NTLM
  `.file(...)` calls so the feature does what it advertises again.

- Drop the now-dead `else { cfg.define("CURL_DISABLE_NTLM", None); }` branch.

Add a regression test in `src/lib.rs`'s `mod tests` asserting that
`Version::feature_ntlm()` is `true` when the `ntlm` feature is enabled.

[`cc0c83c5f853`]: curl/curl@cc0c83c5f853
[`f0bbf37241e2`]: sagebind@f0bbf37241e2
ns-ylambert added a commit to ns-ylambert/curl-rust that referenced this pull request Sep 30, 2026
libcurl 8.20 (released 2026-04-29) flipped NTLM to opt-in behind
`CURL_ENABLE_NTLM` (curl/curl#20698, commit [`cc0c83c5f853`]).
In `lib/curl_setup.h`:

    /* Single point where USE_NTLM definition might be defined */
   -#ifndef CURL_DISABLE_NTLM
   +#ifdef CURL_ENABLE_NTLM

The change was security-driven (weak auth, no HTTP/2/3 support). Same PR also
removed every reference to `CURL_DISABLE_NTLM` from libcurl's source, docs,
CMake, and configure logic. **The old opt-out symbol was retired entirely**.

curl-sys did not propagate the change downstream: the `ntlm` cargo feature
(sagebind#428, commit [`f0bbf37241e2`]) still only compiles NTLM
source files. Else-branch defines `CURL_DISABLE_NTLM`, which is now dead code.
The `.define("CURL_ENABLE_NTLM", None)` that the opt-in contract now requires
was never added.

Result: from curl-sys 0.4.90+curl-8.20.0 onward (released 2026-05-01),
`--features curl-sys/ntlm` compiles the NTLM sources but exports zero NTLM
symbols, so the feature does nothing.

Two edits, cross-platform (whoever activates `curl-sys/ntlm` opts in on any
platform):

- Add `.define("CURL_ENABLE_NTLM", None)` alongside the existing NTLM
  `.file(...)` calls so the feature does what it advertises again.

- Drop the now-dead `else { cfg.define("CURL_DISABLE_NTLM", None); }` branch.

Plus, a regression test in `src/lib.rs`'s `mod tests` asserting that
`Version::feature_ntlm()` is `true` when the `ntlm` feature is enabled.

[`cc0c83c5f853`]: curl/curl@cc0c83c5f853
[`f0bbf37241e2`]: sagebind@f0bbf37241e2
ns-ylambert added a commit to ns-ylambert/curl-rust that referenced this pull request Oct 1, 2026
libcurl 8.20 (released 2026-04-29) flipped NTLM to opt-in behind
`CURL_ENABLE_NTLM` (curl/curl#20698, commit [`cc0c83c5f853`]).
In `lib/curl_setup.h`:

    /* Single point where USE_NTLM definition might be defined */
   -#ifndef CURL_DISABLE_NTLM
   +#ifdef CURL_ENABLE_NTLM

The change was security-driven (weak auth, no HTTP/2/3 support). Same PR also
removed every reference to `CURL_DISABLE_NTLM` from libcurl's source, docs,
CMake, and configure logic. **The old opt-out symbol was retired entirely**.

curl-sys did not propagate the change downstream: the `ntlm` cargo feature
(sagebind#428, commit [`f0bbf37241e2`]) still only compiles NTLM
source files. Else-branch defines `CURL_DISABLE_NTLM`, which is now dead code.
The `.define("CURL_ENABLE_NTLM", None)` that the opt-in contract now requires
was never added.

Result: from curl-sys 0.4.90+curl-8.20.0 onward (released 2026-05-01),
`--features curl-sys/ntlm` compiles the NTLM sources but exports zero NTLM
symbols, so the feature does nothing.

Two edits, cross-platform (whoever activates `curl-sys/ntlm` opts in on any
platform):

- Add `.define("CURL_ENABLE_NTLM", None)` alongside the existing NTLM
  `.file(...)` calls so the feature does what it advertises again.

- Drop the now-dead `else { cfg.define("CURL_DISABLE_NTLM", None); }` branch.

Plus, a regression test in `src/lib.rs`'s `mod tests` asserting that
`Version::feature_ntlm()` is `true` when the `ntlm` feature is enabled.

[`cc0c83c5f853`]: curl/curl@cc0c83c5f853
[`f0bbf37241e2`]: sagebind@f0bbf37241e2
ns-ylambert added a commit to ns-ylambert/curl-rust that referenced this pull request Oct 12, 2026
libcurl 8.20 (released 2026-04-29) flipped NTLM to opt-in behind
`CURL_ENABLE_NTLM` (curl/curl#20698, commit [`cc0c83c5f853`]).
In `lib/curl_setup.h`:

    /* Single point where USE_NTLM definition might be defined */
   -#ifndef CURL_DISABLE_NTLM
   +#ifdef CURL_ENABLE_NTLM

The change was security-driven (weak auth, no HTTP/2/3 support). Same PR also
removed every reference to `CURL_DISABLE_NTLM` from libcurl's source, docs,
CMake, and configure logic. **The old opt-out symbol was retired entirely**.

curl-sys did not propagate the change downstream: the `ntlm` cargo feature
(sagebind#428, commit [`f0bbf37241e2`]) still only compiles NTLM
source files. Else-branch defines `CURL_DISABLE_NTLM`, which is now dead code.
The `.define("CURL_ENABLE_NTLM", None)` that the opt-in contract now requires
was never added.

Result: from curl-sys 0.4.90+curl-8.20.0 onward (released 2026-05-01),
`--features curl-sys/ntlm` compiles the NTLM sources but exports zero NTLM
symbols, so the feature does nothing.

Two edits, cross-platform (whoever activates `curl-sys/ntlm` opts in on any
platform):

- Add `.define("CURL_ENABLE_NTLM", None)` alongside the existing NTLM
  `.file(...)` calls so the feature does what it advertises again.

- Drop the now-dead `else { cfg.define("CURL_DISABLE_NTLM", None); }` branch.

Plus, a regression test in `src/lib.rs`'s `mod tests` asserting that
`Version::feature_ntlm()` is `true` when the `ntlm` feature is enabled.

[`cc0c83c5f853`]: curl/curl@cc0c83c5f853
[`f0bbf37241e2`]: sagebind@f0bbf37241e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

authentication CI Continuous Integration feature-window A merge of this requires an open feature window

Development

Successfully merging this pull request may close these issues.

4 participants