Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: net/http/http_auth_handler_ntlm_portable.cc

Issue 3360017: Fix multi-round authentication.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: SocketStream fix Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_auth_handler_ntlm.cc ('k') | net/http/http_auth_handler_ntlm_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_auth_handler_ntlm.h" 5 #include "net/http/http_auth_handler_ntlm.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 // For gethostname 8 // For gethostname
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 HttpAuthHandlerNTLM::~HttpAuthHandlerNTLM() { 646 HttpAuthHandlerNTLM::~HttpAuthHandlerNTLM() {
647 // Wipe our copy of the password from memory, to reduce the chance of being 647 // Wipe our copy of the password from memory, to reduce the chance of being
648 // written to the paging file on disk. 648 // written to the paging file on disk.
649 ZapString(&password_); 649 ZapString(&password_);
650 } 650 }
651 651
652 bool HttpAuthHandlerNTLM::NeedsIdentity() { 652 bool HttpAuthHandlerNTLM::NeedsIdentity() {
653 return !auth_data_.empty(); 653 return !auth_data_.empty();
654 } 654 }
655 655
656 bool HttpAuthHandlerNTLM::IsFinalRound() {
657 return !auth_data_.empty();
658 }
659
660 bool HttpAuthHandlerNTLM::AllowsDefaultCredentials() { 656 bool HttpAuthHandlerNTLM::AllowsDefaultCredentials() {
661 // Default credentials are not supported in the portable implementation of 657 // Default credentials are not supported in the portable implementation of
662 // NTLM, but are supported in the SSPI implementation. 658 // NTLM, but are supported in the SSPI implementation.
663 return false; 659 return false;
664 } 660 }
665 661
666 // static 662 // static
667 HttpAuthHandlerNTLM::GenerateRandomProc 663 HttpAuthHandlerNTLM::GenerateRandomProc
668 HttpAuthHandlerNTLM::SetGenerateRandomProc( 664 HttpAuthHandlerNTLM::SetGenerateRandomProc(
669 GenerateRandomProc proc) { 665 GenerateRandomProc proc) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 // NOTE: Default credentials are not supported for the portable implementation 727 // NOTE: Default credentials are not supported for the portable implementation
732 // of NTLM. 728 // of NTLM.
733 scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM); 729 scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM);
734 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) 730 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log))
735 return ERR_INVALID_RESPONSE; 731 return ERR_INVALID_RESPONSE;
736 handler->swap(tmp_handler); 732 handler->swap(tmp_handler);
737 return OK; 733 return OK;
738 } 734 }
739 735
740 } // namespace net 736 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_ntlm.cc ('k') | net/http/http_auth_handler_ntlm_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698