OLD | NEW |
1 // Copyright (c) 2011 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" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 << "FreeContextBuffer returned undocumented status 0x" | 179 << "FreeContextBuffer returned undocumented status 0x" |
180 << std::hex << status; | 180 << std::hex << status; |
181 return ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS; | 181 return ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS; |
182 } | 182 } |
183 } | 183 } |
184 | 184 |
185 } // anonymous namespace | 185 } // anonymous namespace |
186 | 186 |
187 HttpAuthSSPI::HttpAuthSSPI(SSPILibrary* library, | 187 HttpAuthSSPI::HttpAuthSSPI(SSPILibrary* library, |
188 const std::string& scheme, | 188 const std::string& scheme, |
189 SEC_WCHAR* security_package, | 189 const SEC_WCHAR* security_package, |
190 ULONG max_token_length) | 190 ULONG max_token_length) |
191 : library_(library), | 191 : library_(library), |
192 scheme_(scheme), | 192 scheme_(scheme), |
193 security_package_(security_package), | 193 security_package_(security_package), |
194 max_token_length_(max_token_length), | 194 max_token_length_(max_token_length), |
195 can_delegate_(false) { | 195 can_delegate_(false) { |
196 DCHECK(library_); | 196 DCHECK(library_); |
197 SecInvalidateHandle(&cred_); | 197 SecInvalidateHandle(&cred_); |
198 SecInvalidateHandle(&ctxt_); | 198 SecInvalidateHandle(&ctxt_); |
199 } | 199 } |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 int token_length = pkg_info->cbMaxToken; | 420 int token_length = pkg_info->cbMaxToken; |
421 status = library->FreeContextBuffer(pkg_info); | 421 status = library->FreeContextBuffer(pkg_info); |
422 rv = MapFreeContextBufferStatusToError(status); | 422 rv = MapFreeContextBufferStatusToError(status); |
423 if (rv != OK) | 423 if (rv != OK) |
424 return rv; | 424 return rv; |
425 *max_token_length = token_length; | 425 *max_token_length = token_length; |
426 return OK; | 426 return OK; |
427 } | 427 } |
428 | 428 |
429 } // namespace net | 429 } // namespace net |
OLD | NEW |