CCF
Loading...
Searching...
No Matches
quote_info.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
4#pragma once
5#include "ccf/ds/json.h"
6
7#include <vector>
8
9namespace ccf
10{
11 enum class QuoteFormat
12 {
13 oe_sgx_v1 = 0,
16 };
17
20 {{QuoteFormat::oe_sgx_v1, "OE_SGX_v1"},
21 {QuoteFormat::insecure_virtual, "Insecure_Virtual"},
22 {QuoteFormat::amd_sev_snp_v1, "AMD_SEV_SNP_v1"}});
23
25 struct QuoteInfo
26 {
30 std::vector<uint8_t> quote;
32 std::vector<uint8_t> endorsements;
34 std::optional<std::vector<uint8_t>> uvm_endorsements;
36 std::optional<std::string> endorsed_tcb = std::nullopt;
37 };
38
40 DECLARE_JSON_REQUIRED_FIELDS(QuoteInfo, format, quote, endorsements);
41 DECLARE_JSON_OPTIONAL_FIELDS(QuoteInfo, uvm_endorsements, endorsed_tcb);
42}
#define DECLARE_JSON_REQUIRED_FIELDS(TYPE,...)
Definition json.h:714
#define DECLARE_JSON_TYPE_WITH_OPTIONAL_FIELDS(TYPE)
Definition json.h:690
#define DECLARE_JSON_OPTIONAL_FIELDS(TYPE,...)
Definition json.h:786
#define DECLARE_JSON_ENUM(TYPE,...)
Definition json.h:837
Definition app_interface.h:14
QuoteFormat
Definition quote_info.h:12
Describes a quote (attestation) from trusted hardware.
Definition quote_info.h:26
QuoteFormat format
Quote format.
Definition quote_info.h:28
std::optional< std::string > endorsed_tcb
Endorsed TCB (hex-encoded) (SNP-only)
Definition quote_info.h:36
std::optional< std::vector< uint8_t > > uvm_endorsements
UVM endorsements (SNP-only)
Definition quote_info.h:34
std::vector< uint8_t > quote
Enclave quote.
Definition quote_info.h:30
std::vector< uint8_t > endorsements
Quote endorsements.
Definition quote_info.h:32