1 #include "nlohmann/json.hpp"
2 
3 #include <ipmid/api.hpp>
4 
5 /** @brief this command is used to look up what authentication, integrity,
6  *  confidentiality algorithms are supported.
7  *
8  *  @ param ctx - context pointer
9  *  @ param channelNumber - channel number
10  *  @ param payloadType - payload type
11  *  @ param listIndex - list index
12  *  @ param algoSelectBit - list algorithms
13  *
14  *  @returns ipmi completion code plus response data
15  *  - rspChannel - channel number for authentication algorithm.
16  *  - rspRecords - cipher suite records.
17  **/
18 ipmi::RspType<uint8_t,             // Channel Number
19               std::vector<uint8_t> // Cipher Records
20               >
21     getChannelCipherSuites(ipmi::Context::ptr ctx, uint4_t channelNumber,
22                            uint4_t reserved1, uint8_t payloadType,
23                            uint6_t listIndex, uint1_t reserved2,
24                            uint1_t algoSelectBit);
25 
26 namespace cipher
27 {
28 
29 static constexpr auto listCipherSuite = 0x80;
30 
31 using Json = nlohmann::json;
32 static constexpr auto configFile = "/usr/share/ipmi-providers/cipher_list.json";
33 static constexpr auto cipher = "cipher";
34 static constexpr auto stdCipherSuite = 0xC0;
35 static constexpr auto oemCipherSuite = 0xC1;
36 static constexpr auto oem = "oemiana";
37 static constexpr auto auth = "authentication";
38 static constexpr auto integrity = "integrity";
39 static constexpr auto integrityTag = 0x40;
40 static constexpr auto conf = "confidentiality";
41 static constexpr auto confTag = 0x80;
42 
43 } // namespace cipher
44