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