summaryrefslogtreecommitdiff
path: root/debian/patches/50_fix_ftbfs_gnutls_3.dpatch
blob: 052d46973d349145907b5a8a8eebe9c6ea321a22 (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
#! /bin/sh /usr/share/dpatch/dpatch-run
## 50_fix_ftbfs_gnutls_3.dpatch by Dimitri John Ledkov <xnox@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix FTBFS with gnutls 3

@DPATCH@
diff --git a/src/tls.c b/src/tls.c
index 42cb66d..48abdef 100644
--- a/src/tls.c
+++ b/src/tls.c
@@ -294,7 +294,11 @@ start_ssl_server (NET_STREAM sd_client, const char *cafile, const char *cert,
 static void
 verify_certificate (gnutls_session session)
 {
-  int status = gnutls_certificate_verify_peers (session);
+  int status=0;
+  if (gnutls_certificate_verify_peers2 (session, &status) < 0)
+    {
+      return;
+    }
 
   if (status == GNUTLS_E_NO_CERTIFICATE_FOUND)
     {