virnettlscontext: Drop gnutls_dh_set_prime_bits()

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>
This commit is contained in:
Michal Privoznik 2021-12-21 10:05:00 +01:00
parent a8f4298175
commit fb474c33cc

View File

@ -1233,8 +1233,6 @@ virNetTLSSession *virNetTLSSessionNew(virNetTLSContext *ctxt,
*/ */
if (ctxt->isServer) { if (ctxt->isServer) {
gnutls_certificate_server_set_request(sess->session, GNUTLS_CERT_REQUEST); 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); gnutls_transport_set_ptr(sess->session, sess);