xref: /openbmc/bmcweb/features/redfish/include/generated/enums/certificate.hpp (revision e9cc1bc93c4ad9662c93e2a98d4c787e2dbf9f07)
10ec8b83dSEd Tanous #pragma once
20ec8b83dSEd Tanous #include <nlohmann/json.hpp>
30ec8b83dSEd Tanous 
40ec8b83dSEd Tanous namespace certificate
50ec8b83dSEd Tanous {
60ec8b83dSEd Tanous // clang-format off
70ec8b83dSEd Tanous 
80ec8b83dSEd Tanous enum class CertificateType{
90ec8b83dSEd Tanous     Invalid,
100ec8b83dSEd Tanous     PEM,
110ec8b83dSEd Tanous     PEMchain,
120ec8b83dSEd Tanous     PKCS7,
130ec8b83dSEd Tanous };
140ec8b83dSEd Tanous 
150ec8b83dSEd Tanous enum class KeyUsage{
160ec8b83dSEd Tanous     Invalid,
170ec8b83dSEd Tanous     DigitalSignature,
180ec8b83dSEd Tanous     NonRepudiation,
190ec8b83dSEd Tanous     KeyEncipherment,
200ec8b83dSEd Tanous     DataEncipherment,
210ec8b83dSEd Tanous     KeyAgreement,
220ec8b83dSEd Tanous     KeyCertSign,
230ec8b83dSEd Tanous     CRLSigning,
240ec8b83dSEd Tanous     EncipherOnly,
250ec8b83dSEd Tanous     DecipherOnly,
260ec8b83dSEd Tanous     ServerAuthentication,
270ec8b83dSEd Tanous     ClientAuthentication,
280ec8b83dSEd Tanous     CodeSigning,
290ec8b83dSEd Tanous     EmailProtection,
300ec8b83dSEd Tanous     Timestamping,
310ec8b83dSEd Tanous     OCSPSigning,
320ec8b83dSEd Tanous };
330ec8b83dSEd Tanous 
340ec8b83dSEd Tanous enum class CertificateUsageType{
350ec8b83dSEd Tanous     Invalid,
360ec8b83dSEd Tanous     User,
370ec8b83dSEd Tanous     Web,
380ec8b83dSEd Tanous     SSH,
390ec8b83dSEd Tanous     Device,
400ec8b83dSEd Tanous     Platform,
410ec8b83dSEd Tanous     BIOS,
42*e9cc1bc9SEd Tanous     IDevID,
43*e9cc1bc9SEd Tanous     LDevID,
44*e9cc1bc9SEd Tanous     IAK,
45*e9cc1bc9SEd Tanous     LAK,
460ec8b83dSEd Tanous };
470ec8b83dSEd Tanous 
480ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(CertificateType, {
490ec8b83dSEd Tanous     {CertificateType::Invalid, "Invalid"},
500ec8b83dSEd Tanous     {CertificateType::PEM, "PEM"},
510ec8b83dSEd Tanous     {CertificateType::PEMchain, "PEMchain"},
520ec8b83dSEd Tanous     {CertificateType::PKCS7, "PKCS7"},
530ec8b83dSEd Tanous });
540ec8b83dSEd Tanous 
550ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(KeyUsage, {
560ec8b83dSEd Tanous     {KeyUsage::Invalid, "Invalid"},
570ec8b83dSEd Tanous     {KeyUsage::DigitalSignature, "DigitalSignature"},
580ec8b83dSEd Tanous     {KeyUsage::NonRepudiation, "NonRepudiation"},
590ec8b83dSEd Tanous     {KeyUsage::KeyEncipherment, "KeyEncipherment"},
600ec8b83dSEd Tanous     {KeyUsage::DataEncipherment, "DataEncipherment"},
610ec8b83dSEd Tanous     {KeyUsage::KeyAgreement, "KeyAgreement"},
620ec8b83dSEd Tanous     {KeyUsage::KeyCertSign, "KeyCertSign"},
630ec8b83dSEd Tanous     {KeyUsage::CRLSigning, "CRLSigning"},
640ec8b83dSEd Tanous     {KeyUsage::EncipherOnly, "EncipherOnly"},
650ec8b83dSEd Tanous     {KeyUsage::DecipherOnly, "DecipherOnly"},
660ec8b83dSEd Tanous     {KeyUsage::ServerAuthentication, "ServerAuthentication"},
670ec8b83dSEd Tanous     {KeyUsage::ClientAuthentication, "ClientAuthentication"},
680ec8b83dSEd Tanous     {KeyUsage::CodeSigning, "CodeSigning"},
690ec8b83dSEd Tanous     {KeyUsage::EmailProtection, "EmailProtection"},
700ec8b83dSEd Tanous     {KeyUsage::Timestamping, "Timestamping"},
710ec8b83dSEd Tanous     {KeyUsage::OCSPSigning, "OCSPSigning"},
720ec8b83dSEd Tanous });
730ec8b83dSEd Tanous 
740ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(CertificateUsageType, {
750ec8b83dSEd Tanous     {CertificateUsageType::Invalid, "Invalid"},
760ec8b83dSEd Tanous     {CertificateUsageType::User, "User"},
770ec8b83dSEd Tanous     {CertificateUsageType::Web, "Web"},
780ec8b83dSEd Tanous     {CertificateUsageType::SSH, "SSH"},
790ec8b83dSEd Tanous     {CertificateUsageType::Device, "Device"},
800ec8b83dSEd Tanous     {CertificateUsageType::Platform, "Platform"},
810ec8b83dSEd Tanous     {CertificateUsageType::BIOS, "BIOS"},
82*e9cc1bc9SEd Tanous     {CertificateUsageType::IDevID, "IDevID"},
83*e9cc1bc9SEd Tanous     {CertificateUsageType::LDevID, "LDevID"},
84*e9cc1bc9SEd Tanous     {CertificateUsageType::IAK, "IAK"},
85*e9cc1bc9SEd Tanous     {CertificateUsageType::LAK, "LAK"},
860ec8b83dSEd Tanous });
870ec8b83dSEd Tanous 
880ec8b83dSEd Tanous }
890ec8b83dSEd Tanous // clang-format on
90