From b70c412587ae00ca66b38cf502d93db6345a6264 Mon Sep 17 00:00:00 2001 From: Frank Ueberschar Date: Mon, 4 Jun 2018 09:48:56 +0200 Subject: [PATCH] bsock: moved a variable to its scope --- core/src/lib/bsock.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/lib/bsock.cc b/core/src/lib/bsock.cc index b9c743efc9e..837146469b4 100644 --- a/core/src/lib/bsock.cc +++ b/core/src/lib/bsock.cc @@ -351,17 +351,16 @@ bool BareosSocket::two_way_authenticate(JobControlRecord *jcr, selected_local_tls = SelectTlsFromPolicy(tls_configuration, cram_md5_handshake.RemoteTlsPolicy()); if (selected_local_tls != nullptr) { - alist *verify_list = NULL; - if (selected_local_tls->GetVerifyPeer()) { - verify_list = selected_local_tls->GetVerifyList(); - } - if (initiated_by_remote) { std::shared_ptr tls_ctx = selected_local_tls->CreateServerContext( std::make_shared(identity, password.value)); if (jcr) { jcr->tls_ctx = tls_ctx; } + alist *verify_list = NULL; + if (selected_local_tls->GetVerifyPeer()) { + verify_list = selected_local_tls->GetVerifyList(); + } if (!BnetTlsServer(tls_ctx, this, verify_list)) { Jmsg(jcr, M_FATAL, 0, _("TLS negotiation failed.\n")); Dmsg0(debuglevel, "TLS negotiation failed.\n");