void-packages/srcpkgs/mosquitto/patches/fix-libressl.patch

36 lines
1.2 KiB
Diff
Raw Normal View History

--- src/security_default.c.orig 2016-10-09 08:20:06.369091258 +0200
+++ src/security_default.c 2016-10-09 08:19:55.795797957 +0200
@@ -795,13 +795,13 @@ int _pw_digest(const char *password, con
return 1;
}
- context = EVP_MD_CTX_new();
+ context = EVP_MD_CTX_create();
EVP_DigestInit_ex(context, digest, NULL);
EVP_DigestUpdate(context, password, strlen(password));
EVP_DigestUpdate(context, salt, salt_len);
/* hash is assumed to be EVP_MAX_MD_SIZE bytes long. */
EVP_DigestFinal_ex(context, hash, hash_len);
- EVP_MD_CTX_free(context);
+ EVP_MD_CTX_destroy(context);
#endif
return MOSQ_ERR_SUCCESS;
--- src/mosquitto_passwd.c.orig 2016-10-09 08:20:35.189890751 +0200
+++ src/mosquitto_passwd.c 2016-10-09 08:18:56.799161385 +0200
@@ -125,12 +125,12 @@ int output_new_password(FILE *fptr, cons
EVP_DigestFinal_ex(&context, hash, &hash_len);
EVP_MD_CTX_cleanup(&context);
#else
- context = EVP_MD_CTX_new();
+ context = EVP_MD_CTX_create();
EVP_DigestInit_ex(context, digest, NULL);
EVP_DigestUpdate(context, password, strlen(password));
EVP_DigestUpdate(context, salt, SALT_LEN);
EVP_DigestFinal_ex(context, hash, &hash_len);
- EVP_MD_CTX_free(context);
+ EVP_MD_CTX_destroy(context);
#endif
rc = base64_encode(hash, hash_len, &hash64);