chromium/net/ntlm/ntlm_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

// Tests on exact results from cryptographic operations are based on test data
// provided in [MS-NLMP] Version 28.0 [1] Section 4.2.
//
// Additional sanity checks on the low level hashing operations test for
// properties of the outputs, such as whether the hashes change, whether they
// should be zeroed out, or whether they should be the same or different.
//
// [1] https://msdn.microsoft.com/en-us/library/cc236621.aspx

#include "net/ntlm/ntlm.h"

#include <iterator>
#include <string>

#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "net/ntlm/ntlm_test_data.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace net::ntlm {

namespace {

AvPair MakeDomainAvPair() {}

AvPair MakeServerAvPair() {}

// Clear the least significant bit in each byte.
void ClearLsb(base::span<uint8_t> data) {}

}  // namespace

TEST(NtlmTest, MapHashToDesKeysAllOnes) {}

TEST(NtlmTest, MapHashToDesKeysAllZeros) {}

TEST(NtlmTest, MapHashToDesKeysAlternatingBits) {}

TEST(NtlmTest, GenerateNtlmHashV1PasswordSpecTests) {}

TEST(NtlmTest, GenerateNtlmHashV1PasswordChangesHash) {}

TEST(NtlmTest, GenerateResponsesV1SpecTests) {}

TEST(NtlmTest, GenerateResponsesV1WithSessionSecuritySpecTests) {}

TEST(NtlmTest, GenerateResponsesV1WithSessionSecurityClientChallengeUsed) {}

TEST(NtlmTest, GenerateResponsesV1WithSessionSecurityVerifySSUsed) {}

// ------------------------------------------------
// NTLM V2 specific tests.
// ------------------------------------------------

TEST(NtlmTest, GenerateNtlmHashV2SpecTests) {}

TEST(NtlmTest, GenerateProofInputV2SpecTests) {}

TEST(NtlmTest, GenerateNtlmProofV2SpecTests) {}

TEST(NtlmTest, GenerateSessionBaseKeyV2SpecTests) {}

TEST(NtlmTest, GenerateSessionBaseKeyWithClientTimestampV2SpecTests) {}

TEST(NtlmTest, GenerateChannelBindingHashV2SpecTests) {}

TEST(NtlmTest, GenerateMicV2Simple) {}

TEST(NtlmTest, GenerateMicSpecResponseV2) {}

TEST(NtlmTest, GenerateUpdatedTargetInfo) {}

TEST(NtlmTest, GenerateUpdatedTargetInfoNoEpaOrMic) {}

TEST(NtlmTest, GenerateUpdatedTargetInfoWithServerTimestamp) {}

TEST(NtlmTest, GenerateUpdatedTargetInfoWhenServerSendsNoTargetInfo) {}

TEST(NtlmTest, GenerateNtlmProofV2) {}

TEST(NtlmTest, GenerateNtlmProofWithClientTimestampV2) {}

}  // namespace net::ntlm