diff --git a/core/src/dird/fd_cmds.cc b/core/src/dird/fd_cmds.cc index 9bdff05f811..1813cc702b4 100644 --- a/core/src/dird/fd_cmds.cc +++ b/core/src/dird/fd_cmds.cc @@ -183,6 +183,7 @@ static void SendInfoChosenCipher(JobControlRecord *jcr, UaContext *ua) { std::string str; jcr->file_bsock->GetCipherMessageString(str); + str += '\n'; if (jcr->JobId != 0) { Jmsg(jcr, M_INFO, 0, str.c_str()); } diff --git a/core/src/lib/bsock.cc b/core/src/lib/bsock.cc index f180b989bdd..65491854ea1 100644 --- a/core/src/lib/bsock.cc +++ b/core/src/lib/bsock.cc @@ -623,10 +623,9 @@ void BareosSocket::GetCipherMessageString(std::string &str) const std::string m; m = " Encryption: "; m += tls_conn->TlsCipherGetName(); - m += "\n"; str = m; } else { - str = " Encryption: None\n"; + str = " Encryption: None"; } } @@ -634,6 +633,7 @@ void BareosSocket::OutputCipherMessageString(std::function o { std::string str; GetCipherMessageString(str); + str += '\n'; output_cb(str.c_str()); } diff --git a/core/src/tests/bsock_test_connection_setup.cc b/core/src/tests/bsock_test_connection_setup.cc index 1479a11d085..9da9cb4dea0 100644 --- a/core/src/tests/bsock_test_connection_setup.cc +++ b/core/src/tests/bsock_test_connection_setup.cc @@ -145,6 +145,7 @@ static void CheckEncryption(const BareosSocket *UA_sock, EXPECT_TRUE(UA_sock->tls_conn.get()); std::string cipher; UA_sock->GetCipherMessageString(cipher); + cipher += '\n'; std::cout << cipher; } }