summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-02 13:38:44 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-02 13:38:44 +0000
commit421fd2748b0648e54fe3b6ae8fd0d75faffe76f8 (patch)
treeed756022edd8335ab5eaeb190438dd17645d4dbe /net/http
parent0117fe60627af21b7ba9026329a1ca70ffa0b00a (diff)
downloadchromium_src-421fd2748b0648e54fe3b6ae8fd0d75faffe76f8.zip
chromium_src-421fd2748b0648e54fe3b6ae8fd0d75faffe76f8.tar.gz
chromium_src-421fd2748b0648e54fe3b6ae8fd0d75faffe76f8.tar.bz2
Summary of changes:
- ERR_UNMAPPED_SSPI_ERROR was renamed to ERR_UNEXPECTED_SSPI_STATUS, and reflects documented but unexpected SSPI return codes. - ERR_UNDOCUMENTED_SSPI_STATUS is used in case there are any undocumented SSPI return codes. - SEC_E_INVALID_HANDLE is mapped to ERR_INVALID_HANDLE. - SEC_E_LOGON_DENIED is mapped to ERR_ACCESS_DENIED BUG=53850 TEST=None Review URL: http://codereview.chromium.org/3332002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_auth_sspi_win.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/net/http/http_auth_sspi_win.cc b/net/http/http_auth_sspi_win.cc
index 3e22ce8..a988e19 100644
--- a/net/http/http_auth_sspi_win.cc
+++ b/net/http/http_auth_sspi_win.cc
@@ -21,13 +21,15 @@ namespace {
int MapAcquireCredentialsStatusToError(SECURITY_STATUS status,
const SEC_WCHAR* package) {
+ LOG(INFO) << "AcquireCredentialsHandle returned " << status;
switch (status) {
case SEC_E_OK:
return OK;
case SEC_E_INSUFFICIENT_MEMORY:
return ERR_OUT_OF_MEMORY;
case SEC_E_INTERNAL_ERROR:
- return ERR_UNEXPECTED;
+ LOG(ERROR) << "Unexpected SECURITY_STATUS " << status;
+ return ERR_UNEXPECTED_SSPI_STATUS;
case SEC_E_NO_CREDENTIALS:
case SEC_E_NOT_OWNER:
case SEC_E_UNKNOWN_CREDENTIALS:
@@ -37,8 +39,8 @@ int MapAcquireCredentialsStatusToError(SECURITY_STATUS status,
LOG(ERROR) << "Received SEC_E_SECPKG_NOT_FOUND for " << package;
return ERR_UNSUPPORTED_AUTH_SCHEME;
default:
- LOG(ERROR) << "Unexpected SECURITY_STATUS " << status;
- return ERR_UNEXPECTED;
+ LOG(ERROR) << "Undocumented SECURITY_STATUS " << status;
+ return ERR_UNDOCUMENTED_SSPI_STATUS;
}
}
@@ -230,6 +232,7 @@ int HttpAuthSSPI::OnFirstRound(const string16* username,
namespace {
int MapInitializeSecurityContextStatusToError(SECURITY_STATUS status) {
+ LOG(INFO) << "InitializeSecurityContext returned " << status;
switch (status) {
case SEC_E_OK:
case SEC_I_CONTINUE_NEEDED:
@@ -242,27 +245,29 @@ int MapInitializeSecurityContextStatusToError(SECURITY_STATUS status) {
// These are return codes reported by InitializeSecurityContext
// but not expected by Chrome (for example, INCOMPLETE_CREDENTIALS
// and INCOMPLETE_MESSAGE are intended for schannel).
- LOG(ERROR) << "Unmapped SECURITY_STATUS " << status;
- return ERR_UNMAPPED_SSPI_ERROR;
+ LOG(ERROR) << "Unexpected SECURITY_STATUS " << status;
+ return ERR_UNEXPECTED_SSPI_STATUS;
case SEC_E_INSUFFICIENT_MEMORY:
return ERR_OUT_OF_MEMORY;
case SEC_E_UNSUPPORTED_FUNCTION:
- // This indicates a programming error.
NOTREACHED();
return ERR_UNEXPECTED;
+ case SEC_E_INVALID_HANDLE:
+ NOTREACHED();
+ return ERR_INVALID_HANDLE;
case SEC_E_INVALID_TOKEN:
return ERR_INVALID_RESPONSE;
case SEC_E_LOGON_DENIED:
+ return ERR_ACCESS_DENIED;
case SEC_E_NO_CREDENTIALS:
case SEC_E_WRONG_PRINCIPAL:
- case SEC_E_INVALID_HANDLE:
return ERR_INVALID_AUTH_CREDENTIALS;
case SEC_E_NO_AUTHENTICATING_AUTHORITY:
case SEC_E_TARGET_UNKNOWN:
return ERR_MISCONFIGURED_AUTH_ENVIRONMENT;
default:
- LOG(ERROR) << "Unexpected SECURITY_STATUS " << status;
- return ERR_UNEXPECTED;
+ LOG(ERROR) << "Undocumented SECURITY_STATUS " << status;
+ return ERR_UNDOCUMENTED_SSPI_STATUS;
}
}