1 #pragma once 2 3 // With OpenSSL 1.1.0, some functions were deprecated. Need to abstract them 4 // to make the code backward compatible with older OpenSSL veresions. 5 // Reference: https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes 6 #if OPENSSL_VERSION_NUMBER < 0x10100000L 7 8 #include <openssl/evp.h> 9 10 #include <sdbusplus/bus.hpp> 11 12 extern "C" { 13 EVP_MD_CTX* EVP_MD_CTX_new(void); 14 void EVP_MD_CTX_free(EVP_MD_CTX* ctx); 15 } 16 17 namespace utils 18 { 19 20 /** 21 * @brief Gets the D-Bus Service name for the input D-Bus path 22 * 23 * @param[in] bus - Bus handler 24 * @param[in] path - Object Path 25 * @param[in] intf - Interface 26 * 27 * @return Service name 28 * @error InternalFailure exception thrown 29 */ 30 std::string getService(sdbusplus::bus::bus& bus, const std::string& path, 31 const std::string& intf); 32 33 /** @brief Suspend hiomapd. 34 * 35 * @param[in] bus - The D-Bus bus object. 36 */ 37 void hiomapdSuspend(sdbusplus::bus::bus& bus); 38 39 /** @brief Resume hiomapd. 40 * 41 * @param[in] bus - The D-Bus bus object. 42 */ 43 void hiomapdResume(sdbusplus::bus::bus& bus); 44 45 } // namespace utils 46 47 #endif // OPENSSL_VERSION_NUMBER < 0x10100000L 48