aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2018-11-01 23:16:52 +0800
committerswills <swills@FreeBSD.org>2018-11-01 23:16:52 +0800
commitd8b654e608081f8f0b1437a48d0ac3e6009400f9 (patch)
tree1c67c6ade49220f5ae2890089fcf94515da2db78
parentbd122ee6eee5fc2b280bd81e2e11da7d19c7b22f (diff)
downloadfreebsd-ports-gnome-d8b654e608081f8f0b1437a48d0ac3e6009400f9.tar.gz
freebsd-ports-gnome-d8b654e608081f8f0b1437a48d0ac3e6009400f9.tar.zst
freebsd-ports-gnome-d8b654e608081f8f0b1437a48d0ac3e6009400f9.zip
net/mosquitto: Fix OpenSSL build
PR: 232168 Submitted by: Nathan <ndowens@yahoo.com> Approved by: joe@thrallingpenguin.com (maintainer)
-rw-r--r--net/mosquitto/Makefile1
-rw-r--r--net/mosquitto/files/patch-src_mosquitto__passwd.c33
-rw-r--r--net/mosquitto/files/patch-src_security__default.c11
-rw-r--r--net/mosquitto/files/patch-support-libressl36
4 files changed, 45 insertions, 36 deletions
diff --git a/net/mosquitto/Makefile b/net/mosquitto/Makefile
index 382fc043f7cf..45789e4162b1 100644
--- a/net/mosquitto/Makefile
+++ b/net/mosquitto/Makefile
@@ -3,6 +3,7 @@
PORTNAME= mosquitto
PORTVERSION= 1.5.3
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://mosquitto.org/files/source/
diff --git a/net/mosquitto/files/patch-src_mosquitto__passwd.c b/net/mosquitto/files/patch-src_mosquitto__passwd.c
new file mode 100644
index 000000000000..bbd83b080207
--- /dev/null
+++ b/net/mosquitto/files/patch-src_mosquitto__passwd.c
@@ -0,0 +1,33 @@
+ lib/mosquitto_internal.h | 3 +++
+ src/mosquitto_passwd.c | 4 ++--
+ src/security_default.c | 2 +-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+--- src/mosquitto_passwd.c.orig 2018-10-11 00:27:05 UTC
++++ src/mosquitto_passwd.c
+@@ -17,6 +17,7 @@ Contributors:
+ #include "config.h"
+
+ #include <errno.h>
++#include <openssl/opensslv.h>
+ #include <openssl/evp.h>
+ #include <openssl/rand.h>
+ #include <openssl/buffer.h>
+@@ -99,7 +100,7 @@ int output_new_password(FILE *fptr, const char *userna
+ unsigned char hash[EVP_MAX_MD_SIZE];
+ unsigned int hash_len;
+ const EVP_MD *digest;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#ifdef HAVE_OPENSSL_OPAQUE_STRUCTS
+ EVP_MD_CTX context;
+ #else
+ EVP_MD_CTX *context;
+@@ -126,7 +127,7 @@ int output_new_password(FILE *fptr, const char *userna
+ return 1;
+ }
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ EVP_MD_CTX_init(&context);
+ EVP_DigestInit_ex(&context, digest, NULL);
+ EVP_DigestUpdate(&context, password, strlen(password));
diff --git a/net/mosquitto/files/patch-src_security__default.c b/net/mosquitto/files/patch-src_security__default.c
new file mode 100644
index 000000000000..f8e8a03e1cbd
--- /dev/null
+++ b/net/mosquitto/files/patch-src_security__default.c
@@ -0,0 +1,11 @@
+--- src/security_default.c.orig 2018-10-11 00:28:56 UTC
++++ src/security_default.c
+@@ -18,7 +18,7 @@ Contributors:
+
+ #include <stdio.h>
+ #include <string.h>
+-
++#include <openssl/opensslv.h>
+ #include "mosquitto_broker_internal.h"
+ #include "memory_mosq.h"
+ #include "util_mosq.h"
diff --git a/net/mosquitto/files/patch-support-libressl b/net/mosquitto/files/patch-support-libressl
deleted file mode 100644
index 2d3a54e5cf3b..000000000000
--- a/net/mosquitto/files/patch-support-libressl
+++ /dev/null
@@ -1,36 +0,0 @@
- lib/mosquitto_internal.h | 3 +++
- src/mosquitto_passwd.c | 4 ++--
- src/security_default.c | 2 +-
- 3 files changed, 6 insertions(+), 3 deletions(-)
-
---- src/mosquitto_passwd.c.orig 2018-09-25 15:27:43 UTC
-+++ src/mosquitto_passwd.c
-@@ -99,7 +99,7 @@ int output_new_password(FILE *fptr, const char *userna
- 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;
-@@ -126,7 +126,7 @@ int output_new_password(FILE *fptr, const char *userna
- 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));
---- src/security_default.c.orig 2018-09-25 15:27:43 UTC
-+++ src/security_default.c
-@@ -958,7 +958,7 @@ int mosquitto_psk_key_get_default(struct mosquitto_db
- 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");