1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
dragonflydb-dragonfly/src/facade/tls_error.cc
Roy Jacobson ef0502238c
fix(tls): User friendly logging of OpenSSL errors (#1851)
* fix(tls): User friendly logging of OpenSSL errors

* Remove duplicate definition
2023-09-13 11:23:18 +03:00

25 lines
376 B
C++

#include "facade/tls_error.h"
#include <openssl/err.h>
#include <string_view>
#include "base/logging.h"
#ifdef DFLY_USE_SSL
void facade::PrintSSLError() {
ERR_print_errors_cb(
[](const char* str, size_t len, void* u) {
LOG(ERROR) << std::string_view(str, len);
return 1;
},
nullptr);
}
#else
void facade::PrintSSLError() {
}
#endif