Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NTLM authentication on Windows does not work #359

Open
stone-bits opened this issue Oct 4, 2020 · 8 comments
Open

NTLM authentication on Windows does not work #359

stone-bits opened this issue Oct 4, 2020 · 8 comments

Comments

@stone-bits
Copy link

stone-bits commented Oct 4, 2020

I'm evaluating rust for enterprise software development. It's crucial for us to have simple way to make http requests with Kerberos and NTLM authentication. I found no other crates that can do that.

I'm building on windows with cargo.toml settings:

[dependencies]
curl = {version="0.4.33", features = ["ssl", "static-curl"]}

code:

...
let mut auth = Auth::new();
auth.ntlm(true); 
let mut easy = Easy::new();
easy.http_auth(&auth).unwrap(); // here it panics
...

Running this code on windows 10 with command:

cargo run

And I'm getting the following error:

"A requested feature, protocol or option was not found built-in in this libcurl 
due to a build-time decision."

It seems natural to have NTLM on windows enabled. Maybe I'm doing something wrong?

@alexcrichton
Copy link
Owner

This is likely falling back to the compiled in-tree version, which doesn't have this enabled by default. I think it would make sense though for this to be a feature on the curl-sys crate so it could be enabled!

@sagebind
Copy link
Collaborator

sagebind commented Oct 5, 2020

For anyone who might want to take a stab at this, here's the place where this is getting configured in the libcurl build:

.define("CURL_DISABLE_CRYPTO_AUTH", None)

@sacsand
Copy link

sacsand commented Mar 2, 2021

same problem with mac os catlina 'actix-rt:worker:1' panicked at 'called `Result::unwrap()` on an `Err` value: Error { description: "A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.", code: 4, extra: None }',. any soultion .

@pbert519
Copy link
Contributor

pbert519 commented Jul 8, 2022

I think is is solved by #428.

We're using this crate with NTLM authentification with Windows and Linux.

@Jayendraz
Copy link

Jayendraz commented Aug 7, 2023

I am facing exact same issue with ntlm authentication in latest curl crate (0.4.33). any solution suggestion please?

@pbert519
Copy link
Contributor

pbert519 commented Aug 7, 2023

Did you activate the ntlm feature?

@Jayendraz
Copy link

I believe NTLM feature is enabled by default. I am able to access configured NLTM proxy server through web browser though.

@Jayendraz
Copy link

@pbert519 while I am being new to rust, realised little late about feature activation you asked. Below line in Cargo.toml helped to resolved issue. Thanks for help!

curl = {version="0.4.44", features = ["ntlm"]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants