cURL / Mailing Lists / curl-library / Single Mail

curl-library

NTLM test 2032 failing

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Thu, 8 Nov 2012 21:12:05 +0100

The NTLM test 2032 is failing for me:

####
fk_at_r500 ~/git/curl/tests $./runtests.pl -v -n -p 2032
********* System characteristics ********
* curl 7.28.1-DEV (amd64-unknown-freebsd10.0)
* libcurl/7.28.1-DEV OpenSSL/1.0.1c zlib/1.2.7 libidn/1.25
* Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
* Host: r500.local
* System: FreeBSD r500.local 10.0-CURRENT FreeBSD 10.0-CURRENT #508 r+b8ff3e2: Tue Nov 6 22:58:40 CET 2012 fk_at_r500.local:/usr/obj/usr/src/sys/ZOEY amd64
* Server SSL: OFF libcurl SSL: ON
* debug build: OFF track memory: OFF
* valgrind: OFF HTTP IPv6 ON
* FTP IPv6 ON Libtool lib: OFF
* Shared build: yes
* SSL library: OpenSSL
* Ports:
* HTTP/8990 FTP/8992 FTP2/8995 RTSP/9007
* TFTP/8997 HTTP-IPv6/8994 RTSP-IPv6/9008 FTP-IPv6/8996
* GOPHER/9009 GOPHER-IPv6/9009
* SSH/8999 SOCKS/9000 POP3/9001 IMAP/9003 SMTP/9005
* POP3-IPv6/9002 IMAP-IPv6/9004 SMTP-IPv6/9006
* HTTPTLS/9011 HTTPTLS-IPv6/9012
*****************************************
startnew: perl -I. ./httpserver.pl --pidfile ".http_server.pid" --logfile "log/http_server.log" --ipv4 --port 8990 --srcdir "."
RUN: ../src/curl --max-time 13 --output log/http_verify.out --silent --verbose --globoff "http://127.0.0.1:8990/verifiedserver" 2>log/http_verify.log
RUN: HTTP server is now running PID 27239
* pid http => 27239 27239
prechecked ./libtest/chkhostname curlhost
test 2032...[NTLM connection mapping]
./libtest/libntlmconnect http://127.0.0.1:8990/2032 >log/stdout2032 2>log/stderr2032

 data FAILED:
--- log/check-expected 2012-11-08 20:12:02.853381750 +0100
+++ log/check-generated 2012-11-08 20:12:02.853381750 +0100
@@ -1,28 +0,0 @@
-HTTP/1.1 401 Need Basic or NTLM auth
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 29
-WWW-Authenticate: NTLM
-WWW-Authenticate: Basic realm="testrealm"
-
-This is a bad password page!
-HTTP/1.1 401 Need Basic or NTLM auth
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 29
-WWW-Authenticate: NTLM
-WWW-Authenticate: Basic realm="testrealm"
-
-This is a bad password page!
-HTTP/1.1 401 NTLM intermediate (2)
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 33
-WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
-
-HTTP/1.1 200 Things are fine in server land
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 32
-
-Finally, this is the real page!
== Contents of files in the log/ dir after test 2032
=== Start of file check-expected
 HTTP/1.1 401 Need Basic or NTLM auth
 Server: Microsoft-IIS/5.0
 Content-Type: text/html; charset=iso-8859-1
 Content-Length: 29
 WWW-Authenticate: NTLM
 WWW-Authenticate: Basic realm="testrealm"
 This is a bad password page
 HTTP/1.1 401 Need Basic or NTLM auth
 Server: Microsoft-IIS/5.0
 Content-Type: text/html; charset=iso-8859-1
 Content-Length: 29
 WWW-Authenticate: NTLM
 WWW-Authenticate: Basic realm="testrealm"
 This is a bad password page
 HTTP/1.1 401 NTLM intermediate (2)
 Server: Microsoft-IIS/5.0
 Content-Type: text/html; charset=iso-8859-1
 Content-Length: 33
 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
 HTTP/1.1 200 Things are fine in server land
 Server: Microsoft-IIS/5.0
 Content-Type: text/html; charset=iso-8859-1
 Content-Length: 32
 Finally, this is the real page
=== End of file check-expected
=== Start of file curl.log
 ./libtest/libntlmconnect http://127.0.0.1:8990/2032 >log/stdout2032 2>log/stderr2032
=== End of file curl.log
=== Start of file curlverout.log
 curl 7.28.1-DEV (amd64-unknown-freebsd10.0) libcurl/7.28.1-DEV OpenSSL/1.0.1c zlib/1.2.7 libidn/1.25
 Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
 Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
