Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2019 10:59:22 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r491703 - in head/mail: qmail qmail-tls qmail/files
Message-ID:  <201901311059.x0VAxMaD011628@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Thu Jan 31 10:59:22 2019
New Revision: 491703
URL: https://svnweb.freebsd.org/changeset/ports/491703

Log:
  mail/qmail-tls: patches to make it work with openssl 1.1.1 in base for 12+
  
  PR:		235336
  Submitted by:	erdgeist@erdgeist.org (maintainer)

Added:
  head/mail/qmail/files/netqmail-1.06-tls-20160918-freebsd-12.patch   (contents, props changed)
Modified:
  head/mail/qmail-tls/Makefile
  head/mail/qmail/Makefile

Modified: head/mail/qmail-tls/Makefile
==============================================================================
--- head/mail/qmail-tls/Makefile	Thu Jan 31 10:44:09 2019	(r491702)
+++ head/mail/qmail-tls/Makefile	Thu Jan 31 10:59:22 2019	(r491703)
@@ -3,7 +3,7 @@
 
 PORTNAME=	qmail
 PORTVERSION=	${QMAIL_VERSION}.${TLS_PATCH_DATE}
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 PKGNAMESUFFIX=	-tls
 

Modified: head/mail/qmail/Makefile
==============================================================================
--- head/mail/qmail/Makefile	Thu Jan 31 10:44:09 2019	(r491702)
+++ head/mail/qmail/Makefile	Thu Jan 31 10:59:22 2019	(r491703)
@@ -134,6 +134,8 @@ BARRIER_DNS_CNAME=		yes
 
 PATCH_DIST_STRIP+=	-p1
 
+.include <bsd.port.options.mk>
+
 .if !defined(BARRIER_DNS_PATCH)
 # Patch necessary to cope with non-RFC >512 dns entries
 # Since AOL has been using those, the problem has skyrocketed from minor to
@@ -168,7 +170,10 @@ PATCHFILES+=	netqmail-mysql-${MYSQL_PATCH_VERSION}.pat
 PATCH_SITES+=	http://inoa.net/qmail-tls/:tls
 TLS_PATCH_NAME=	${QMAIL_PORTNAME}-${QMAIL_VERSION}-tls-${TLS_PATCH_DATE}.patch
 PATCHFILES+=	${TLS_PATCH_NAME}:tls
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000
+EXTRA_PATCHES+=	${FILESDIR}/netqmail-1.06-tls-20160918-freebsd-12.patch
 .endif
+.endif
 
 PATCH_SITES+=	LOCAL/bdrewery/qmail/:dns,sendmail_flagf,rfc2821,ldap,mysql,tls,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip
 PATCH_SITES+=	http://mirror.shatow.net/freebsd/qmail/:DEFAULT,dns,sendmail_flagf,rfc2821,ldap,mysql,tls,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip
@@ -381,8 +386,6 @@ TLS_USES=		ssl
 # Port will control all PREFIX handling.
 NO_MTREE=	yes
 NO_PREFIX_RMDIR=yes
-
-.include <bsd.port.options.mk>
 
 .if ${ARCH} == "amd64" && !defined(SLAVE_LDAP) \
     && !defined(SLAVE_SPAMCONTROL)

Added: head/mail/qmail/files/netqmail-1.06-tls-20160918-freebsd-12.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/qmail/files/netqmail-1.06-tls-20160918-freebsd-12.patch	Thu Jan 31 10:59:22 2019	(r491703)
@@ -0,0 +1,49 @@
+--- qmail-remote.c	2019-01-31 00:13:55.812794000 +0100
++++ qmail-remote.c	2019-01-31 00:21:01.440755000 +0100
+@@ -266,8 +266,8 @@
+ {
+ #ifdef TLS
+   /* shouldn't talk to the client unless in an appropriate state */
+-  int state = ssl ? ssl->state : SSL_ST_BEFORE;
+-  if (state & SSL_ST_OK || (!smtps && state & SSL_ST_BEFORE))
++  OSSL_HANDSHAKE_STATE state = ssl ? SSL_get_state(ssl) : TLS_ST_BEFORE;
++  if (state & TLS_ST_OK || (!smtps && state & TLS_ST_BEFORE))
+ #endif
+   substdio_putsflush(&smtpto,"QUIT\r\n");
+   /* waiting for remote side is just too ridiculous */
+@@ -502,7 +502,7 @@
+       X509_NAME *subj = X509_get_subject_name(peercert);
+       i = X509_NAME_get_index_by_NID(subj, NID_commonName, -1);
+       if (i >= 0) {
+-        const ASN1_STRING *s = X509_NAME_get_entry(subj, i)->value;
++        const ASN1_STRING *s = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, i));
+         if (s) { peer.len = s->length; peer.s = s->data; }
+       }
+       if (peer.len <= 0) {
+
+--- qmail-smtpd.c	2019-01-31 00:13:55.815359000 +0100
++++ qmail-smtpd.c	2019-01-31 00:21:01.443177000 +0100
+@@ -557,7 +557,7 @@
+     subj = X509_get_subject_name(peercert);
+     n = X509_NAME_get_index_by_NID(subj, NID_pkcs9_emailAddress, -1);
+     if (n >= 0) {
+-      const ASN1_STRING *s = X509_NAME_get_entry(subj, n)->value;
++      const ASN1_STRING *s = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, n));
+       if (s) { email.len = s->length; email.s = s->data; }
+     }
+
+--- ssl_timeoutio.c	2019-01-31 00:13:55.830214000 +0100
++++ ssl_timeoutio.c	2019-01-31 00:21:01.456993000 +0100
+@@ -74,10 +74,10 @@
+ 
+   SSL_renegotiate(ssl);
+   r = ssl_timeoutio(SSL_do_handshake, t, rfd, wfd, ssl, NULL, 0);
+-  if (r <= 0 || ssl->type == SSL_ST_CONNECT) return r;
++  if (r <= 0) return r;
+ 
+   /* this is for the server only */
+-  ssl->state = SSL_ST_ACCEPT;
++  SSL_set_accept_state(ssl);
+   return ssl_timeoutio(SSL_do_handshake, t, rfd, wfd, ssl, NULL, 0);
+ }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901311059.x0VAxMaD011628>