summaryrefslogtreecommitdiff
path: root/mail/cyrus-imapd24/patches/patch-an
blob: 9013b4eb056437b89c38df5eccecf39bc4f3d8d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-an,v 1.1.1.1 2010/10/30 12:12:35 obache Exp $

--- imap/tls.c.orig	2010-10-19 03:08:28.000000000 +0000
+++ imap/tls.c
@@ -223,7 +223,7 @@ static RSA *tmp_rsa_cb(SSL * s __attribu
     return (rsa_tmp);
 }
 
-#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL)
+#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_LACK_BN_CONST)
 /* Logic copied from OpenSSL apps/s_server.c: give the TLS context
  * DH params to work with DHE-* cipher suites. Hardcoded fallback
  * in case no DH params in tls_key_file or tls_cert_file.
@@ -734,7 +734,7 @@ int     tls_init_serverengine(const char
     }
     SSL_CTX_set_tmp_rsa_callback(s_ctx, tmp_rsa_cb);
 
-#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL)
+#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_LACK_BN_CONST)
     /* Load DH params for DHE-* key exchanges */
     SSL_CTX_set_tmp_dh(s_ctx, load_dh_param(s_key_file, s_cert_file));
     /* FIXME: Load ECDH params for ECDHE suites when 0.9.9 is released */