cURL / Mailing Lists / curl-users / Single Mail

curl-users

NTLM Authentication on Windows not work

From: <Stefan.Joss_at_t-online.de>
Date: Thu, 01 Sep 2011 09:36:45 +0200

Hello,

        I try to get an (https-)URL from a server that uses NTLM
Authentication. The curl-version tells me that NTLM support is
available, and also I set the "--ntlm" switch, curl uses Basic
authentication. Therefore the request is rejected. Can someone tell me
what I'm doing wrong?

        Thanks in advance.

        Regards,

        Stefan

        Version-Info:

        C:curl>curl --version
curl 7.21.7 (i386-pc-win32) libcurl/7.21.7 OpenSSL/0.9.8r zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3
pop3s rtsp
smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate Largefile NTLM SSL SSPI libz

        C:curl>

Call:

        curl -k -D --ntlm --user xxx:xxx --trace-ascii tmp.txt https://...

Trace:

        == Info: About to connect() to xxxport 443 (#0)
== Info: Trying 160.50.93.18... == Info: connected
== Info: Connected to iwalogin.bmwgroup.net (160.50.93.18) port 443
(#0)
== Info: SSLv3, TLS handshake, Client hello (1):
=> Send SSL data, 117 bytes (0x75)
== Info: SSLv3, TLS handshake, Server hello (2):
<= Recv SSL data, 81 bytes (0x51)
== Info: SSLv3, TLS handshake, CERT (11):
<= Recv SSL data, 3217 bytes (0xc91)
== Info: SSLv3, TLS handshake, Server finished (14):
<= Recv SSL data, 4 bytes (0x4)
== Info: SSLv3, TLS handshake, Client key exchange (16):
=> Send SSL data, 134 bytes (0x86)
== Info: SSLv3, TLS change cipher, Client hello (1):
=> Send SSL data, 1 bytes (0x1)
== Info: SSLv3, TLS handshake, Finished (20):
=> Send SSL data, 16 bytes (0x10)
== Info: SSLv3, TLS change cipher, Client hello (1):
<= Recv SSL data, 1 bytes (0x1)
== Info: SSLv3, TLS handshake, Finished (20):
<= Recv SSL data, 16 bytes (0x10)
== Info: SSL connection using RC4-MD5
== Info: Server certificate:
== Info: subject: O=xxx; OU=SSL-Server; CN=xxx
== Info: start date: 2010-10-21 07:58:40 GMT
== Info: expire date: 2013-10-05 07:58:40 GMT
== Info: common name: xxx (matched)
== Info: issuer: DC=corp; DC=bmw; DC=europe; CN=xxx Issuing CA 1
== Info: SSL certificate verify result: unable to get local issuer
certificate (20), continuing anyway.
== Info: Server auth using Basic with user 'xxx'
=> Send header, 242 bytes (0xf2)
0000: GET /xxx HTTP/
0040: 1.1
0045: Authorization: Basic xxx
0074: User-Agent: curl/7.21.7 (i386-pc-win32) libcurl/7.21.7 OpenSSL/0
00b4: .9.8r zlib/1.2.5
00c6: Host: xxx
00e3: Accept: */*
00f0:
<= Recv header, 27 bytes (0x1b)
0000: HTTP/1.1 401 Unauthorized
<= Recv header, 22 bytes (0x16)
0000: Content-Length: 1656
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 27 bytes (0x1b)
0000: Server: Microsoft-IIS/6.0
<= Recv header, 24 bytes (0x18)
0000: WWW-Authenticate: NTLM
<= Recv header, 23 bytes (0x17)
0000: X-Powered-By: ASP.NET
<= Recv header, 37 bytes (0x25)
0000: Date: Thu, 01 Sep 2011 07:30:48 GMT
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 1656 bytes (0x678)
0000: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3
[1]
0040: .org/TR/html4/strict.dtd">
005c: <HTML><HEAD><TITLE>You are not authorized to view this page</TIT
009c: LE>

        ...

        0656: </TD></TR></TABLE></BODY></HTML>
== Info: Connection #0 to host xxx left intact
== Info: Closing connection #0
== Info: SSLv3, TLS alert, Client hello (1):
=> Send SSL data, 2 bytes (0x2)
0000: ..

Links:
------
[1] http://www.w3

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-01