summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_handler_digest.h
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 18:30:14 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 18:30:14 +0000
commiteb83311255f63ebd8de0dc7bf61e476c5f98c264 (patch)
tree00ba52ac47c449219be28003da68b83c297da99a /net/http/http_auth_handler_digest.h
parent3e263c5329d201147acd1d90a0443d5f1c39fdf5 (diff)
downloadchromium_src-eb83311255f63ebd8de0dc7bf61e476c5f98c264.zip
chromium_src-eb83311255f63ebd8de0dc7bf61e476c5f98c264.tar.gz
chromium_src-eb83311255f63ebd8de0dc7bf61e476c5f98c264.tar.bz2
Improve unit test coverage of HttpAuthHandlerDigest parsing.
Also, if the only qop is auth-int, use a different handler since this is not currently handled. BUG=45194 TEST=net_unittests --gtest_filter="*HttpAuthHandlerDigest*" Review URL: http://codereview.chromium.org/4825001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_handler_digest.h')
-rw-r--r--net/http/http_auth_handler_digest.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h
index 0c38641..ba5d92f 100644
--- a/net/http/http_auth_handler_digest.h
+++ b/net/http/http_auth_handler_digest.h
@@ -63,12 +63,11 @@ class HttpAuthHandlerDigest : public HttpAuthHandler {
ALGORITHM_MD5_SESS,
};
- // Possible values for "qop" -- may be or-ed together if there were
- // multiple comma separated values.
+ // Possible values for QualityOfProtection.
+ // auth-int is not supported, see http://crbug.com/62890 for justification.
enum QualityOfProtection {
- QOP_UNSPECIFIED = 0,
- QOP_AUTH = 1 << 0,
- QOP_AUTH_INT = 1 << 1,
+ QOP_UNSPECIFIED,
+ QOP_AUTH,
};
explicit HttpAuthHandlerDigest(int nonce_count);
@@ -86,8 +85,8 @@ class HttpAuthHandlerDigest : public HttpAuthHandler {
static std::string GenerateNonce();
// Convert enum value back to string.
- static std::string QopToString(int qop);
- static std::string AlgorithmToString(int algorithm);
+ static std::string QopToString(QualityOfProtection qop);
+ static std::string AlgorithmToString(DigestAlgorithm algorithm);
// Extract the method and path of the request, as needed by
// the 'A2' production. (path may be a hostname for proxy).
@@ -122,7 +121,7 @@ class HttpAuthHandlerDigest : public HttpAuthHandler {
std::string opaque_;
bool stale_;
DigestAlgorithm algorithm_;
- int qop_; // Bitfield of QualityOfProtection
+ QualityOfProtection qop_;
int nonce_count_;