#include "net/http/http_auth_gssapi_posix.h"
#include <memory>
#include "base/base_paths.h"
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/json/json_reader.h"
#include "base/native_library.h"
#include "base/path_service.h"
#include "net/base/net_errors.h"
#include "net/http/http_auth_challenge_tokenizer.h"
#include "net/http/mock_gssapi_library_posix.h"
#include "net/log/net_log_with_source.h"
#include "net/log/test_net_log.h"
#include "net/log/test_net_log_util.h"
#include "net/net_buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
void ClearBuffer(gss_buffer_t dest) { … }
void SetBuffer(gss_buffer_t dest, const void* src, size_t length) { … }
void CopyBuffer(gss_buffer_t dest, const gss_buffer_t src) { … }
const char kInitialAuthResponse[] = …;
void EstablishInitialContext(test::MockGSSAPILibrary* library) { … }
void UnexpectedCallback(int result) { … }
}
TEST(HttpAuthGSSAPIPOSIXTest, GSSAPIStartup) { … }
TEST(HttpAuthGSSAPIPOSIXTest, CustomLibraryMissing) { … }
TEST(HttpAuthGSSAPIPOSIXTest, CustomLibraryExists) { … }
TEST(HttpAuthGSSAPIPOSIXTest, CustomLibraryMethodsMissing) { … }
TEST(HttpAuthGSSAPIPOSIXTest, GSSAPICycle) { … }
TEST(HttpAuthGSSAPITest, ParseChallenge_FirstRound) { … }
TEST(HttpAuthGSSAPITest, ParseChallenge_TwoRounds) { … }
TEST(HttpAuthGSSAPITest, ParseChallenge_UnexpectedTokenFirstRound) { … }
TEST(HttpAuthGSSAPITest, ParseChallenge_MissingTokenSecondRound) { … }
TEST(HttpAuthGSSAPITest, ParseChallenge_NonBase64EncodedToken) { … }
TEST(HttpAuthGSSAPITest, OidToValue_NIL) { … }
TEST(HttpAuthGSSAPITest, OidToValue_Known) { … }
TEST(HttpAuthGSSAPITest, OidToValue_Unknown) { … }
TEST(HttpAuthGSSAPITest, GetGssStatusValue_NoLibrary) { … }
TEST(HttpAuthGSSAPITest, GetGssStatusValue_WithLibrary) { … }
TEST(HttpAuthGSSAPITest, GetGssStatusValue_Multiline) { … }
TEST(HttpAuthGSSAPITest, GetGssStatusValue_InfiniteLines) { … }
TEST(HttpAuthGSSAPITest, GetGssStatusValue_Failure) { … }
TEST(HttpAuthGSSAPITest, GetGssStatusValue_EmptyMessage) { … }
TEST(HttpAuthGSSAPITest, GetGssStatusValue_Misbehave) { … }
TEST(HttpAuthGSSAPITest, GetGssStatusValue_NotUtf8) { … }
TEST(HttpAuthGSSAPITest, GetContextStateAsValue_ValidContext) { … }
TEST(HttpAuthGSSAPITest, GetContextStateAsValue_NoContext) { … }
}