#include "OpenSSLHelpers.h" #include #include namespace DB { String getOpenSSLErrors() { BIO * mem = BIO_new(BIO_s_mem()); SCOPE_EXIT(BIO_free(mem)); ERR_print_errors(mem); char * buf = nullptr; long size = BIO_get_mem_data(mem, &buf); return String(buf, size); } }