Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2018 09:03:38 +0000 (UTC)
From:      Bernard Spil <brnrd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r482417 - in head/mail/up-imapproxy: . files
Message-ID:  <201810190903.w9J93cvi093934@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brnrd
Date: Fri Oct 19 09:03:38 2018
New Revision: 482417
URL: https://svnweb.freebsd.org/changeset/ports/482417

Log:
  mail/up-imapproxy: Add OpenSSL 1.1 support
  
   - Switch to Debian snapshot 1.2.8pre
   - Add OpenSSL 1.1 patch from Debian
   - Supports TLSv1.1 and TLSv1.2 too
  
  Obtained from:	http://packages.debian.org/source/up-imapproxy

Added:
  head/mail/up-imapproxy/files/patch-OpenSSL-1.1   (contents, props changed)
Deleted:
  head/mail/up-imapproxy/files/patch-Makefile.in
  head/mail/up-imapproxy/files/patch-configure.in
  head/mail/up-imapproxy/files/patch-src_main.c
  head/mail/up-imapproxy/files/patch-ssl
Modified:
  head/mail/up-imapproxy/Makefile
  head/mail/up-imapproxy/distinfo

Modified: head/mail/up-imapproxy/Makefile
==============================================================================
--- head/mail/up-imapproxy/Makefile	Fri Oct 19 08:48:38 2018	(r482416)
+++ head/mail/up-imapproxy/Makefile	Fri Oct 19 09:03:38 2018	(r482417)
@@ -2,12 +2,9 @@
 # $FreeBSD$
 
 PORTNAME=	imapproxy
-PORTVERSION=	1.2.7
-PORTREVISION=	5
+DISTVERSION=	1.2.8-pre20171105
 CATEGORIES=	mail
-MASTER_SITES=	SF/squirrelmail/imap_proxy/${PORTVERSION}
 PKGNAMEPREFIX=	up-
-DISTNAME=	squirrelmail-imap_proxy-${PORTVERSION}
 
 MAINTAINER=	brnrd@FreeBSD.org
 COMMENT=	Caching IMAP proxy server
@@ -17,6 +14,11 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 USES=		autoreconf tar:bzip2 ncurses pathfix ssl
 
+USE_GITHUB=	yes
+GH_ACCOUNT=	rlaager
+GH_PROJECT=	${PORTNAME}-pkg
+GH_TAGNAME=	upstream/1.2.8_svn20171105
+
 OPTIONS_DEFINE=	DOVECOT DOCS
 
 DOVECOT_DESC=	Use with dovecot2
@@ -31,6 +33,9 @@ SUB_FILES=	pkg-message
 
 DOCS=		ChangeLog README README.debian README.known_issues README.ssl
 SBIN=		in.imapproxyd pimpstat
+
+post-patch:
+	${MKDIR} ${WRKSRC}/bin
 
 do-install:
 .for i in ${SBIN}

Modified: head/mail/up-imapproxy/distinfo
==============================================================================
--- head/mail/up-imapproxy/distinfo	Fri Oct 19 08:48:38 2018	(r482416)
+++ head/mail/up-imapproxy/distinfo	Fri Oct 19 09:03:38 2018	(r482417)
@@ -1,2 +1,3 @@
-SHA256 (squirrelmail-imap_proxy-1.2.7.tar.bz2) = dd8ad40e3e457bd76fc9f19ef1c0d89911e3e3cc722415d1183f765dcac1ae48
-SIZE (squirrelmail-imap_proxy-1.2.7.tar.bz2) = 111651
+TIMESTAMP = 1539772291
+SHA256 (rlaager-imapproxy-pkg-1.2.8-pre20171105-upstream-1.2.8_svn20171105_GH0.tar.gz) = b4c9cbb7a370d1371dfc36f4670e0dfda8fea6dc8b19d4c7af74fa81a8000751
+SIZE (rlaager-imapproxy-pkg-1.2.8-pre20171105-upstream-1.2.8_svn20171105_GH0.tar.gz) = 146395

Added: head/mail/up-imapproxy/files/patch-OpenSSL-1.1
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/up-imapproxy/files/patch-OpenSSL-1.1	Fri Oct 19 09:03:38 2018	(r482417)
@@ -0,0 +1,54 @@
+--- src/imapcommon.c.orig	2017-11-05 07:29:47 UTC
++++ src/imapcommon.c
+@@ -554,16 +554,24 @@ extern ICD_Struct *Get_Server_conn( char
+     unsigned int Expiration;
+     struct addrinfo *useai;
+ 
+-    EVP_MD_CTX mdctx;
++    EVP_MD_CTX *mdctx;
+     int md_len;
+ 
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++    EVP_MD_CTX mdctx_;
++#define EVP_MD_CTX_new(x) &mdctx_
++#define EVP_MD_CTX_free(x)
++#endif
++
+     Expiration = PC_Struct.cache_expiration_time;
+     memset( &Server, 0, sizeof Server );
+     
+     /* need to md5 the passwd regardless, so do that now */
+-    EVP_DigestInit(&mdctx, EVP_md5());
+-    EVP_DigestUpdate(&mdctx, Password, strlen(Password));
+-    EVP_DigestFinal(&mdctx, md5pw, &md_len);
++    mdctx = EVP_MD_CTX_new();
++    EVP_DigestInit(mdctx, EVP_md5());
++    EVP_DigestUpdate(mdctx, Password, strlen(Password));
++    EVP_DigestFinal(mdctx, md5pw, &md_len);
++    EVP_MD_CTX_free(mdctx);
+     
+     /* see if we have a reusable connection available */
+     ICC_Active = NULL;
+--- src/main.c.orig	2017-11-05 07:29:47 UTC
++++ src/main.c
+@@ -460,7 +460,7 @@ int main( int argc, char *argv[] )
+     /* Set up OpenSSL thread protection */
+     ssl_thread_setup(fn);
+ 
+-#ifndef HAVE_RAND_EGD
++#ifndef OPENSSL_NO_EGD
+     if ( RAND_egd( ( RAND_file_name( f_randfile, sizeof( f_randfile ) ) == f_randfile ) ? f_randfile : "/.rnd" ) ) 
+ #endif
+     {
+@@ -1574,9 +1574,9 @@ static int verify_callback(int ok, X509_
+ 	    verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;
+ 	}
+     }
+-    switch (ctx->error) {
++    switch (err) {
+     case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
+-	X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, sizeof(buf));
++	X509_NAME_oneline(X509_get_issuer_name(err_cert), buf, sizeof(buf));
+ 	syslog(LOG_NOTICE, "issuer= %s", buf);
+ 	break;
+     case X509_V_ERR_CERT_NOT_YET_VALID:



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