From owner-svn-ports-all@freebsd.org Wed Nov 23 21:44:12 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31F34C519EF; Wed, 23 Nov 2016 21:44:12 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EACD0F1B; Wed, 23 Nov 2016 21:44:11 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANLiBsF067181; Wed, 23 Nov 2016 21:44:11 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANLiBug067180; Wed, 23 Nov 2016 21:44:11 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201611232144.uANLiBug067180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Wed, 23 Nov 2016 21:44:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r426979 - head/net/mosquitto/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 21:44:12 -0000 Author: marino Date: Wed Nov 23 21:44:10 2016 New Revision: 426979 URL: https://svnweb.freebsd.org/changeset/ports/426979 Log: net/mosquitto: restore libressl support The mosquitto commit that added OpenSSL 1.1.0 support simultaneously broke LibreSSL support. This patch comes from a fork and hasn't been incorporated upstream yet (pull request #280 still outstanding but should eventually be merged in). LibreSSL support broke during the version upgrade last month. Approved by: SSL blanket Added: head/net/mosquitto/files/patch-support-libressl (contents, props changed) Added: head/net/mosquitto/files/patch-support-libressl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/mosquitto/files/patch-support-libressl Wed Nov 23 21:44:10 2016 (r426979) @@ -0,0 +1,68 @@ +From 9f74e09373f3be7b77f510ef8b0ae2c887f7b325 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Tue, 4 Oct 2016 14:35:33 +0200 +Subject: [PATCH] [280] Fix build with libressl + +Closes #280 + +Fix building with libressl which broke in commit fff741613 (Support for +openssl 1.1.0). + +Bug: #280 + +Signed-off-by: Natanael Copa +--- + lib/mosquitto_internal.h | 3 +++ + src/mosquitto_passwd.c | 4 ++-- + src/security_default.c | 2 +- + 3 files changed, 6 insertions(+), 3 deletions(-) + +diff --git lib/mosquitto_internal.h lib/mosquitto_internal.h +index 4b4cf85..700bbb0 100644 +--- lib/mosquitto_internal.h ++++ lib/mosquitto_internal.h +@@ -25,6 +25,9 @@ and the Eclipse Distribution License is available at + + #ifdef WITH_TLS + # include ++# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++# define HAVE_OPENSSL_OPAQUE_STRUCTS ++# endif + #else + # include + #endif +diff --git src/mosquitto_passwd.c src/mosquitto_passwd.c +index de9a719..5b854d9 100644 +--- src/mosquitto_passwd.c ++++ src/mosquitto_passwd.c +@@ -90,7 +90,7 @@ int output_new_password(FILE *fptr, const char *username, const char *password) + unsigned char hash[EVP_MAX_MD_SIZE]; + unsigned int hash_len; + const EVP_MD *digest; +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#ifndef HAVE_OPENSSL_OPAQUE_STRUCTS + EVP_MD_CTX context; + #else + EVP_MD_CTX *context; +@@ -117,7 +117,7 @@ int output_new_password(FILE *fptr, const char *username, const char *password) + return 1; + } + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#ifndef HAVE_OPENSSL_OPAQUE_STRUCTS + EVP_MD_CTX_init(&context); + EVP_DigestInit_ex(&context, digest, NULL); + EVP_DigestUpdate(&context, password, strlen(password)); +diff --git src/security_default.c src/security_default.c +index 64ca846..9ad8708 100644 +--- src/security_default.c ++++ src/security_default.c +@@ -770,7 +770,7 @@ int mosquitto_psk_key_get_default(struct mosquitto_db *db, const char *hint, con + int _pw_digest(const char *password, const unsigned char *salt, unsigned int salt_len, unsigned char *hash, unsigned int *hash_len) + { + const EVP_MD *digest; +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#ifndef HAVE_OPENSSL_OPAQUE_STRUCTS + EVP_MD_CTX context; + + digest = EVP_get_digestbyname("sha512");