Trace OpenSSL error as const char*

Remove extent from char buffer for fetching OpenSSL errors.
TraceEvent::detail() interprets passed char[] as string literal
and prints trailing \0s.
This commit is contained in:
Junhyun Shim 2022-05-10 19:54:12 +02:00
parent e4d204daf0
commit ee9a047cbd
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ public:
0,
};
::ERR_error_string_n(err, buf, sizeof(buf));
te.detail("OpenSSLError", buf);
te.detail("OpenSSLError", static_cast<const char*>(buf));
}
throw tls_error();
}