-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtpm_executor_tpm1_impl.h
36 lines (27 loc) · 1.07 KB
/
tpm_executor_tpm1_impl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef TPM2_SIMULATOR_TPM_EXECUTOR_TPM1_IMPL_H_
#define TPM2_SIMULATOR_TPM_EXECUTOR_TPM1_IMPL_H_
#include <memory>
#include <string>
#include <vector>
#include "tpm2-simulator/export.h"
#include "tpm2-simulator/tpm_executor.h"
#include "tpm2-simulator/tpm_vendor_cmd.h"
namespace tpm2_simulator {
class TPM2_SIMULATOR_EXPORT TpmExecutorTpm1Impl : public TpmExecutor {
public:
TpmExecutorTpm1Impl();
TpmExecutorTpm1Impl(const TpmExecutorTpm1Impl&) = delete;
TpmExecutorTpm1Impl& operator=(const TpmExecutorTpm1Impl&) = delete;
virtual ~TpmExecutorTpm1Impl() = default;
void InitializeVTPM() override;
size_t GetCommandSize(const std::string& command) override;
std::string RunCommand(const std::string& command) override;
bool IsTPM2() override { return false; }
private:
std::vector<std::unique_ptr<TpmVendorCommand>> vendor_commands_;
};
} // namespace tpm2_simulator
#endif // TPM2_SIMULATOR_TPM_EXECUTOR_TPM1_IMPL_H_