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

#ifndef TRUNKS_MOCK_TPM_UTILITY_H_
#define TRUNKS_MOCK_TPM_UTILITY_H_

#include <map>
#include <string>
#include <vector>

#include <gmock/gmock.h>

#include "trunks/tpm_utility.h"

namespace trunks {

class MockTpmUtility : public TpmUtility {
 public:
  MockTpmUtility();
  ~MockTpmUtility() override;

  MOCK_METHOD0(Startup, TPM_RC());
  MOCK_METHOD0(Clear, TPM_RC());
  MOCK_METHOD0(Shutdown, void());
  MOCK_METHOD0(InitializeTpm, TPM_RC());
  MOCK_METHOD0(CheckState, TPM_RC());
  MOCK_METHOD1(AllocatePCR, TPM_RC(const std::string&));
  MOCK_METHOD0(PrepareForPinWeaver, TPM_RC());
  MOCK_METHOD0(PrepareForOwnership, TPM_RC());
  MOCK_METHOD3(TakeOwnership,
               TPM_RC(const std::string&,
                      const std::string&,
                      const std::string&));
  MOCK_METHOD2(StirRandom, TPM_RC(const std::string&, AuthorizationDelegate*));
  MOCK_METHOD3(GenerateRandom,
               TPM_RC(size_t, AuthorizationDelegate*, std::string*));
  MOCK_METHOD1(GetAlertsData, TPM_RC(TpmAlertsData*));
  MOCK_METHOD3(ExtendPCR,
               TPM_RC(int, const std::string&, AuthorizationDelegate*));
  MOCK_METHOD2(ExtendPCRForCSME, TPM_RC(int, const std::string&));
  MOCK_METHOD2(ReadPCR, TPM_RC(int, std::string*));
  MOCK_METHOD2(ReadPCRFromCSME, TPM_RC(int, std::string*));
  MOCK_METHOD6(AsymmetricEncrypt,
               TPM_RC(TPM_HANDLE,
                      TPM_ALG_ID,
                      TPM_ALG_ID,
                      const std::string&,
                      AuthorizationDelegate*,
                      std::string*));
  MOCK_METHOD6(AsymmetricDecrypt,
               TPM_RC(TPM_HANDLE,
                      TPM_ALG_ID,
                      TPM_ALG_ID,
                      const std::string&,
                      AuthorizationDelegate*,
                      std::string*));
  MOCK_METHOD4(ECDHZGen,
               TPM_RC(TPM_HANDLE,
                      const TPM2B_ECC_POINT&,
                      AuthorizationDelegate*,
                      TPM2B_ECC_POINT*));
  MOCK_METHOD7(RawSign,
               TPM_RC(TPM_HANDLE,
                      TPM_ALG_ID,
                      TPM_ALG_ID,
                      const std::string&,
                      bool,
                      AuthorizationDelegate*,
                      TPMT_SIGNATURE*));
  MOCK_METHOD7(Sign,
               TPM_RC(TPM_HANDLE,
                      TPM_ALG_ID,
                      TPM_ALG_ID,
                      const std::string&,
                      bool,
                      AuthorizationDelegate*,
                      std::string*));
  MOCK_METHOD7(Verify,
               TPM_RC(TPM_HANDLE,
                      TPM_ALG_ID,
                      TPM_ALG_ID,
                      const std::string&,
                      bool,
                      const std::string&,
                      AuthorizationDelegate*));
  MOCK_METHOD2(CertifyCreation, TPM_RC(TPM_HANDLE, const std::string&));
  MOCK_METHOD4(ChangeKeyAuthorizationData,
               TPM_RC(TPM_HANDLE,
                      const std::string&,
                      AuthorizationDelegate*,
                      std::string*));
  MOCK_METHOD7(ImportRSAKey,
               TPM_RC(AsymmetricKeyUsage,
                      const std::string&,
                      uint32_t,
                      const std::string&,
                      const std::string&,
                      AuthorizationDelegate*,
                      std::string*));
  MOCK_METHOD8(ImportECCKey,
               TPM_RC(AsymmetricKeyUsage,
                      TPMI_ECC_CURVE,
                      const std::string&,
                      const std::string&,
                      const std::string&,
                      const std::string&,
                      AuthorizationDelegate*,
                      std::string*));
  MOCK_METHOD10(CreateRSAKeyPair,
                TPM_RC(AsymmetricKeyUsage,
                       int,
                       uint32_t,
                       const std::string&,
                       const std::string&,
                       bool,
                       const std::vector<uint32_t>&,
                       AuthorizationDelegate*,
                       std::string*,
                       std::string*));
  MOCK_METHOD9(CreateECCKeyPair,
               TPM_RC(AsymmetricKeyUsage,
                      TPMI_ECC_CURVE,
                      const std::string&,
                      const std::string&,
                      bool,
                      const std::vector<uint32_t>&,
                      AuthorizationDelegate*,
                      std::string*,
                      std::string*));
  MOCK_METHOD9(CreateRestrictedECCKeyPair,
               TPM_RC(AsymmetricKeyUsage,
                      TPMI_ECC_CURVE,
                      const std::string&,
                      const std::string&,
                      bool,
                      const std::vector<uint32_t>&,
                      AuthorizationDelegate*,
                      std::string*,
                      std::string*));
  MOCK_METHOD3(LoadKey,
               TPM_RC(const std::string&, AuthorizationDelegate*, TPM_HANDLE*));
  MOCK_METHOD7(LoadRSAPublicKey,
               TPM_RC(AsymmetricKeyUsage,
                      TPM_ALG_ID,
                      TPM_ALG_ID,
                      const std::string&,
                      uint32_t,
                      AuthorizationDelegate*,
                      TPM_HANDLE*));
  MOCK_METHOD8(LoadECPublicKey,
               TPM_RC(AsymmetricKeyUsage,
                      TPM_ECC_CURVE,
                      TPM_ALG_ID,
                      TPM_ALG_ID,
                      const std::string&,
                      const std::string&,
                      AuthorizationDelegate*,
                      TPM_HANDLE*));
  MOCK_METHOD2(GetKeyName, TPM_RC(TPM_HANDLE, std::string*));
  MOCK_METHOD2(GetKeyPublicArea, TPM_RC(TPM_HANDLE, TPMT_PUBLIC*));
  MOCK_METHOD6(SealData,
               TPM_RC(const std::string&,
                      const std::string&,
                      const std::string&,
                      bool,
                      AuthorizationDelegate*,
                      std::string*));
  MOCK_METHOD3(UnsealData,
               TPM_RC(const std::string&,
                      AuthorizationDelegate*,
                      std::string*));
  MOCK_METHOD3(UnsealDataWithHandle,
               TPM_RC(TPM_HANDLE object_handle,
                      AuthorizationDelegate*,
                      std::string*));
  MOCK_METHOD1(StartSession, TPM_RC(HmacSession*));
  MOCK_METHOD3(AddPcrValuesToPolicySession,
               TPM_RC(const std::map<uint32_t, std::string>&,
                      bool,
                      PolicySession*));
  MOCK_METHOD3(GetPolicyDigestForPcrValues,
               TPM_RC(const std::map<uint32_t, std::string>&,
                      bool,
                      std::string*));
  MOCK_METHOD6(DefineNVSpace,
               TPM_RC(uint32_t,
                      size_t,
                      TPMA_NV,
                      const std::string&,
                      const std::string&,
                      AuthorizationDelegate*));
  MOCK_METHOD2(DestroyNVSpace, TPM_RC(uint32_t, AuthorizationDelegate*));
  MOCK_METHOD5(LockNVSpace,
               TPM_RC(uint32_t, bool, bool, bool, AuthorizationDelegate*));
  MOCK_METHOD6(WriteNVSpace,
               TPM_RC(uint32_t,
                      uint32_t,
                      const std::string&,
                      bool,
                      bool,
                      AuthorizationDelegate*));
  MOCK_METHOD3(IncrementNVCounter,
               TPM_RC(uint32_t, bool, AuthorizationDelegate*));
  MOCK_METHOD6(ReadNVSpace,
               TPM_RC(uint32_t,
                      uint32_t,
                      size_t,
                      bool,
                      std::string*,
                      AuthorizationDelegate*));
  MOCK_METHOD2(GetNVSpaceName, TPM_RC(uint32_t, std::string*));
  MOCK_METHOD2(GetNVSpacePublicArea, TPM_RC(uint32_t, TPMS_NV_PUBLIC*));
  MOCK_METHOD1(ListNVSpaces, TPM_RC(std::vector<uint32_t>*));
  MOCK_METHOD4(SetDictionaryAttackParameters,
               TPM_RC(uint32_t, uint32_t, uint32_t, AuthorizationDelegate*));
  MOCK_METHOD1(ResetDictionaryAttackLock, TPM_RC(AuthorizationDelegate*));
  MOCK_METHOD4(GetEndorsementKey,
               TPM_RC(TPM_ALG_ID,
                      AuthorizationDelegate*,
                      AuthorizationDelegate*,
                      TPM_HANDLE*));
  MOCK_METHOD3(CreateIdentityKey,
               TPM_RC(TPM_ALG_ID, AuthorizationDelegate*, std::string*));
  MOCK_METHOD0(DeclareTpmFirmwareStable, TPM_RC());
  MOCK_METHOD1(GetPublicRSAEndorsementKeyModulus, TPM_RC(std::string*));
  MOCK_METHOD1(ManageCCDPwd, TPM_RC(bool));
  MOCK_METHOD2(PinWeaverIsSupported, TPM_RC(uint8_t, uint8_t*));
  MOCK_METHOD5(PinWeaverResetTree,
               TPM_RC(uint8_t, uint8_t, uint8_t, uint32_t*, std::string*));
  // No MOCK_METHOD11 (max is 10).
  TPM_RC PinWeaverInsertLeaf(uint8_t protocol_version,
                             uint64_t label,
                             const std::string& h_aux,
                             const brillo::SecureBlob& le_secret,
                             const brillo::SecureBlob& he_secret,
                             const brillo::SecureBlob& reset_secret,
                             const std::map<uint32_t, uint32_t>& delay_schedule,
                             const ValidPcrCriteria& valid_pcr_criteria,
                             uint32_t* result_code,
                             std::string* root_hash,
                             std::string* cred_metadata,
                             std::string* mac) override;
  MOCK_METHOD6(PinWeaverRemoveLeaf,
               TPM_RC(uint8_t,
                      uint64_t,
                      const std::string&,
                      const std::string&,
                      uint32_t*,
                      std::string*));
  TPM_RC PinWeaverTryAuth(uint8_t protocol_version,
                          const brillo::SecureBlob& le_secret,
                          const std::string& h_aux,
                          const std::string& cred_metadata,
                          uint32_t* result_code,
                          std::string* root_hash,
                          uint32_t* seconds_to_wait,
                          brillo::SecureBlob* he_secret,
                          brillo::SecureBlob* reset_secret,
                          std::string* cred_metadata_out,
                          std::string* mac_out) override;
  MOCK_METHOD9(PinWeaverResetAuth,
               TPM_RC(uint8_t,
                      const brillo::SecureBlob&,
                      const std::string&,
                      const std::string&,
                      uint32_t*,
                      std::string*,
                      brillo::SecureBlob*,
                      std::string*,
                      std::string*));
  MOCK_METHOD5(PinWeaverGetLog,
               TPM_RC(uint8_t,
                      const std::string&,
                      uint32_t*,
                      std::string*,
                      std::vector<trunks::PinWeaverLogEntry>*));
  MOCK_METHOD8(PinWeaverLogReplay,
               TPM_RC(uint8_t,
                      const std::string&,
                      const std::string&,
                      const std::string&,
                      uint32_t*,
                      std::string*,
                      std::string*,
                      std::string*));
  MOCK_METHOD1(GetRsuDeviceId, TPM_RC(std::string*));
  MOCK_METHOD1(GetRoVerificationStatus, TPM_RC(ApRoStatus*));
  MOCK_METHOD(bool, IsCr50, (), (override));
};

}  // namespace trunks

#endif  // TRUNKS_MOCK_TPM_UTILITY_H_
