From 42e27ee51a0337ee27c4edebac31335d0db8f2e6 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 25 May 2007 21:41:49 +0000 Subject: [PATCH] Fix TLS #ifdefing when TLS turned off. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4906 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/lib/protos.h | 6 +++--- bacula/src/lib/tls.c | 11 ++--------- bacula/technotes-2.1 | 1 + 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/bacula/src/lib/protos.h b/bacula/src/lib/protos.h index 930151e28b..16b87f0e04 100644 --- a/bacula/src/lib/protos.h +++ b/bacula/src/lib/protos.h @@ -290,13 +290,13 @@ bool tls_postconnect_verify_host (TLS_CONNECTION *tls, bool tls_postconnect_verify_cn (TLS_CONNECTION *tls, alist *verify_list); TLS_CONNECTION *new_tls_connection (TLS_CONTEXT *ctx, int fd); -void free_tls_connection (TLS_CONNECTION *tls); -bool tls_bsock_connect (BSOCK *bsock); bool tls_bsock_accept (BSOCK *bsock); -void tls_bsock_shutdown (BSOCK *bsock); int tls_bsock_writen (BSOCK *bsock, char *ptr, int32_t nbytes); int tls_bsock_readn (BSOCK *bsock, char *ptr, int32_t nbytes); #endif /* HAVE_TLS */ +bool tls_bsock_connect (BSOCK *bsock); +void tls_bsock_shutdown (BSOCK *bsock); +void free_tls_connection (TLS_CONNECTION *tls); bool get_tls_require (TLS_CONTEXT *ctx); bool get_tls_enable (TLS_CONTEXT *ctx); diff --git a/bacula/src/lib/tls.c b/bacula/src/lib/tls.c index 85aeb1dbcd..d4919c83c1 100644 --- a/bacula/src/lib/tls.c +++ b/bacula/src/lib/tls.c @@ -705,15 +705,8 @@ void free_tls_context(TLS_CONTEXT *ctx) { } void tls_bsock_shutdown(BSOCK *bsock) { } -void free_tls_connection(TLS_CONNECTION *tls) -{ - if (tls) { - if (tls->openssl) { - SSL_free(tls->openssl); - } - free(tls); - } -} +void free_tls_connection(TLS_CONNECTION *tls) { } + bool get_tls_require(TLS_CONTEXT *ctx) { return false; diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index f140f418a4..8c7817b70d 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -2,6 +2,7 @@ General: 25May07 +kes Fix TLS #ifdefing when TLS turned off. kes Ensure that when labelling a tape with Slot=0 that InChanger is not set. kes Use DISTINCT to make MySQL and PostgreSQL uar_list_temp query -- 2.39.5