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

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

Issue 28144: Implement the NTLM authentication scheme by porting... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Final upload before checkin Created 11 years, 9 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_basic.cc ('k') | net/http/http_auth_handler_ntlm.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_digest.h" 5 #include "net/http/http_auth_handler_digest.h"
6 6
7 #include "base/md5.h" 7 #include "base/md5.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // [opaque="<opaque-token-value>"] 193 // [opaque="<opaque-token-value>"]
194 // [stale="<true-or-false>"] 194 // [stale="<true-or-false>"]
195 // [algorithm="<digest-algorithm>"] 195 // [algorithm="<digest-algorithm>"]
196 // [qop="<list-of-qop-values>"] 196 // [qop="<list-of-qop-values>"]
197 // [<extension-directive>] 197 // [<extension-directive>]
198 bool HttpAuthHandlerDigest::ParseChallenge( 198 bool HttpAuthHandlerDigest::ParseChallenge(
199 std::string::const_iterator challenge_begin, 199 std::string::const_iterator challenge_begin,
200 std::string::const_iterator challenge_end) { 200 std::string::const_iterator challenge_end) {
201 scheme_ = "digest"; 201 scheme_ = "digest";
202 score_ = 2; 202 score_ = 2;
203 properties_ = ENCRYPTS_IDENTITY;
203 204
204 // Initialize to defaults. 205 // Initialize to defaults.
205 stale_ = false; 206 stale_ = false;
206 algorithm_ = ALGORITHM_UNSPECIFIED; 207 algorithm_ = ALGORITHM_UNSPECIFIED;
207 qop_ = QOP_UNSPECIFIED; 208 qop_ = QOP_UNSPECIFIED;
208 realm_ = nonce_ = domain_ = opaque_ = std::string(); 209 realm_ = nonce_ = domain_ = opaque_ = std::string();
209 210
210 HttpAuth::ChallengeTokenizer props(challenge_begin, challenge_end); 211 HttpAuth::ChallengeTokenizer props(challenge_begin, challenge_end);
211 212
212 if (!props.valid() || !LowerCaseEqualsASCII(props.scheme(), "digest")) 213 if (!props.valid() || !LowerCaseEqualsASCII(props.scheme(), "digest"))
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 269 }
269 } 270 }
270 } else { 271 } else {
271 DLOG(INFO) << "Skipping unrecognized digest property"; 272 DLOG(INFO) << "Skipping unrecognized digest property";
272 // TODO(eroman): perhaps we should fail instead of silently skipping? 273 // TODO(eroman): perhaps we should fail instead of silently skipping?
273 } 274 }
274 return true; 275 return true;
275 } 276 }
276 277
277 } // namespace net 278 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_basic.cc ('k') | net/http/http_auth_handler_ntlm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698