Skip to content

Commit

Permalink
core: PR review fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Aug 26, 2020
1 parent a43d122 commit 55da82c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/lib/tls.h
Expand Up @@ -72,7 +72,7 @@ class Tls {
virtual std::string TlsCipherGetName() const { return std::string(); }

virtual void SetCipherList(const std::string& cipherlist) = 0;
virtual void SetProtocol(std::string version) = 0;
virtual void SetProtocol(const std::string& version) = 0;

virtual void Setca_certfile_(const std::string& ca_certfile) = 0;
virtual void SetCaCertdir(const std::string& ca_certdir) = 0;
Expand Down
3 changes: 2 additions & 1 deletion core/src/lib/tls_openssl.cc
Expand Up @@ -27,6 +27,7 @@

#include <assert.h>
#include "include/bareos.h"
#include "include/make_unique.h"
#include "lib/bpoll.h"
#include "lib/crypto_openssl.h"

Expand All @@ -47,7 +48,7 @@

#include "parse_conf.h"

TlsOpenSsl::TlsOpenSsl() : d_(new TlsOpenSslPrivate) {}
TlsOpenSsl::TlsOpenSsl() : d_(std::make_unique<TlsOpenSslPrivate>()) {}

TlsOpenSsl::~TlsOpenSsl() = default;

Expand Down
2 changes: 1 addition & 1 deletion core/src/lib/tls_openssl.h
Expand Up @@ -50,7 +50,7 @@ class TlsOpenSsl : public Tls {

std::string TlsCipherGetName() const override;
void SetCipherList(const std::string& cipherlist) override;
void SetProtocol(std::string protocol) override;
void SetProtocol(const std::string& protocol) override;
void TlsLogConninfo(JobControlRecord* jcr,
const char* host,
int port,
Expand Down
2 changes: 1 addition & 1 deletion core/src/lib/tls_openssl_private.cc
Expand Up @@ -610,7 +610,7 @@ void TlsOpenSsl::SetCipherList(const std::string& cipherlist)
d_->cipherlist_ = cipherlist;
}

void TlsOpenSsl::SetProtocol(std::string protocol)
void TlsOpenSsl::SetProtocol(const std::string& protocol)
{
Dmsg1(100, "Set protocol:\t<%s>\n", protocol.c_str());
d_->protocol_ = protocol;
Expand Down

0 comments on commit 55da82c

Please sign in to comment.