diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-10-04 12:41:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-10-10 12:04:01 +0000 |
commit | 175f96b00b04fae415f2ffc39de95bf545da1882 (patch) | |
tree | d5c448deb2a18f1b02be0c10743ffd3c73f80aef /main/mosquitto/libressl.patch | |
parent | e2673eed35a7814414f3a45e55d906b7b5a4daeb (diff) | |
download | aports-175f96b00b04fae415f2ffc39de95bf545da1882.tar.bz2 aports-175f96b00b04fae415f2ffc39de95bf545da1882.tar.xz |
main/mosquitto: rebuild against libressl
Diffstat (limited to 'main/mosquitto/libressl.patch')
-rw-r--r-- | main/mosquitto/libressl.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/main/mosquitto/libressl.patch b/main/mosquitto/libressl.patch new file mode 100644 index 0000000000..d052b2c545 --- /dev/null +++ b/main/mosquitto/libressl.patch @@ -0,0 +1,49 @@ +diff --git a/lib/mosquitto_internal.h b/lib/mosquitto_internal.h +index 4b4cf85..700bbb0 100644 +--- a/lib/mosquitto_internal.h ++++ b/lib/mosquitto_internal.h +@@ -25,6 +25,9 @@ Contributors: + + #ifdef WITH_TLS + # include <openssl/ssl.h> ++# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++# define HAVE_OPENSSL_OPAQUE_STRUCTS ++# endif + #else + # include <time.h> + #endif +diff --git a/src/mosquitto_passwd.c b/src/mosquitto_passwd.c +index de9a719..5b854d9 100644 +--- a/src/mosquitto_passwd.c ++++ b/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 a/src/security_default.c b/src/security_default.c +index 64ca846..9ad8708 100644 +--- a/src/security_default.c ++++ b/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"); |