=== End of file curlverout.log
=== Start of file http_server.log
 20:12:00.996303 Running HTTP IPv4 version on port 8990
 20:12:00.998068 Wrote pid 27239 to .http_server.pid
 20:12:01.995142 ====> Client connect
 20:12:01.995280 TCP_NODELAY set
 20:12:01.995376 accept_connection 3 returned 4
 20:12:01.995478 accept_connection 3 returned 0
 20:12:01.995643 Read 96 bytes
 20:12:01.995765 Process 96 bytes request
 20:12:01.995890 Got request: GET /verifiedserver HTTP/1.1
 20:12:01.995984 Are-we-friendly question received
 20:12:01.996228 Wrote request (96 bytes) input to log/server.input
 20:12:01.996444 Send response test-2 section <data0>
 20:12:01.996552 Identifying ourselves as friends
 20:12:01.996820 Sent off 56 bytes
 20:12:01.997043 Response sent (56 bytes) and written to log/server.response
 20:12:01.997154 special request received, no persistency
 20:12:01.997248 ====> Client disconnect 0
 20:12:03.081426 ====> Client connect
 20:12:03.081569 TCP_NODELAY set
 20:12:03.081665 accept_connection 3 returned 4
 20:12:03.081762 accept_connection 3 returned 0
 20:12:03.081872 Read 108 bytes
 20:12:03.081967 Process 108 bytes request
 20:12:03.082101 Got request: GET /20320100 HTTP/1.1
 20:12:03.082198 Requested test number 2032 part 100
 20:12:03.082550 - request found to be complete
 20:12:03.082846 Wrote request (108 bytes) input to log/server.input
 20:12:03.083044 Send response test2032 section <data100>
 20:12:03.083550 Sent off 200 bytes
 20:12:03.083718 Sending response failed. Only (200 bytes) of (221 bytes) were sent
 20:12:03.083814 instructed to close connection after server-reply
 20:12:03.083904 ====> Client disconnect 0
 20:12:03.134973 ====> Client connect
 20:12:03.135097 TCP_NODELAY set
 20:12:03.135191 accept_connection 3 returned 4
 20:12:03.135288 accept_connection 3 returned 0
 20:12:03.135397 Read 108 bytes
 20:12:03.135491 Process 108 bytes request
 20:12:03.135609 Got request: GET /20320100 HTTP/1.1
 20:12:03.135700 Requested test number 2032 part 100
 20:12:03.135942 - request found to be complete
 20:12:03.136093 Wrote request (108 bytes) input to log/server.input
 20:12:03.136234 Send response test2032 section <data100>
 20:12:03.136674 Sent off 200 bytes
 20:12:03.136834 Sending response failed. Only (200 bytes) of (221 bytes) were sent
 20:12:03.136929 instructed to close connection after server-reply
 20:12:03.137020 ====> Client disconnect 0
=== End of file http_server.log
=== Start of file http_verify.log
 * About to connect() to 127.0.0.1 port 8990 (#0)
 * Trying 127.0.0.1...
 * connected
 * Connected to 127.0.0.1 (127.0.0.1) port 8990 (#0)
> GET /verifiedserver HTTP/1.1
> User-Agent: curl/7.28.1-DEV
> Host: 127.0.0.1:8990
> Accept: */*
>
 < HTTP/1.1 200 OK
 < Content-Length: 17
 <
 { [data not shown]
 * Connection #0 to host 127.0.0.1 left intact
 * Closing connection #0
=== End of file http_verify.log
=== Start of file http_verify.out
 WE ROOLZ: 27239
=== End of file http_verify.out
=== Start of file server.input
 GET /20320100 HTTP/1.1
 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
 Host: 127.0.0.1:8990
 Accept: */*
 GET /20320100 HTTP/1.1
 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
 Host: 127.0.0.1:8990
 Accept: */*
=== End of file server.input
=== Start of file server.response
 HTTP/1.1 200 OK
 Content-Length: 17
 WE ROOLZ: 27239
 HTTP/1.1 401 Need Basic or NTLM auth
 Server: Microsoft-IIS/5.0
 Content-Type: text/html; charset=iso-8859-1
 Content-Length: 29
 WWW-Authenticate: NTLM
 WWW-Authenticate: Basic realm="testrealm"
 This is HTTP/1.1 401 Need Basic or NTLM auth
 Server: Microsoft-IIS/5.0
 Content-Type: text/html; charset=iso-8859-1
 Content-Length: 29
 WWW-Authenticate: NTLM
 WWW-Authenticate: Basic realm="testrealm"
 This is
=== End of file server.response
=== Start of file stderr2032
 URL: http://127.0.0.1:8990/2032
 * About to connect() to 127.0.0.1 port 8990 (#0)
 * Trying 127.0.0.1...
 libntlmconnect.c:224 num_handles 1 timeout 1
 * Connected to 127.0.0.1 (127.0.0.1) port 8990 (#0)
 * Connected to 127.0.0.1 (127.0.0.1) port 8990 (#0)
 * Server auth using Basic with user 'testuser'
> GET /20320100 HTTP/1.1
 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
 Host: 127.0.0.1:8990
 Accept: */*
 * About to connect() to 127.0.0.1 port 8990 (#1)
 * Trying 127.0.0.1...
 * connected
 * Connected to 127.0.0.1 (127.0.0.1) port 8990 (#1)
 * Server auth using Basic with user 'testuser'
> GET /20320100 HTTP/1.1
 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
 Host: 127.0.0.1:8990
 Accept: */*
 Unexpected new socket
 * Closing connection #0
 * Closing connection #1
=== End of file stderr2032

 - abort tests
* kill pid for http => 27239
RUN: Process with pid 27239 signalled to die
RUN: Process with pid 27239 forced to die with SIGKILL
TESTDONE: 0 tests out of 1 reported OK: 0%
TESTFAIL: These test cases failed: 2032
TESTDONE: 1 tests were considered during 2 seconds.
####

I tried to bisect it but didn't find a a commit that works,
3b7d31c1eddc524 is already failing.

Looks like libcurl isn't reading the complete NTLM response.

Fabian

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2012-11-08