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

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

Issue 7748033: Don't try to use explicit credentials with schemes that don't support it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit test Created 9 years, 3 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_sspi_win.h ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // See "SSPI Sample Application" at 5 // See "SSPI Sample Application" at
6 // http://msdn.microsoft.com/en-us/library/aa918273.aspx 6 // http://msdn.microsoft.com/en-us/library/aa918273.aspx
7 7
8 #include "net/http/http_auth_sspi_win.h" 8 #include "net/http/http_auth_sspi_win.h"
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 if (SecIsValidHandle(&cred_)) { 203 if (SecIsValidHandle(&cred_)) {
204 library_->FreeCredentialsHandle(&cred_); 204 library_->FreeCredentialsHandle(&cred_);
205 SecInvalidateHandle(&cred_); 205 SecInvalidateHandle(&cred_);
206 } 206 }
207 } 207 }
208 208
209 bool HttpAuthSSPI::NeedsIdentity() const { 209 bool HttpAuthSSPI::NeedsIdentity() const {
210 return decoded_server_auth_token_.empty(); 210 return decoded_server_auth_token_.empty();
211 } 211 }
212 212
213 bool HttpAuthSSPI::AllowsExplicitCredentials() const {
214 return true;
215 }
216
213 void HttpAuthSSPI::Delegate() { 217 void HttpAuthSSPI::Delegate() {
214 can_delegate_ = true; 218 can_delegate_ = true;
215 } 219 }
216 220
217 void HttpAuthSSPI::ResetSecurityContext() { 221 void HttpAuthSSPI::ResetSecurityContext() {
218 if (SecIsValidHandle(&ctxt_)) { 222 if (SecIsValidHandle(&ctxt_)) {
219 library_->DeleteSecurityContext(&ctxt_); 223 library_->DeleteSecurityContext(&ctxt_);
220 SecInvalidateHandle(&ctxt_); 224 SecInvalidateHandle(&ctxt_);
221 } 225 }
222 } 226 }
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 int token_length = pkg_info->cbMaxToken; 425 int token_length = pkg_info->cbMaxToken;
422 status = library->FreeContextBuffer(pkg_info); 426 status = library->FreeContextBuffer(pkg_info);
423 rv = MapFreeContextBufferStatusToError(status); 427 rv = MapFreeContextBufferStatusToError(status);
424 if (rv != OK) 428 if (rv != OK)
425 return rv; 429 return rv;
426 *max_token_length = token_length; 430 *max_token_length = token_length;
427 return OK; 431 return OK;
428 } 432 }
429 433
430 } // namespace net 434 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_sspi_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698