git: e3051908c543 - main - mail/cyrus-imapd38: Fix build against libreSSL.

From: Hajimu UMEMOTO <ume_at_FreeBSD.org>
Date: Thu, 28 Mar 2024 17:25:35 UTC
The branch main has been updated by ume:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e3051908c543c2669210c72736f7d9904e27db95

commit e3051908c543c2669210c72736f7d9904e27db95
Author:     Hajimu UMEMOTO <ume@FreeBSD.org>
AuthorDate: 2024-03-28 17:22:34 +0000
Commit:     Hajimu UMEMOTO <ume@FreeBSD.org>
CommitDate: 2024-03-28 17:25:22 +0000

    mail/cyrus-imapd38: Fix build against libreSSL.
    
    PR:             277997
    Reported by:    David Marec <david@lapinbilly.eu>
---
 mail/cyrus-imapd38/files/patch-imap__tls.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/mail/cyrus-imapd38/files/patch-imap__tls.c b/mail/cyrus-imapd38/files/patch-imap__tls.c
new file mode 100644
index 000000000000..2d9b8d36b1df
--- /dev/null
+++ b/mail/cyrus-imapd38/files/patch-imap__tls.c
@@ -0,0 +1,14 @@
+--- imap/tls.c.orig	2024-03-13 02:47:44 UTC
++++ imap/tls.c
+@@ -257,7 +257,11 @@ static DH *get_dh1024(void)
+     dh = DH_new();
+     if (!dh) return NULL;
+ 
++#if defined(LIBRESSL_VERSION_NUMBER)
++    p = BN_get_rfc2409_prime_1024(NULL);
++#else
+     p = get_rfc2409_prime_1024(NULL);
++#endif
+     BN_dec2bn(&g, "2");
+ 
+     if (DH_set0_pqg(dh, p, NULL, g))