Blame SOURCES/gnutls-3.7.3-max-algos.patch

5dccd1
From b5a2cbce49d94a04a68acbbc31caaa0c5d7b3321 Mon Sep 17 00:00:00 2001
5dccd1
From: Alexander Sosedkin <asosedkin@redhat.com>
5dccd1
Date: Fri, 18 Feb 2022 11:05:15 +0100
5dccd1
Subject: [PATCH] bump GNUTLS_MAX_ALGORITHM_NUM / MAX_ALGOS
5dccd1
5dccd1
Fedora 36 LEGACY crypto-policy uses allowlisting format
5dccd1
and is long enough to blow past the 64 priority string
5dccd1
elements mark, causing, effectively, priority string truncation.
5dccd1
5dccd1
Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
5dccd1
---
5dccd1
 lib/includes/gnutls/gnutls.h.in | 2 +-
5dccd1
 lib/priority.c                  | 2 +-
5dccd1
 2 files changed, 2 insertions(+), 2 deletions(-)
5dccd1
5dccd1
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
5dccd1
index 6359a0edb6..16140c8787 100644
5dccd1
--- a/lib/includes/gnutls/gnutls.h.in
5dccd1
+++ b/lib/includes/gnutls/gnutls.h.in
5dccd1
@@ -408,7 +408,7 @@ typedef enum {
5dccd1
   /* exported for other gnutls headers. This is the maximum number of
5dccd1
    * algorithms (ciphers, kx or macs).
5dccd1
    */
5dccd1
-#define GNUTLS_MAX_ALGORITHM_NUM 64
5dccd1
+#define GNUTLS_MAX_ALGORITHM_NUM 128
5dccd1
 #define GNUTLS_MAX_SESSION_ID_SIZE 32
5dccd1
 
5dccd1
 
5dccd1
diff --git a/lib/priority.c b/lib/priority.c
5dccd1
index 54d7b1bb45..e7698ba7eb 100644
5dccd1
--- a/lib/priority.c
5dccd1
+++ b/lib/priority.c
5dccd1
@@ -43,7 +43,7 @@
5dccd1
 #include "profiles.h"
5dccd1
 #include "name_val_array.h"
5dccd1
 
5dccd1
-#define MAX_ELEMENTS 64
5dccd1
+#define MAX_ELEMENTS GNUTLS_MAX_ALGORITHM_NUM
5dccd1
 
5dccd1
 #define ENABLE_PROFILE(c, profile) do { \
5dccd1
 	c->additional_verify_flags &= 0x00ffffff; \
5dccd1
-- 
5dccd1
2.34.1
5dccd1