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
6
7namespace ccf::pal::snp
8{
9 static inline bool supports_sev_snp()
10 {
11 return ioctl6::supports_sev_snp();
12 }
13
14 static std::unique_ptr<AttestationInterface> get_attestation(
15 const PlatformAttestationReportData& report_data)
16 {
17 if (ioctl6::supports_sev_snp())
18 {
19 return std::make_unique<ioctl6::Attestation>(report_data);
20 }
21 throw std::logic_error("SEV-SNP not supported");
22 }
23
24 static std::unique_ptr<ioctl6::DerivedKey> make_derived_key(
25 const TcbVersionRaw version = {})
26 {
27 if (ioctl6::supports_sev_snp())
28 {
29 return std::make_unique<ioctl6::DerivedKey>(version);
30 }
31 throw std::logic_error("SEV-SNP Derived key not supported");
32 }
33};
Definition attestation_sev_snp.h:24