File: 005_gnutls34.diff

package info (click to toggle)
echoping 6.0.2-10
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 9,296 kB
  • ctags: 515
  • sloc: sh: 8,951; ansic: 3,352; makefile: 170
file content (34 lines) | stat: -rw-r--r-- 1,094 bytes parent folder | download
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
Description: GnuTLS 3.4 compat
 Use GnuTLS priority NORMAL:+CTYPE-OPENPGP instead of deprecated (and
 removed in GnuTLS 3.4) function gnutls_certificate_type_set_priority.
Author: Andreas Metzler <ametzler@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/624049
Forwarded: no
Last-Update: 2015-07-25

--- echoping-6.0.2.orig/echoping.c
+++ echoping-6.0.2/echoping.c
@@ -137,9 +137,6 @@ main(argc, argv)
 	gnutls_session  session;
 	gnutls_certificate_credentials xcred;
 	int             tls_result;
-	const int       cert_type_priority[3] = { GNUTLS_CRT_X509,
-		GNUTLS_CRT_OPENPGP, 0
-	};
 #endif
 
 	int             priority;
@@ -1020,9 +1017,9 @@ main(argc, argv)
 					if (tls_result != 0)
 						err_sys
 						    ("Cannot create a new TLS session");
-					gnutls_set_default_priority(session);
-					gnutls_certificate_type_set_priority(session,
-									     cert_type_priority);
+					gnutls_priority_set_direct(session,
+							"NORMAL:+CTYPE-OPENPGP",
+							NULL);
 					gnutls_credentials_set(session,
 							       GNUTLS_CRD_CERTIFICATE,
 							       xcred);