GnuTLS: fix build with older libraries
authorJeremy Harris <jgh146exb@wizmail.org>
Thu, 29 Nov 2018 10:01:52 +0000 (10:01 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Thu, 29 Nov 2018 10:01:52 +0000 (10:01 +0000)
Broken-by: 6aac3239b4
src/src/tls-gnu.c

index 25fe2f4060bec20adc6921fcb45f0cf9802d4dfd..42d54a9c586874d6e5949245d6e58abb9e908521 100644 (file)
@@ -787,6 +787,9 @@ if ((rc = gnutls_x509_crt_init(&cert))) goto err;
 where = US"generating pkey";
 if ((rc = gnutls_x509_privkey_generate(pkey, GNUTLS_PK_RSA,
 #ifdef SUPPORT_PARAM_TO_PK_BITS
+# ifndef GNUTLS_SEC_PARAM_MEDIUM
+#  define GNUTLS_SEC_PARAM_MEDIUM GNUTLS_SEC_PARAM_HIGH
+# endif
            gnutls_sec_param_to_pk_bits(GNUTLS_PK_RSA, GNUTLS_SEC_PARAM_MEDIUM),
 #else
            2048,