Skip to content

Commit

Permalink
tls: renamed a function
Browse files Browse the repository at this point in the history
- GetNeedFromConfiguration --> GetLocalTlsPolicyFromConfiguration
  • Loading branch information
franku committed Jun 1, 2018
1 parent ba14b86 commit 0c5a5fa
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions core/src/dird/backup.cc
Expand Up @@ -554,7 +554,7 @@ bool DoNativeBackup(JobControlRecord *jcr)
* TLS Requirement
*/

tls_need = GetNeedFromConfiguration(client);
tls_need = GetLocalTlsPolicyFromConfiguration(client);

connection_target_address = StorageAddressToContact(client, store);

Expand All @@ -568,7 +568,7 @@ bool DoNativeBackup(JobControlRecord *jcr)
* TLS Requirement
*/

tls_need = GetNeedFromConfiguration(me);
tls_need = GetLocalTlsPolicyFromConfiguration(me);

connection_target_address = ClientAddressToContact(client, store);

Expand Down
2 changes: 1 addition & 1 deletion core/src/dird/migrate.cc
Expand Up @@ -1542,7 +1542,7 @@ static inline bool DoActualMigration(JobControlRecord *jcr)
/*
* TLS Requirement
*/
tls_need = GetNeedFromConfiguration(wstore);
tls_need = GetLocalTlsPolicyFromConfiguration(wstore);

char *connection_target_address = StorageAddressToContact(rstore, wstore);

Expand Down
4 changes: 2 additions & 2 deletions core/src/dird/restore.cc
Expand Up @@ -260,7 +260,7 @@ static inline bool DoNativeRestoreBootstrap(JobControlRecord *jcr)
/*
* TLS Requirement
*/
tls_need = GetNeedFromConfiguration(store);
tls_need = GetLocalTlsPolicyFromConfiguration(store);

connection_target_address = StorageAddressToContact(client, store);

Expand Down Expand Up @@ -289,7 +289,7 @@ static inline bool DoNativeRestoreBootstrap(JobControlRecord *jcr)
/*
* TLS Requirement
*/
tls_need = GetNeedFromConfiguration(client);
tls_need = GetLocalTlsPolicyFromConfiguration(client);

connection_target_address = ClientAddressToContact(client, store);
/*
Expand Down
4 changes: 2 additions & 2 deletions core/src/dird/verify.cc
Expand Up @@ -347,7 +347,7 @@ bool DoVerify(JobControlRecord *jcr)
* TLS Requirement
*/

tls_need = GetNeedFromConfiguration(store);
tls_need = GetLocalTlsPolicyFromConfiguration(store);

fd->fsend(storaddrcmd, store->address, store->SDDport, tls_need, jcr->sd_auth_key);
if (!response(jcr, fd, OKstore, "Storage", DISPLAY_ERROR)) {
Expand All @@ -360,7 +360,7 @@ bool DoVerify(JobControlRecord *jcr)
/*
* TLS Requirement
*/
tls_need = GetNeedFromConfiguration(client);
tls_need = GetLocalTlsPolicyFromConfiguration(client);

/*
* Tell the SD to connect to the FD.
Expand Down
6 changes: 3 additions & 3 deletions core/src/lib/bsock.cc
Expand Up @@ -33,12 +33,12 @@
#include "lib/util.h"
#include "lib/tls_openssl.h"

DLL_IMP_EXP uint32_t GetNeedFromConfiguration(TlsResource *tls_configuration) {
DLL_IMP_EXP uint32_t GetLocalTlsPolicyFromConfiguration(TlsResource *tls_configuration) {
uint32_t merged_policy = 0;

#if defined(HAVE_TLS)
merged_policy = tls_configuration->tls_cert.GetPolicy() | tls_configuration->tls_psk.GetPolicy();
Dmsg1(100, "GetNeedFromConfiguration: %u\n", merged_policy);
Dmsg1(100, "GetLocalTlsPolicyFromConfiguration: %u\n", merged_policy);
#else
Dmsg1(100, "Ignore configuration no tls compiled in: %u\n", merged_policy);
#endif
Expand Down Expand Up @@ -363,7 +363,7 @@ bool BareosSocket::two_way_authenticate(JobControlRecord *jcr,
const int debuglevel = 50;
bool compatible = true;
bool auth_success = false;
uint32_t local_tls_policy = GetNeedFromConfiguration(tls_configuration);
uint32_t local_tls_policy = GetLocalTlsPolicyFromConfiguration(tls_configuration);
uint32_t remote_tls_policy = 0;
alist *verify_list = NULL;
TlsBase * selected_local_tls = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion core/src/lib/bsock.h
Expand Up @@ -45,7 +45,7 @@ class BareosSocket;
btimer_t *StartBsockTimer(BareosSocket *bs, uint32_t wait);
void StopBsockTimer(btimer_t *wid);

uint32_t GetNeedFromConfiguration(TlsResource *tls_configuration);
uint32_t GetLocalTlsPolicyFromConfiguration(TlsResource *tls_configuration);


TlsBase *SelectTlsFromPolicy(TlsResource *tls_configuration, uint32_t remote_policy);
Expand Down

0 comments on commit 0c5a5fa

Please sign in to comment.