| 10 | namespace snap::utils::crypto { |
| 11 | |
| 12 | void logCryptoErrors() { |
| 13 | #ifdef NDEBUG |
| 14 | while (ERR_get_error() != 0u) { |
| 15 | } |
| 16 | #else |
| 17 | while (uint32_t error = ERR_get_error()) { |
| 18 | std::array<char, 120> buf; |
| 19 | ERR_error_string_n(error, buf.data(), buf.size()); |
| 20 | SCLOGE("[utils][CryptoHelpers]", "OpenSSL error: {}", buf.data()); |
| 21 | } |
| 22 | #endif |
| 23 | } |
| 24 | |
| 25 | } // namespace snap::utils::crypto |
no test coverage detected