diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 01:56:36 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 01:56:36 +0000 |
commit | cf5804412f3a525a35a7549bb557bc20d3243499 (patch) | |
tree | 05cf72fc3732f7f31ea0ab50fa18b94da7fe6cb4 /net/http/http_auth_handler_negotiate_unittest.cc | |
parent | 5f19c7b31a1a80744f1639a2a642b879bcf9d96b (diff) | |
download | chromium_src-cf5804412f3a525a35a7549bb557bc20d3243499.zip chromium_src-cf5804412f3a525a35a7549bb557bc20d3243499.tar.gz chromium_src-cf5804412f3a525a35a7549bb557bc20d3243499.tar.bz2 |
Use different separators for service-type and service-name in Kerberos SPN.
GSSAPI expects SPNs to be in the form HTTP@<server_name> and SSPI expects
SPNs to be in the form HTTP/<server_name>.
BUG=33033
TEST=net_unittests --gtest_filter="*HttpAuthHandlerNegotiate*", go against Kerberized server on Linux or OSX and see that the TGS is retrieved correctly.
Review URL: http://codereview.chromium.org/3055001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52984 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_handler_negotiate_unittest.cc')
-rw-r--r-- | net/http/http_auth_handler_negotiate_unittest.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc index 2646ee6..a95eb44 100644 --- a/net/http/http_auth_handler_negotiate_unittest.cc +++ b/net/http/http_auth_handler_negotiate_unittest.cc @@ -196,7 +196,11 @@ TEST_F(HttpAuthHandlerNegotiateTest, DisableCname) { EXPECT_EQ(OK, auth_handler->GenerateAuthToken(&username, &password, &request_info, &callback, &token)); +#if defined(OS_WIN) EXPECT_EQ(L"HTTP/alias", auth_handler->spn()); +#elif defined(OS_POSIX) + EXPECT_EQ(L"HTTP@alias", auth_handler->spn()); +#endif } TEST_F(HttpAuthHandlerNegotiateTest, DisableCnameStandardPort) { @@ -212,7 +216,11 @@ TEST_F(HttpAuthHandlerNegotiateTest, DisableCnameStandardPort) { EXPECT_EQ(OK, auth_handler->GenerateAuthToken(&username, &password, &request_info, &callback, &token)); +#if defined(OS_WIN) EXPECT_EQ(L"HTTP/alias", auth_handler->spn()); +#elif defined(OS_POSIX) + EXPECT_EQ(L"HTTP@alias", auth_handler->spn()); +#endif } TEST_F(HttpAuthHandlerNegotiateTest, DisableCnameNonstandardPort) { @@ -228,7 +236,11 @@ TEST_F(HttpAuthHandlerNegotiateTest, DisableCnameNonstandardPort) { EXPECT_EQ(OK, auth_handler->GenerateAuthToken(&username, &password, &request_info, &callback, &token)); +#if defined(OS_WIN) EXPECT_EQ(L"HTTP/alias:500", auth_handler->spn()); +#elif defined(OS_POSIX) + EXPECT_EQ(L"HTTP@alias:500", auth_handler->spn()); +#endif } TEST_F(HttpAuthHandlerNegotiateTest, CnameSync) { @@ -244,7 +256,11 @@ TEST_F(HttpAuthHandlerNegotiateTest, CnameSync) { EXPECT_EQ(OK, auth_handler->GenerateAuthToken(&username, &password, &request_info, &callback, &token)); +#if defined(OS_WIN) EXPECT_EQ(L"HTTP/canonical.example.com", auth_handler->spn()); +#elif defined(OS_POSIX) + EXPECT_EQ(L"HTTP@canonical.example.com", auth_handler->spn()); +#endif } TEST_F(HttpAuthHandlerNegotiateTest, CnameAsync) { @@ -260,7 +276,11 @@ TEST_F(HttpAuthHandlerNegotiateTest, CnameAsync) { EXPECT_EQ(ERR_IO_PENDING, auth_handler->GenerateAuthToken( &username, &password, &request_info, &callback, &token)); EXPECT_EQ(OK, callback.WaitForResult()); +#if defined(OS_WIN) EXPECT_EQ(L"HTTP/canonical.example.com", auth_handler->spn()); +#elif defined(OS_POSIX) + EXPECT_EQ(L"HTTP@canonical.example.com", auth_handler->spn()); +#endif } } // namespace net |