Package: libprelude / 4.1.0-4.2

010-fix_compatibility_gnutls_3_6.patch Patch series | 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
Description: Fix compatibility with GnuTLS 3.6
Author: Thomas Andrejak <thomas.andrejak@gmail.com>
Last-Update: 2017-10-09
Forwarded: https://www.prelude-siem.org/issues/911

--- libprelude-3.1.0/prelude-admin/tls-register.c	2017-07-17 12:03:05.762000000 +0200
+++ libprelude-3.1.0/prelude-admin/tls-register.c	2017-10-09 09:37:26.874129389 +0200
@@ -409,7 +409,7 @@
                 goto err;
         }
 
-        ret = gnutls_x509_crt_sign(crt, ca_crt, ca_key);
+        ret = gnutls_x509_crt_sign2(crt, ca_crt, ca_key, GNUTLS_DIG_SHA256, 0);
         if ( ret < 0 ) {
                 fprintf(stderr, "error signing certificate: %s.\n", gnutls_strerror(ret));
                 goto err;
@@ -445,7 +445,7 @@
         gnutls_x509_crt_set_ca_status(crt, 1);
         gnutls_x509_crt_set_key_usage(crt, usage);
 
-        ret = gnutls_x509_crt_sign(crt, crt, key);
+        ret = gnutls_x509_crt_sign2(crt, crt, key, GNUTLS_DIG_SHA256, 0);
         if ( ret < 0 ) {
                 fprintf(stderr, "error self-signing certificate: %s.\n", gnutls_strerror(ret));
                 gnutls_x509_crt_deinit(crt);