xref: /openbmc/bmcweb/features/redfish/include/generated/enums/key.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3853c0dc5SEd Tanous #pragma once
4853c0dc5SEd Tanous #include <nlohmann/json.hpp>
5853c0dc5SEd Tanous 
6853c0dc5SEd Tanous namespace key
7853c0dc5SEd Tanous {
8853c0dc5SEd Tanous // clang-format off
9853c0dc5SEd Tanous 
102ae81db9SGunnar Mills enum class SSHKeyType{
112ae81db9SGunnar Mills     Invalid,
122ae81db9SGunnar Mills     RSA,
132ae81db9SGunnar Mills     DSA,
142ae81db9SGunnar Mills     ECDSA,
152ae81db9SGunnar Mills     Ed25519,
162ae81db9SGunnar Mills };
172ae81db9SGunnar Mills 
182ae81db9SGunnar Mills enum class ECDSACurveType{
192ae81db9SGunnar Mills     Invalid,
202ae81db9SGunnar Mills     NISTP256,
212ae81db9SGunnar Mills     NISTP384,
222ae81db9SGunnar Mills     NISTP521,
232ae81db9SGunnar Mills     NISTK163,
242ae81db9SGunnar Mills     NISTP192,
252ae81db9SGunnar Mills     NISTP224,
262ae81db9SGunnar Mills     NISTK233,
272ae81db9SGunnar Mills     NISTB233,
282ae81db9SGunnar Mills     NISTK283,
292ae81db9SGunnar Mills     NISTK409,
302ae81db9SGunnar Mills     NISTB409,
312ae81db9SGunnar Mills     NISTT571,
322ae81db9SGunnar Mills };
332ae81db9SGunnar Mills 
34853c0dc5SEd Tanous enum class KeyType{
35853c0dc5SEd Tanous     Invalid,
36853c0dc5SEd Tanous     NVMeoF,
37853c0dc5SEd Tanous     SSH,
38853c0dc5SEd Tanous };
39853c0dc5SEd Tanous 
40853c0dc5SEd Tanous enum class NVMeoFSecurityProtocolType{
41853c0dc5SEd Tanous     Invalid,
42853c0dc5SEd Tanous     DHHC,
43853c0dc5SEd Tanous     TLS_PSK,
44853c0dc5SEd Tanous     OEM,
45853c0dc5SEd Tanous };
46853c0dc5SEd Tanous 
47853c0dc5SEd Tanous enum class NVMeoFSecureHashType{
48853c0dc5SEd Tanous     Invalid,
49853c0dc5SEd Tanous     SHA256,
50853c0dc5SEd Tanous     SHA384,
51853c0dc5SEd Tanous     SHA512,
52853c0dc5SEd Tanous };
53853c0dc5SEd Tanous 
542ae81db9SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(SSHKeyType, {
552ae81db9SGunnar Mills     {SSHKeyType::Invalid, "Invalid"},
562ae81db9SGunnar Mills     {SSHKeyType::RSA, "RSA"},
572ae81db9SGunnar Mills     {SSHKeyType::DSA, "DSA"},
582ae81db9SGunnar Mills     {SSHKeyType::ECDSA, "ECDSA"},
592ae81db9SGunnar Mills     {SSHKeyType::Ed25519, "Ed25519"},
602ae81db9SGunnar Mills });
612ae81db9SGunnar Mills 
622ae81db9SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(ECDSACurveType, {
632ae81db9SGunnar Mills     {ECDSACurveType::Invalid, "Invalid"},
642ae81db9SGunnar Mills     {ECDSACurveType::NISTP256, "NISTP256"},
652ae81db9SGunnar Mills     {ECDSACurveType::NISTP384, "NISTP384"},
662ae81db9SGunnar Mills     {ECDSACurveType::NISTP521, "NISTP521"},
672ae81db9SGunnar Mills     {ECDSACurveType::NISTK163, "NISTK163"},
682ae81db9SGunnar Mills     {ECDSACurveType::NISTP192, "NISTP192"},
692ae81db9SGunnar Mills     {ECDSACurveType::NISTP224, "NISTP224"},
702ae81db9SGunnar Mills     {ECDSACurveType::NISTK233, "NISTK233"},
712ae81db9SGunnar Mills     {ECDSACurveType::NISTB233, "NISTB233"},
722ae81db9SGunnar Mills     {ECDSACurveType::NISTK283, "NISTK283"},
732ae81db9SGunnar Mills     {ECDSACurveType::NISTK409, "NISTK409"},
742ae81db9SGunnar Mills     {ECDSACurveType::NISTB409, "NISTB409"},
752ae81db9SGunnar Mills     {ECDSACurveType::NISTT571, "NISTT571"},
762ae81db9SGunnar Mills });
772ae81db9SGunnar Mills 
78853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(KeyType, {
79853c0dc5SEd Tanous     {KeyType::Invalid, "Invalid"},
80853c0dc5SEd Tanous     {KeyType::NVMeoF, "NVMeoF"},
81853c0dc5SEd Tanous     {KeyType::SSH, "SSH"},
82853c0dc5SEd Tanous });
83853c0dc5SEd Tanous 
84853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFSecurityProtocolType, {
85853c0dc5SEd Tanous     {NVMeoFSecurityProtocolType::Invalid, "Invalid"},
86853c0dc5SEd Tanous     {NVMeoFSecurityProtocolType::DHHC, "DHHC"},
87853c0dc5SEd Tanous     {NVMeoFSecurityProtocolType::TLS_PSK, "TLS_PSK"},
88853c0dc5SEd Tanous     {NVMeoFSecurityProtocolType::OEM, "OEM"},
89853c0dc5SEd Tanous });
90853c0dc5SEd Tanous 
91853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFSecureHashType, {
92853c0dc5SEd Tanous     {NVMeoFSecureHashType::Invalid, "Invalid"},
93853c0dc5SEd Tanous     {NVMeoFSecureHashType::SHA256, "SHA256"},
94853c0dc5SEd Tanous     {NVMeoFSecureHashType::SHA384, "SHA384"},
95853c0dc5SEd Tanous     {NVMeoFSecureHashType::SHA512, "SHA512"},
96853c0dc5SEd Tanous });
97853c0dc5SEd Tanous 
98853c0dc5SEd Tanous }
99853c0dc5SEd Tanous // clang-format on
100