blob: cc5f7d477578d927ef72542344cad238b5c7e908 [file] [log] [blame]
// Copyright 2022 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 HWSEC_TEST_UTILS_OWNERSHIP_ID_OWNERSHIP_ID_TPM2_H_
#define HWSEC_TEST_UTILS_OWNERSHIP_ID_OWNERSHIP_ID_TPM2_H_
#include <memory>
#include <optional>
#include <string>
#include <tpm_manager/client/tpm_manager_utility.h>
#include "hwsec-test-utils/ownership_id/ownership_id.h"
namespace hwsec_test_utils {
class OwnershipIdTpm2 : public OwnershipId {
public:
OwnershipIdTpm2() = default;
virtual ~OwnershipIdTpm2() = default;
std::optional<std::string> Get() override;
private:
bool InitializeTpmManagerUtility();
std::unique_ptr<tpm_manager::TpmManagerUtility> tpm_manager_utility_;
};
} // namespace hwsec_test_utils
#endif // HWSEC_TEST_UTILS_OWNERSHIP_ID_OWNERSHIP_ID_TPM2_H_