postfix: update to 3.6.0.

This commit is contained in:
Benjamín Albiñana 2021-04-30 16:19:48 +02:00 committed by Érico Nogueira Rolim
parent 840a89b354
commit 34ba256228
2 changed files with 3 additions and 142 deletions

View file

@ -1,139 +0,0 @@
Source: https://svnweb.freebsd.org/ports/head/mail/postfix/files/?sortby=date#dirlist
Upstream: no, upstream does not define a contribution workflow/platform
Reason: fix compatibility with LibreSSL
--- src/posttls-finger/posttls-finger.c 2017-02-03 23:43:04.000000000 +0100
+++ src/posttls-finger/posttls-finger.c 2018-11-29 11:20:05.850958411 +0100
@@ -1513,7 +1513,8 @@
return (0);
}
-#if defined(USE_TLS) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(USE_TLS) && \
+ ( OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) )
/* ssl_cleanup - free memory allocated in the OpenSSL library */
@@ -1966,7 +1967,8 @@
cleanup(&state);
/* OpenSSL 1.1.0 and later (de)initialization is implicit */
-#if defined(USE_TLS) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(USE_TLS) && \
+ ( OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) )
ssl_cleanup();
#endif
--- src/tls/tls_client.c 2018-11-17 23:33:15.000000000 +0100
+++ src/tls/tls_client.c 2018-11-29 11:20:44.305963154 +0100
@@ -299,7 +299,7 @@
*/
tls_check_version();
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
/*
* Initialize the OpenSSL library by the book! To start with, we must
@@ -433,7 +433,7 @@
/*
* 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
*/
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
/*
* According to the OpenSSL documentation, temporary RSA key is needed
--- src/tls/tls_dane.c 2018-11-05 00:47:50.000000000 +0100
+++ src/tls/tls_dane.c 2018-11-29 11:21:12.762966395 +0100
@@ -2127,7 +2127,7 @@
tls_param_init();
tls_check_version();
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
SSL_load_error_strings();
SSL_library_init();
#endif
--- src/tls/tls.h 2018-11-17 23:55:55.000000000 +0100
+++ src/tls/tls.h 2018-11-29 11:21:38.228969112 +0100
@@ -89,7 +89,7 @@
#endif
/* Backwards compatibility with OpenSSL < 1.1.0 */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#define OpenSSL_version_num SSLeay
#define OpenSSL_version SSLeay_version
#define OPENSSL_VERSION SSLEAY_VERSION
--- src/tls/tls_rsa.c 2016-01-03 15:49:51.000000000 +0100
+++ src/tls/tls_rsa.c 2018-11-29 11:22:05.178971819 +0100
@@ -57,7 +57,7 @@
/*
* 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
*/
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
/* tls_tmp_rsa_cb - call-back to generate ephemeral RSA key */
@@ -109,7 +109,7 @@
/*
* 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
*/
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
RSA *rsa;
msg_vstream_init(argv[0], VSTREAM_ERR);
--- src/tls/tls_server.c 2018-11-17 23:33:15.000000000 +0100
+++ src/tls/tls_server.c 2018-11-29 11:24:36.505984117 +0100
@@ -174,7 +174,7 @@
#endif /* OPENSSL_VERSION_NUMBER */
/* OpenSSL 1.1.0 bitrot */
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
typedef const unsigned char *session_id_t;
#else
@@ -377,7 +377,7 @@
*/
tls_check_version();
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
/*
* Initialize the OpenSSL library by the book! To start with, we must
@@ -595,7 +595,7 @@
/*
* 2015-12-05: Ephemeral RSA removed from OpenSSL 1.1.0-dev
*/
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
/*
* According to OpenSSL documentation, a temporary RSA key is needed when
--- src/tls/tls_server.c
+++ src/tls/tls_server.c
@@ -487,7 +487,7 @@
* incomplete.
*/
#ifdef SSL_OP_NO_TICKET
-#ifndef OPENSSL_NO_TLSEXT
+#if !defined(OPENSSL_NO_TLSEXT) && !defined(LIBRESSL_VERSION_NUMBER)
ticketable = (*var_tls_tkt_cipher && scache_timeout > 0
&& !(off & SSL_OP_NO_TICKET));
if (ticketable) {
--- src/tls/tls_certkey.c.orig
+++ src/tls/tls_certkey.c
@@ -144,7 +144,7 @@
/* use_chain - load cert, key and chain into ctx or ssl */
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fUL
+#if OPENSSL_VERSION_NUMBER >= 0x1010100fUL && !defined(LIBRESSL_VERSION_NUMBER)
static int use_chain(pem_load_state_t *st)
{
int ret;

View file

@ -1,7 +1,7 @@
# Template file for 'postfix'
pkgname=postfix
version=3.5.10
revision=2
version=3.6.0
revision=1
hostmakedepends="perl m4"
makedepends="icu-devel libldap-devel libmariadbclient-devel pcre-devel
postgresql-libs-devel sqlite-devel"
@ -10,7 +10,7 @@ maintainer="Benjamín Albiñana <benalb@gmail.com>"
license="IPL-1.0, EPL-2.0"
homepage="http://www.postfix.org/"
distfiles="http://ftp.porcupine.org/mirrors/postfix-release/official/${pkgname}-${version}.tar.gz"
checksum=5bb4d7d72d7512b58f3a31426dcbd394fd354e0a43de21da89466b057a0228f8
checksum=77462894d7671d63cbe5fc2733f941088515a6d67108b9f1808b7dae37e83c2e
system_accounts="postfix"
postfix_homedir="/var/spool/postfix"