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

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

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: use system srp and mpi libs, not local copies Created 9 years, 8 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
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_digest.h" 5 #include "net/http/http_auth_handler_digest.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/md5.h" 10 #include "base/md5.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 291 }
292 292
293 void HttpAuthHandlerDigest::GetRequestMethodAndPath( 293 void HttpAuthHandlerDigest::GetRequestMethodAndPath(
294 const HttpRequestInfo* request, 294 const HttpRequestInfo* request,
295 std::string* method, 295 std::string* method,
296 std::string* path) const { 296 std::string* path) const {
297 DCHECK(request); 297 DCHECK(request);
298 298
299 const GURL& url = request->url; 299 const GURL& url = request->url;
300 300
301 if (target_ == HttpAuth::AUTH_PROXY && url.SchemeIs("https")) { 301 if (target_ == HttpAuth::AUTH_PROXY &&
302 (url.SchemeIs("https") || url.SchemeIs("httpsv"))) {
302 *method = "CONNECT"; 303 *method = "CONNECT";
303 *path = GetHostAndPort(url); 304 *path = GetHostAndPort(url);
304 } else { 305 } else {
305 *method = request->method; 306 *method = request->method;
306 *path = HttpUtil::PathForRequest(url); 307 *path = HttpUtil::PathForRequest(url);
307 } 308 }
308 } 309 }
309 310
310 std::string HttpAuthHandlerDigest::AssembleResponseDigest( 311 std::string HttpAuthHandlerDigest::AssembleResponseDigest(
311 const std::string& method, 312 const std::string& method,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop. 367 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop.
367 authorization += ", qop=" + QopToString(qop_); 368 authorization += ", qop=" + QopToString(qop_);
368 authorization += ", nc=" + nc; 369 authorization += ", nc=" + nc;
369 authorization += ", cnonce=" + HttpUtil::Quote(cnonce); 370 authorization += ", cnonce=" + HttpUtil::Quote(cnonce);
370 } 371 }
371 372
372 return authorization; 373 return authorization;
373 } 374 }
374 375
375 } // namespace net 376 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698