aboutsummaryrefslogtreecommitdiffstats
path: root/testing/wmi-client/adapt-to-gnutls-3.x.patch
blob: 098ea955507cd209beeef57174377a68dd79cc02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Adapt wmi-client to gnutls 3.5.

Changes:
* Function gnutls_transport_set_lowat() was replaced by gnutls_record_check_pending()
* Function gnutls_certificate_type_set_priority() was removed because
  gnutls_set_default_priority() already set the default gnutls priority.

For more information: https://www.gnutls.org/manual/gnutls.html

--- wmi-1.3.16/Samba/source/lib/tls/tls.c
+++ wmi-1.3.16/Samba/source/lib/tls/tls.c
@@ -505,7 +505,7 @@
 	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);
-	gnutls_transport_set_lowat(tls->session, 0);
+	gnutls_record_check_pending(tls->session);
 
 	tls->plain_chars = plain_chars;
 	if (plain_chars) {
@@ -576,7 +576,6 @@
 	talloc_free(cafile);
 	TLSCHECK(gnutls_init(&tls->session, GNUTLS_CLIENT));
 	TLSCHECK(gnutls_set_default_priority(tls->session));
-	gnutls_certificate_type_set_priority(tls->session, cert_type_priority);
 	TLSCHECK(gnutls_credentials_set(tls->session, GNUTLS_CRD_CERTIFICATE, tls->xcred));
 
 	talloc_set_destructor(tls, tls_destructor);
@@ -584,7 +583,7 @@
 	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);
-	gnutls_transport_set_lowat(tls->session, 0);
+	gnutls_record_check_pending(tls->session);
 	tls->tls_detect = False;
 
 	tls->output_pending  = False;