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

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

Issue 15200005: Grab bag of clang fixes for Windows code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ptr and cast style Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/dns/dns_config_service_win_unittest.cc ('k') | net/http/http_auth_sspi_win.cc » ('j') | 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) 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 // This file contains common routines used by NTLM and Negotiate authentication 5 // This file contains common routines used by NTLM and Negotiate authentication
6 // using the SSPI API on Windows. 6 // using the SSPI API on Windows.
7 7
8 #ifndef NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ 8 #ifndef NET_HTTP_HTTP_AUTH_SSPI_WIN_H_
9 #define NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ 9 #define NET_HTTP_HTTP_AUTH_SSPI_WIN_H_
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 virtual SECURITY_STATUS FreeContextBuffer(PVOID pvContextBuffer) { 119 virtual SECURITY_STATUS FreeContextBuffer(PVOID pvContextBuffer) {
120 return ::FreeContextBuffer(pvContextBuffer); 120 return ::FreeContextBuffer(pvContextBuffer);
121 } 121 }
122 }; 122 };
123 123
124 class NET_EXPORT_PRIVATE HttpAuthSSPI { 124 class NET_EXPORT_PRIVATE HttpAuthSSPI {
125 public: 125 public:
126 HttpAuthSSPI(SSPILibrary* sspi_library, 126 HttpAuthSSPI(SSPILibrary* sspi_library,
127 const std::string& scheme, 127 const std::string& scheme,
128 SEC_WCHAR* security_package, 128 const SEC_WCHAR* security_package,
129 ULONG max_token_length); 129 ULONG max_token_length);
130 ~HttpAuthSSPI(); 130 ~HttpAuthSSPI();
131 131
132 bool NeedsIdentity() const; 132 bool NeedsIdentity() const;
133 133
134 bool AllowsExplicitCredentials() const; 134 bool AllowsExplicitCredentials() const;
135 135
136 HttpAuth::AuthorizationResult ParseChallenge( 136 HttpAuth::AuthorizationResult ParseChallenge(
137 HttpAuth::ChallengeTokenizer* tok); 137 HttpAuth::ChallengeTokenizer* tok);
138 138
(...skipping 20 matching lines...) Expand all
159 const std::wstring& spn, 159 const std::wstring& spn,
160 const void* in_token, 160 const void* in_token,
161 int in_token_len, 161 int in_token_len,
162 void** out_token, 162 void** out_token,
163 int* out_token_len); 163 int* out_token_len);
164 164
165 void ResetSecurityContext(); 165 void ResetSecurityContext();
166 166
167 SSPILibrary* library_; 167 SSPILibrary* library_;
168 std::string scheme_; 168 std::string scheme_;
169 SEC_WCHAR* security_package_; 169 const SEC_WCHAR* security_package_;
170 std::string decoded_server_auth_token_; 170 std::string decoded_server_auth_token_;
171 ULONG max_token_length_; 171 ULONG max_token_length_;
172 CredHandle cred_; 172 CredHandle cred_;
173 CtxtHandle ctxt_; 173 CtxtHandle ctxt_;
174 bool can_delegate_; 174 bool can_delegate_;
175 }; 175 };
176 176
177 // Splits |combined| into domain and username. 177 // Splits |combined| into domain and username.
178 // If |combined| is of form "FOO\bar", |domain| will contain "FOO" and |user| 178 // If |combined| is of form "FOO\bar", |domain| will contain "FOO" and |user|
179 // will contain "bar". 179 // will contain "bar".
(...skipping 18 matching lines...) Expand all
198 // If the return value is ERR_UNEXPECTED, there was an unanticipated problem 198 // If the return value is ERR_UNEXPECTED, there was an unanticipated problem
199 // in the underlying SSPI call. The details are logged, and |*max_token_length| 199 // in the underlying SSPI call. The details are logged, and |*max_token_length|
200 // is not changed. 200 // is not changed.
201 NET_EXPORT_PRIVATE int DetermineMaxTokenLength(SSPILibrary* library, 201 NET_EXPORT_PRIVATE int DetermineMaxTokenLength(SSPILibrary* library,
202 const std::wstring& package, 202 const std::wstring& package,
203 ULONG* max_token_length); 203 ULONG* max_token_length);
204 204
205 } // namespace net 205 } // namespace net
206 206
207 #endif // NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ 207 #endif // NET_HTTP_HTTP_AUTH_SSPI_WIN_H_
OLDNEW
« no previous file with comments | « net/dns/dns_config_service_win_unittest.cc ('k') | net/http/http_auth_sspi_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698