Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Mar 2017 19:24:33 +0000 (UTC)
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r435498 - in head/mail/imapfilter: . files
Message-ID:  <201703051924.v25JOX0f027243@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bofh
Date: Sun Mar  5 19:24:33 2017
New Revision: 435498
URL: https://svnweb.freebsd.org/changeset/ports/435498

Log:
  mail/imapfilter: Fix linking with libressl
  
  PR:		217382
  Submitted by:	pierre@guinoiseau.eu

Added:
  head/mail/imapfilter/files/
  head/mail/imapfilter/files/patch-auth.c   (contents, props changed)
  head/mail/imapfilter/files/patch-imapfilter.c   (contents, props changed)
Modified:
  head/mail/imapfilter/Makefile

Modified: head/mail/imapfilter/Makefile
==============================================================================
--- head/mail/imapfilter/Makefile	Sun Mar  5 19:15:17 2017	(r435497)
+++ head/mail/imapfilter/Makefile	Sun Mar  5 19:24:33 2017	(r435498)
@@ -3,6 +3,7 @@
 
 PORTNAME=	imapfilter
 PORTVERSION=	2.6.10
+PORTREVISION=	1
 DISTVERSIONPREFIX=	v
 CATEGORIES=	mail
 

Added: head/mail/imapfilter/files/patch-auth.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/imapfilter/files/patch-auth.c	Sun Mar  5 19:24:33 2017	(r435498)
@@ -0,0 +1,20 @@
+--- src/auth.c.orig	2017-02-27 08:30:09 UTC
++++ src//auth.c
+@@ -20,7 +20,7 @@ auth_cram_md5(const char *user, const ch
+ 	unsigned char *resp, *buf, *out;
+ 	unsigned char md[EVP_MAX_MD_SIZE], mdhex[EVP_MAX_MD_SIZE * 2 + 1];
+ 	unsigned int mdlen;
+-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
++#ifdef HAVE_OPAQUE_STRUCTS
+ 	HMAC_CTX *ctx;
+ #else
+ 	HMAC_CTX ctx;
+@@ -32,7 +32,7 @@ auth_cram_md5(const char *user, const ch
+ 
+ 	EVP_DecodeBlock(resp, chal, strlen((char *)(chal)));
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
++#ifdef HAVE_OPAQUE_STRUCTS
+ 	ctx = HMAC_CTX_new();
+ 	HMAC_Init_ex(ctx, (const unsigned char *)pass, strlen(pass),
+ 	    EVP_md5(), NULL);

Added: head/mail/imapfilter/files/patch-imapfilter.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/imapfilter/files/patch-imapfilter.c	Sun Mar  5 19:24:33 2017	(r435498)
@@ -0,0 +1,38 @@
+--- src/imapfilter.c.orig	2017-02-27 08:19:40 UTC
++++ src/imapfilter.c
+@@ -21,7 +21,7 @@
+ 
+ extern buffer ibuf, obuf, nbuf, cbuf;
+ extern regexp responses[];
+-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
++#if OPENSSL_VERSION_NUMBER >= 0x1010000fL || LIBRESSL_VERSION_NUMBER
+ extern SSL_CTX *sslctx;
+ #else
+ extern SSL_CTX *ssl23ctx;
+@@ -131,7 +131,7 @@ main(int argc, char *argv[])
+ 
+ 	SSL_library_init();
+ 	SSL_load_error_strings();
+-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
++#if OPENSSL_VERSION_NUMBER >= 0x1010000fL || LIBRESSL_VERSION_NUMBER
+ 	sslctx = SSL_CTX_new(TLS_method());
+ #else
+ 	ssl23ctx = SSL_CTX_new(SSLv23_client_method());
+@@ -152,7 +152,7 @@ main(int argc, char *argv[])
+ 		capath = opts.truststore;
+ 	else if (exists_file(opts.truststore))
+ 		cafile = opts.truststore;
+-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
++#if OPENSSL_VERSION_NUMBER >= 0x1010000fL || LIBRESSL_VERSION_NUMBER
+ 	if (sslctx)
+ 		SSL_CTX_load_verify_locations(sslctx, cafile, capath);
+ #else
+@@ -193,7 +193,7 @@ main(int argc, char *argv[])
+ #endif
+ 	stop_lua();
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
++#if OPENSSL_VERSION_NUMBER >= 0x1010000fL || LIBRESSL_VERSION_NUMBER
+ 	if (sslctx)
+ 		SSL_CTX_free(sslctx);
+ #else



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