summaryrefslogtreecommitdiff
path: root/redfish-core/include/generated/enums/component_integrity.hpp
blob: 88e4579a2cd5e651feba0139141025a3af0314ae (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include <nlohmann/json.hpp>

namespace component_integrity
{
// clang-format off

enum class ComponentIntegrityType{
    Invalid,
    SPDM,
    TPM,
    TCM,
    TPCM,
    OEM,
};

enum class MeasurementSpecification{
    Invalid,
    DMTF,
};

enum class SPDMmeasurementSummaryType{
    Invalid,
    TCB,
    All,
};

enum class DMTFmeasurementTypes{
    Invalid,
    ImmutableROM,
    MutableFirmware,
    HardwareConfiguration,
    FirmwareConfiguration,
    MutableFirmwareVersion,
    MutableFirmwareSecurityVersionNumber,
    MeasurementManifest,
    DebugAndDeviceMode,
    HashExtendMeasurement,
    Informational,
    StructuredMeasurementManifest,
};

enum class VerificationStatus{
    Invalid,
    Success,
    Failed,
};

enum class SecureSessionType{
    Invalid,
    Plain,
    EncryptedAuthenticated,
    AuthenticatedOnly,
};

NLOHMANN_JSON_SERIALIZE_ENUM(ComponentIntegrityType, {
    {ComponentIntegrityType::Invalid, "Invalid"},
    {ComponentIntegrityType::SPDM, "SPDM"},
    {ComponentIntegrityType::TPM, "TPM"},
    {ComponentIntegrityType::TCM, "TCM"},
    {ComponentIntegrityType::TPCM, "TPCM"},
    {ComponentIntegrityType::OEM, "OEM"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(MeasurementSpecification, {
    {MeasurementSpecification::Invalid, "Invalid"},
    {MeasurementSpecification::DMTF, "DMTF"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(SPDMmeasurementSummaryType, {
    {SPDMmeasurementSummaryType::Invalid, "Invalid"},
    {SPDMmeasurementSummaryType::TCB, "TCB"},
    {SPDMmeasurementSummaryType::All, "All"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(DMTFmeasurementTypes, {
    {DMTFmeasurementTypes::Invalid, "Invalid"},
    {DMTFmeasurementTypes::ImmutableROM, "ImmutableROM"},
    {DMTFmeasurementTypes::MutableFirmware, "MutableFirmware"},
    {DMTFmeasurementTypes::HardwareConfiguration, "HardwareConfiguration"},
    {DMTFmeasurementTypes::FirmwareConfiguration, "FirmwareConfiguration"},
    {DMTFmeasurementTypes::MutableFirmwareVersion, "MutableFirmwareVersion"},
    {DMTFmeasurementTypes::MutableFirmwareSecurityVersionNumber, "MutableFirmwareSecurityVersionNumber"},
    {DMTFmeasurementTypes::MeasurementManifest, "MeasurementManifest"},
    {DMTFmeasurementTypes::DebugAndDeviceMode, "DebugAndDeviceMode"},
    {DMTFmeasurementTypes::HashExtendMeasurement, "HashExtendMeasurement"},
    {DMTFmeasurementTypes::Informational, "Informational"},
    {DMTFmeasurementTypes::StructuredMeasurementManifest, "StructuredMeasurementManifest"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(VerificationStatus, {
    {VerificationStatus::Invalid, "Invalid"},
    {VerificationStatus::Success, "Success"},
    {VerificationStatus::Failed, "Failed"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(SecureSessionType, {
    {SecureSessionType::Invalid, "Invalid"},
    {SecureSessionType::Plain, "Plain"},
    {SecureSessionType::EncryptedAuthenticated, "EncryptedAuthenticated"},
    {SecureSessionType::AuthenticatedOnly, "AuthenticatedOnly"},
});

// clang-format on
} // namespace component_integrity