ports/net/mosquitto/files/patch-support-libressl
Steve Wills 8b8dc3223e net/mosquitto update to 1.4.14
While here, make it PREFIX clean.

PR:		224210
Submitted by:	Manuel Stühn <freebsd@justmail.de>
Approved by:	Joseph Benden <joe@thrallingpenguin.com>
2017-12-11 04:01:46 +00:00

36 lines
1.3 KiB
Text

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 2017-07-10 22:46:01 UTC
+++ src/mosquitto_passwd.c
@@ -90,7 +90,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;
@@ -117,7 +117,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 2017-07-10 22:46:01 UTC
+++ src/security_default.c
@@ -790,7 +790,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");