mirror of https://github.com/Icinga/icinga2.git
fixup errbuf length in the other files and avoid using the static buffer in one place (for thread safety and code consistency reasons)
This commit is contained in:
parent
e75f063552
commit
4c86c370bb
|
@ -61,7 +61,7 @@ TlsStream::TlsStream(const Socket::Ptr& socket, const String& hostname, Connecti
|
|||
m_CurrentAction(TlsActionNone), m_Retry(false), m_Shutdown(false)
|
||||
{
|
||||
std::ostringstream msgbuf;
|
||||
char errbuf[120];
|
||||
char errbuf[256];
|
||||
|
||||
m_SSL = std::shared_ptr<SSL>(SSL_new(sslContext), SSL_free);
|
||||
|
||||
|
@ -272,8 +272,9 @@ void TlsStream::OnEvent(int revents)
|
|||
m_ErrorOccurred = true;
|
||||
|
||||
if (m_ErrorCode != 0) {
|
||||
char errbuf[256];
|
||||
Log(LogWarning, "TlsStream")
|
||||
<< "OpenSSL error: " << ERR_error_string(m_ErrorCode, nullptr);
|
||||
<< "OpenSSL error: " << ERR_error_string(m_ErrorCode, errbuf);
|
||||
} else {
|
||||
Log(LogWarning, "TlsStream", "TLS stream was disconnected.");
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ int PkiUtility::NewCert(const String& cn, const String& keyfile, const String& c
|
|||
|
||||
int PkiUtility::SignCsr(const String& csrfile, const String& certfile)
|
||||
{
|
||||
char errbuf[120];
|
||||
char errbuf[256];
|
||||
|
||||
InitializeOpenSSL();
|
||||
|
||||
|
|
Loading…
Reference in New Issue