diff options
author | asanka <asanka@chromium.org> | 2016-03-23 09:20:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-23 16:22:04 +0000 |
commit | 5ffd5d79244e6c9928ed465fcfed8a136d04140a (patch) | |
tree | 61b94a189d803d0d262244654252bf8fec7fb691 /net/http/http_auth_handler_negotiate_unittest.cc | |
parent | da4111853b1da632bf7566e3505f40ef9cca1a66 (diff) | |
download | chromium_src-5ffd5d79244e6c9928ed465fcfed8a136d04140a.zip chromium_src-5ffd5d79244e6c9928ed465fcfed8a136d04140a.tar.gz chromium_src-5ffd5d79244e6c9928ed465fcfed8a136d04140a.tar.bz2 |
[net/http auth] Support channel bindings for HTTP authentication.
Start using tls-server-end-point channel bindings for HTTP
authentication if a certificate is available. The current implementation
should work on Windows and Posix. Currently only SHA-256, SHA-384, and
SHA-512 are supported for generating channel bindings.
BUG=270219
R=rsleevi@chromium.org,davidben@chromium.org
Review URL: https://codereview.chromium.org/1408433006
Cr-Commit-Position: refs/heads/master@{#382858}
Diffstat (limited to 'net/http/http_auth_handler_negotiate_unittest.cc')
-rw-r--r-- | net/http/http_auth_handler_negotiate_unittest.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc index fd46716..57a7b7e 100644 --- a/net/http/http_auth_handler_negotiate_unittest.cc +++ b/net/http/http_auth_handler_negotiate_unittest.cc @@ -13,6 +13,10 @@ #include "net/dns/mock_host_resolver.h" #include "net/http/http_request_info.h" #include "net/http/mock_allow_http_auth_preferences.h" +#include "net/ssl/ssl_info.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "testing/platform_test.h" + #if defined(OS_ANDROID) #include "net/android/dummy_spnego_authenticator.h" #elif defined(OS_WIN) @@ -20,8 +24,6 @@ #elif defined(OS_POSIX) #include "net/http/mock_gssapi_library_posix.h" #endif -#include "testing/gtest/include/gtest/gtest.h" -#include "testing/platform_test.h" namespace net { @@ -189,10 +191,11 @@ class HttpAuthHandlerNegotiateTest : public PlatformTest { #endif // defined(OS_POSIX) - int CreateHandler(bool disable_cname_lookup, bool use_port, - bool synchronous_resolve_mode, - const std::string& url_string, - scoped_ptr<HttpAuthHandlerNegotiate>* handler) { + int CreateHandler(bool disable_cname_lookup, + bool use_port, + bool synchronous_resolve_mode, + const std::string& url_string, + scoped_ptr<HttpAuthHandlerNegotiate>* handler) { http_auth_preferences_->set_negotiate_disable_cname_lookup( disable_cname_lookup); http_auth_preferences_->set_negotiate_enable_port(use_port); @@ -205,11 +208,10 @@ class HttpAuthHandlerNegotiateTest : public PlatformTest { // after creating the handler, and make sure that generic_handler // no longer holds on to the HttpAuthHandlerNegotiate object. scoped_ptr<HttpAuthHandler> generic_handler; - int rv = factory_->CreateAuthHandlerFromString("Negotiate", - HttpAuth::AUTH_SERVER, - gurl, - BoundNetLog(), - &generic_handler); + SSLInfo null_ssl_info; + int rv = factory_->CreateAuthHandlerFromString( + "Negotiate", HttpAuth::AUTH_SERVER, null_ssl_info, gurl, BoundNetLog(), + &generic_handler); if (rv != OK) return rv; HttpAuthHandlerNegotiate* negotiate_handler = |