| 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 #include "net/http/http_auth_handler_negotiate.h" | 5 #include "net/http/http_auth_handler_negotiate.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "net/base/mock_host_resolver.h" | 9 #include "net/base/mock_host_resolver.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 "\x26\xFE\xBE\xFE\x22\xB6\x9B\x1A\xE5\x55\x2C\x93\xB7\x3B\xD6\x4C" | 94 "\x26\xFE\xBE\xFE\x22\xB6\x9B\x1A\xE5\x55\x2C\x93\xB7\x3B\xD6\x4C" |
| 95 "\x35\x35\xC1\x59\x61\xD4\x1F\x2E\x4C\xE1\x72\x8F\x71\x4B\x0C\x39" | 95 "\x35\x35\xC1\x59\x61\xD4\x1F\x2E\x4C\xE1\x72\x8F\x71\x4B\x0C\x39" |
| 96 "\x80\x79\xFA\xCD\xEA\x71\x1B\xAE\x35\x41\xED\xF9\x65\x0C\x59\xF8" | 96 "\x80\x79\xFA\xCD\xEA\x71\x1B\xAE\x35\x41\xED\xF9\x65\x0C\x59\xF8" |
| 97 "\xE1\x27\xDA\xD6\xD1\x20\x32\xCD\xBF\xD1\xEF\xE2\xED\xAD\x5D\xA7" | 97 "\xE1\x27\xDA\xD6\xD1\x20\x32\xCD\xBF\xD1\xEF\xE2\xED\xAD\x5D\xA7" |
| 98 "\x69\xE3\x55\xF9\x30\xD3\xD4\x08\xC8\xCA\x62\xF8\x64\xEC\x9B\x92" | 98 "\x69\xE3\x55\xF9\x30\xD3\xD4\x08\xC8\xCA\x62\xF8\x64\xEC\x9B\x92" |
| 99 "\x1A\xF1\x03\x2E\xCC\xDC\xEB\x17\xDE\x09\xAC\xA9\x58\x86"; | 99 "\x1A\xF1\x03\x2E\xCC\xDC\xEB\x17\xDE\x09\xAC\xA9\x58\x86"; |
| 100 test::GssContextMockImpl context1( | 100 test::GssContextMockImpl context1( |
| 101 "localhost", // Source name | 101 "localhost", // Source name |
| 102 "example.com", // Target name | 102 "example.com", // Target name |
| 103 23, // Lifetime | 103 23, // Lifetime |
| 104 *CHROME_GSS_C_NT_HOSTBASED_SERVICE, // Mechanism | 104 *CHROME_GSS_SPNEGO_MECH_OID_DESC, // Mechanism |
| 105 0, // Context flags | 105 0, // Context flags |
| 106 1, // Locally initiated | 106 1, // Locally initiated |
| 107 0); // Open | 107 0); // Open |
| 108 test::GssContextMockImpl context2( | 108 test::GssContextMockImpl context2( |
| 109 "localhost", // Source name | 109 "localhost", // Source name |
| 110 "example.com", // Target name | 110 "example.com", // Target name |
| 111 23, // Lifetime | 111 23, // Lifetime |
| 112 *CHROME_GSS_C_NT_HOSTBASED_SERVICE, // Mechanism | 112 *CHROME_GSS_SPNEGO_MECH_OID_DESC, // Mechanism |
| 113 0, // Context flags | 113 0, // Context flags |
| 114 1, // Locally initiated | 114 1, // Locally initiated |
| 115 1); // Open | 115 1); // Open |
| 116 test::MockGSSAPILibrary::SecurityContextQuery queries[] = { | 116 test::MockGSSAPILibrary::SecurityContextQuery queries[] = { |
| 117 test::MockGSSAPILibrary::SecurityContextQuery( | 117 test::MockGSSAPILibrary::SecurityContextQuery( |
| 118 "Negotiate", // Package name | 118 "Negotiate", // Package name |
| 119 GSS_S_CONTINUE_NEEDED, // Major response code | 119 GSS_S_CONTINUE_NEEDED, // Major response code |
| 120 0, // Minor response code | 120 0, // Minor response code |
| 121 context1, // Context | 121 context1, // Context |
| 122 NULL, // Expected input token | 122 NULL, // Expected input token |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 BoundNetLog(), | 359 BoundNetLog(), |
| 360 &generic_handler); | 360 &generic_handler); |
| 361 EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME, rv); | 361 EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME, rv); |
| 362 EXPECT_TRUE(generic_handler.get() == NULL); | 362 EXPECT_TRUE(generic_handler.get() == NULL); |
| 363 } | 363 } |
| 364 #endif // defined(DLOPEN_KERBEROS) | 364 #endif // defined(DLOPEN_KERBEROS) |
| 365 | 365 |
| 366 #endif // defined(OS_POSIX) | 366 #endif // defined(OS_POSIX) |
| 367 | 367 |
| 368 } // namespace net | 368 } // namespace net |
| OLD | NEW |