Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bsock: moved a variable to its scope
  • Loading branch information
franku committed Jul 30, 2018
1 parent 4e3d35c commit b70c412
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/src/lib/bsock.cc
Expand Up @@ -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_CONTEXT> tls_ctx = selected_local_tls->CreateServerContext(
std::make_shared<PskCredentials>(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");
Expand Down

0 comments on commit b70c412

Please sign in to comment.