17cbe2286STom Joseph #include "nlohmann/json.hpp" 25794fcf6SPatrick Venture 3*5c3b72c6SAyushi Smriti #include <ipmid/api.hpp> 4392050faSVernon Mauery 5*5c3b72c6SAyushi Smriti /** @brief this command is used to look up what authentication, integrity, 6*5c3b72c6SAyushi Smriti * confidentiality algorithms are supported. 77cbe2286STom Joseph * 8*5c3b72c6SAyushi Smriti * @ param ctx - context pointer 9*5c3b72c6SAyushi Smriti * @ param channelNumber - channel number 10*5c3b72c6SAyushi Smriti * @ param payloadType - payload type 11*5c3b72c6SAyushi Smriti * @ param listIndex - list index 12*5c3b72c6SAyushi Smriti * @ param algoSelectBit - list algorithms 137cbe2286STom Joseph * 14*5c3b72c6SAyushi Smriti * @returns ipmi completion code plus response data 15*5c3b72c6SAyushi Smriti * - rspChannel - channel number for authentication algorithm. 16*5c3b72c6SAyushi Smriti * - rspRecords - cipher suite records. 17*5c3b72c6SAyushi Smriti **/ 18*5c3b72c6SAyushi Smriti ipmi::RspType<uint8_t, // Channel Number 19*5c3b72c6SAyushi Smriti std::vector<uint8_t> // Cipher Records 20*5c3b72c6SAyushi Smriti > 21*5c3b72c6SAyushi Smriti getChannelCipherSuites(ipmi::Context::ptr ctx, uint4_t channelNumber, 22*5c3b72c6SAyushi Smriti uint4_t reserved1, uint8_t payloadType, 23*5c3b72c6SAyushi Smriti uint6_t listIndex, uint1_t reserved2, 24*5c3b72c6SAyushi Smriti uint1_t algoSelectBit); 257cbe2286STom Joseph 267cbe2286STom Joseph namespace cipher 277cbe2286STom Joseph { 287cbe2286STom Joseph 297cbe2286STom Joseph static constexpr auto listCipherSuite = 0x80; 307cbe2286STom Joseph 317cbe2286STom Joseph using Json = nlohmann::json; 320b02be92SPatrick Venture static constexpr auto configFile = "/usr/share/ipmi-providers/cipher_list.json"; 337cbe2286STom Joseph static constexpr auto cipher = "cipher"; 347cbe2286STom Joseph static constexpr auto stdCipherSuite = 0xC0; 357cbe2286STom Joseph static constexpr auto oemCipherSuite = 0xC1; 367cbe2286STom Joseph static constexpr auto oem = "oemiana"; 377cbe2286STom Joseph static constexpr auto auth = "authentication"; 387cbe2286STom Joseph static constexpr auto integrity = "integrity"; 397cbe2286STom Joseph static constexpr auto integrityTag = 0x40; 407cbe2286STom Joseph static constexpr auto conf = "confidentiality"; 417cbe2286STom Joseph static constexpr auto confTag = 0x80; 427cbe2286STom Joseph 437cbe2286STom Joseph } // namespace cipher 44