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

Unified Diff: net/http/http_mac_signature.cc

Issue 6969050: MAC Cookies (patch 4 of N) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_mac_signature.h ('k') | net/http/http_mac_signature_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_mac_signature.cc
===================================================================
--- net/http/http_mac_signature.cc (revision 85283)
+++ net/http/http_mac_signature.cc (working copy)
@@ -52,14 +52,12 @@
bool HttpMacSignature::AddStateInfo(const std::string& id,
const std::string& mac_key,
- const std::string& mac_algorithm,
- const std::string& issuer) {
+ const std::string& mac_algorithm) {
DCHECK(id_.empty());
if (!IsPlainString(id) || id.empty() ||
mac_key.empty() ||
- mac_algorithm.empty() ||
- !IsPlainString(issuer) || issuer.empty()) {
+ mac_algorithm.empty()) {
return false;
}
@@ -72,7 +70,6 @@
id_ = id;
mac_key_ = mac_key;
- issuer_ = issuer;
return true;
}
@@ -117,9 +114,7 @@
DCHECK(IsPlainString(mac));
return "MAC id=\"" + id_ +
- "\", issuer=\"" + issuer_ +
- "\", timestamp=\"" + timestamp +
- "\", nonce=\"" + nonce +
+ "\", nonce=\"" + timestamp + ":" + nonce +
"\", mac=\"" + mac + "\"";
}
@@ -128,14 +123,13 @@
const std::string& nonce) {
static const std::string kNewLine = "\n";
- std::string normalized_request = id_ + kNewLine;
- normalized_request += issuer_ + kNewLine;
- normalized_request += timestamp + kNewLine;
- normalized_request += nonce + kNewLine;
+ std::string normalized_request = timestamp + ":" + nonce + kNewLine;
normalized_request += method_ + kNewLine;
normalized_request += request_uri_ + kNewLine;
normalized_request += host_ + kNewLine;
normalized_request += port_ + kNewLine;
+ normalized_request += kNewLine;
+ normalized_request += kNewLine;
return normalized_request;
}
« no previous file with comments | « net/http/http_mac_signature.h ('k') | net/http/http_mac_signature_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698