CCF
Loading...
Searching...
No Matches
snp_ioctl.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
7
8namespace ccf::pal::snp
9{
10 static inline bool is_sev_snp()
11 {
12 return ioctl5::is_sev_snp() || ioctl6::is_sev_snp();
13 }
14
15 static std::unique_ptr<AttestationInterface> get_attestation(
16 const PlatformAttestationReportData& report_data)
17 {
18 if (ioctl5::is_sev_snp())
19 {
20 return std::make_unique<ioctl5::Attestation>(report_data);
21 }
22 else if (ioctl6::is_sev_snp())
23 {
24 return std::make_unique<ioctl6::Attestation>(report_data);
25 }
26 else
27 {
28 throw std::logic_error("SEV-SNP not supported");
29 }
30 }
31};
Definition attestation_sev_snp.h:16