summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-11-28 20:55:37 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-11-30 20:11:14 +0100
commit456c69f95e7a672c4cc9a5e6e52fb37e14012304 (patch)
treea7b9a7112e0050ea7b890c61a610a058d493d61d /source4/lib
parent9c4d49863a80ebe6dedd8faeb4bf41270f7ba685 (diff)
downloadsamba-456c69f95e7a672c4cc9a5e6e52fb37e14012304.tar.gz
samba-456c69f95e7a672c4cc9a5e6e52fb37e14012304.tar.bz2
samba-456c69f95e7a672c4cc9a5e6e52fb37e14012304.zip
s4:lib/tls - call "gnutls_transport_set_lowat" only on GNUTLS < 3.0
This function call together with the lowat feature has been removed in release 3.0 as described in this mailing list post: http://old.nabble.com/gnutls_transport_set_lowat-deprecated-td32554230.html. Since we do not make any use of lowat (esprimed by each function call) we are free to simply omit it on v3.0 and later. This addresses bug #8537. Reviewed by: abartlet + metze Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Wed Nov 30 20:11:14 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/tls/tls.c4
-rw-r--r--source4/lib/tls/tls_tstream.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c
index 00c2d13478..3a49e2f2e8 100644
--- a/source4/lib/tls/tls.c
+++ b/source4/lib/tls/tls.c
@@ -505,7 +505,9 @@ struct socket_context *tls_init_server(struct tls_params *params,
gnutls_transport_set_ptr(tls->session, (gnutls_transport_ptr)tls);
gnutls_transport_set_pull_function(tls->session, (gnutls_pull_func)tls_pull);
gnutls_transport_set_push_function(tls->session, (gnutls_push_func)tls_push);
+#if GNUTLS_VERSION_MAJOR < 3
gnutls_transport_set_lowat(tls->session, 0);
+#endif
tls->plain_chars = plain_chars;
if (plain_chars) {
@@ -574,7 +576,9 @@ struct socket_context *tls_init_client(struct socket_context *socket_ctx,
gnutls_transport_set_ptr(tls->session, (gnutls_transport_ptr)tls);
gnutls_transport_set_pull_function(tls->session, (gnutls_pull_func)tls_pull);
gnutls_transport_set_push_function(tls->session, (gnutls_push_func)tls_push);
+#if GNUTLS_VERSION_MAJOR < 3
gnutls_transport_set_lowat(tls->session, 0);
+#endif
tls->tls_detect = false;
tls->output_pending = false;
diff --git a/source4/lib/tls/tls_tstream.c b/source4/lib/tls/tls_tstream.c
index c64b2eaa49..eb4a6d90da 100644
--- a/source4/lib/tls/tls_tstream.c
+++ b/source4/lib/tls/tls_tstream.c
@@ -1029,7 +1029,9 @@ struct tevent_req *_tstream_tls_connect_send(TALLOC_CTX *mem_ctx,
(gnutls_pull_func)tstream_tls_pull_function);
gnutls_transport_set_push_function(tlss->tls_session,
(gnutls_push_func)tstream_tls_push_function);
+#if GNUTLS_VERSION_MAJOR < 3
gnutls_transport_set_lowat(tlss->tls_session, 0);
+#endif
tlss->handshake.req = req;
tstream_tls_retry_handshake(state->tls_stream);
@@ -1278,7 +1280,9 @@ struct tevent_req *_tstream_tls_accept_send(TALLOC_CTX *mem_ctx,
(gnutls_pull_func)tstream_tls_pull_function);
gnutls_transport_set_push_function(tlss->tls_session,
(gnutls_push_func)tstream_tls_push_function);
+#if GNUTLS_VERSION_MAJOR < 3
gnutls_transport_set_lowat(tlss->tls_session, 0);
+#endif
tlss->handshake.req = req;
tstream_tls_retry_handshake(state->tls_stream);