summaryrefslogtreecommitdiff
path: root/source4/lib/tls
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/tls')
-rw-r--r--source4/lib/tls/tls.c9
-rw-r--r--source4/lib/tls/tls.h3
2 files changed, 7 insertions, 5 deletions
diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c
index 559a54a2f0..86a2ca0f0b 100644
--- a/source4/lib/tls/tls.c
+++ b/source4/lib/tls/tls.c
@@ -332,7 +332,8 @@ init_failed:
struct tls_context *tls_init_server(struct tls_params *params,
struct socket_context *socket,
struct fd_event *fde,
- const char *plain_chars)
+ const char *plain_chars,
+ BOOL tls_enable)
{
struct tls_context *tls;
int ret;
@@ -343,7 +344,7 @@ struct tls_context *tls_init_server(struct tls_params *params,
tls->socket = socket;
tls->fde = fde;
- if (!params->tls_enabled) {
+ if (!params->tls_enabled || !tls_enable) {
tls->tls_enabled = False;
return tls;
}
@@ -402,7 +403,6 @@ BOOL tls_support(struct tls_params *params)
return params->tls_enabled;
}
-
#else
/* for systems without tls we just map the tls socket calls to the
@@ -416,7 +416,8 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx)
struct tls_context *tls_init_server(struct tls_params *params,
struct socket_context *sock,
struct fd_event *fde,
- const char *plain_chars)
+ const char *plain_chars,
+ BOOL tls_enable)
{
if (plain_chars == NULL) return NULL;
return (struct tls_context *)sock;
diff --git a/source4/lib/tls/tls.h b/source4/lib/tls/tls.h
index fe993a3804..3046e35a1c 100644
--- a/source4/lib/tls/tls.h
+++ b/source4/lib/tls/tls.h
@@ -37,7 +37,8 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx);
struct tls_context *tls_init_server(struct tls_params *parms,
struct socket_context *sock,
struct fd_event *fde,
- const char *plain_chars);
+ const char *plain_chars,
+ BOOL tls_enable);
/*
call these to send and receive data. They behave like socket_send() and socket_recv()