From 249902c244d0ee0659c6f9907b7384d6453ce77c Mon Sep 17 00:00:00 2001
From: Michal Privoznik <mprivozn@redhat.com>
Date: Tue, 21 Dec 2021 10:05:00 +0100
Subject: [PATCH 106/108] virnettlscontext: Drop gnutls_dh_set_prime_bits()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

According to the gnutls_dh_set_prime_bits() manpage:

  The function has no effect in server side.

Therefore, don't call it when creating server side context.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit fb474c33ccc2c2726a2d6f9396effed13bfff9e8)
---
 src/rpc/virnettlscontext.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c
index 02c17124a1..d648a3815c 100644
--- a/src/rpc/virnettlscontext.c
+++ b/src/rpc/virnettlscontext.c
@@ -1235,8 +1235,6 @@ virNetTLSSessionPtr virNetTLSSessionNew(virNetTLSContextPtr ctxt,
      */
     if (ctxt->isServer) {
         gnutls_certificate_server_set_request(sess->session, GNUTLS_CERT_REQUEST);
-
-        gnutls_dh_set_prime_bits(sess->session, DH_BITS);
     }
 
     gnutls_transport_set_ptr(sess->session, sess);
-- 
2.33.0

