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

Unified Diff: net/http/http_auth_handler_factory.cc

Issue 4560001: Support specifying the GSSAPI library that will be used. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix another compile error on Windows Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth_handler_factory.h ('k') | net/http/http_auth_handler_negotiate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_factory.cc
diff --git a/net/http/http_auth_handler_factory.cc b/net/http/http_auth_handler_factory.cc
index d001fd4098ae4e2698f3e51c1ca0f12d14805e6e..7d34cfffc6c606e07153b9df5a015a5ce4bcfa03 100644
--- a/net/http/http_auth_handler_factory.cc
+++ b/net/http/http_auth_handler_factory.cc
@@ -48,12 +48,23 @@ HttpAuthHandlerRegistryFactory* HttpAuthHandlerFactory::CreateDefault(
"basic", new HttpAuthHandlerBasic::Factory());
registry_factory->RegisterSchemeFactory(
"digest", new HttpAuthHandlerDigest::Factory());
+
HttpAuthHandlerNegotiate::Factory* negotiate_factory =
new HttpAuthHandlerNegotiate::Factory();
+#if defined(OS_POSIX)
+ negotiate_factory->set_library(new GSSAPISharedLibrary(std::string()));
+#elif defined(OS_WIN)
+ negotiate_factory->set_library(new SSPILibraryDefault());
+#endif
negotiate_factory->set_host_resolver(host_resolver);
registry_factory->RegisterSchemeFactory("negotiate", negotiate_factory);
- registry_factory->RegisterSchemeFactory(
- "ntlm", new HttpAuthHandlerNTLM::Factory());
+
+ HttpAuthHandlerNTLM::Factory* ntlm_factory =
+ new HttpAuthHandlerNTLM::Factory();
+#if defined(OS_WIN)
+ ntlm_factory->set_sspi_library(new SSPILibraryDefault());
+#endif
+ registry_factory->RegisterSchemeFactory("ntlm", ntlm_factory);
return registry_factory;
}
@@ -73,6 +84,7 @@ HttpAuthHandlerRegistryFactory* HttpAuthHandlerRegistryFactory::Create(
const std::vector<std::string>& supported_schemes,
URLSecurityManager* security_manager,
HostResolver* host_resolver,
+ const std::string& gssapi_library_name,
bool negotiate_disable_cname_lookup,
bool negotiate_enable_port) {
HttpAuthHandlerRegistryFactory* registry_factory =
@@ -87,11 +99,20 @@ HttpAuthHandlerRegistryFactory* HttpAuthHandlerRegistryFactory::Create(
HttpAuthHandlerNTLM::Factory* ntlm_factory =
new HttpAuthHandlerNTLM::Factory();
ntlm_factory->set_url_security_manager(security_manager);
+#if defined(OS_WIN)
+ ntlm_factory->set_sspi_library(new SSPILibraryDefault());
+#endif
registry_factory->RegisterSchemeFactory("ntlm", ntlm_factory);
}
if (IsSupportedScheme(supported_schemes, "negotiate")) {
HttpAuthHandlerNegotiate::Factory* negotiate_factory =
new HttpAuthHandlerNegotiate::Factory();
+#if defined(OS_POSIX)
+ negotiate_factory->set_library(
+ new GSSAPISharedLibrary(gssapi_library_name));
+#elif defined(OS_WIN)
+ negotiate_factory->set_library(new SSPILibraryDefault());
+#endif
negotiate_factory->set_url_security_manager(security_manager);
DCHECK(host_resolver || negotiate_disable_cname_lookup);
negotiate_factory->set_host_resolver(host_resolver);
« no previous file with comments | « net/http/http_auth_handler_factory.h ('k') | net/http/http_auth_handler_negotiate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698