[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 186/282: md4: Use non-deprecated functions in mbedTLS >= 2.7.0
From: |
gnunet |
Subject: |
[gnurl] 186/282: md4: Use non-deprecated functions in mbedTLS >= 2.7.0 |
Date: |
Wed, 01 Apr 2020 14:30:51 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit f0ec0e902a9579227550f18ebdb5bbee50c3aca8
Author: Steve Holme <address@hidden>
AuthorDate: Wed Feb 26 18:24:31 2020 +0000
md4: Use non-deprecated functions in mbedTLS >= 2.7.0
Closes #4983
---
lib/md4.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/lib/md4.c b/lib/md4.c
index 87418647a..b33ec8415 100644
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -29,10 +29,16 @@
#ifdef USE_OPENSSL
#include <openssl/opensslconf.h>
-#endif
+#endif /* USE_OPENSSL */
+
#ifdef USE_MBEDTLS
#include <mbedtls/config.h>
+#include <mbedtls/version.h>
+
+#if(MBEDTLS_VERSION_NUMBER >= 0x02070000)
+ #define HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS
#endif
+#endif /* USE_MBEDTLS */
#if defined(USE_GNUTLS_NETTLE)
@@ -182,6 +188,7 @@ static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
#include <mbedtls/md4.h>
#include "curl_memory.h"
+
/* The last #include file should be: */
#include "memdebug.h"
@@ -210,7 +217,11 @@ static void MD4_Update(MD4_CTX *ctx, const void *data,
unsigned long size)
static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
{
if(ctx->data != NULL) {
+#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
mbedtls_md4(ctx->data, ctx->size, result);
+#else
+ (void) mbedtls_md4_ret(ctx->data, ctx->size, result);
+#endif
Curl_safefree(ctx->data);
ctx->size = 0;
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 173/282: RELEASE-NOTES: Corrected the link to issue #4892, (continued)
- [gnurl] 173/282: RELEASE-NOTES: Corrected the link to issue #4892, gnunet, 2020/04/01
- [gnurl] 176/282: runtests: restore the command log, gnunet, 2020/04/01
- [gnurl] 154/282: smtp: Added UTF-8 mailbox tests to verify existing behaviour, gnunet, 2020/04/01
- [gnurl] 167/282: test1323: Added the missing 'unit test' feature requirement in the test case, gnunet, 2020/04/01
- [gnurl] 177/282: tests: fix Python 3 compatibility of smbserver.py, gnunet, 2020/04/01
- [gnurl] 171/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 175/282: smtp: fix memory leak on exit path, gnunet, 2020/04/01
- [gnurl] 183/282: TODO: curl --proxycommand, gnunet, 2020/04/01
- [gnurl] 179/282: ci/tests: align Azure Pipeline job names with each other, gnunet, 2020/04/01
- [gnurl] 182/282: smtp: overwriting 'from' leaks memory, gnunet, 2020/04/01
- [gnurl] 186/282: md4: Use non-deprecated functions in mbedTLS >= 2.7.0,
gnunet <=
- [gnurl] 180/282: ci/tests: Increase timeouts of Windows builds due to new tests, gnunet, 2020/04/01
- [gnurl] 184/282: pause: force-drain the transfer on unpause, gnunet, 2020/04/01
- [gnurl] 181/282: CIfuzz: switch off 'dry_run' mode, gnunet, 2020/04/01
- [gnurl] 178/282: ci/tests: Add Windows builds via Azure Pipelines using Docker, gnunet, 2020/04/01
- [gnurl] 191/282: runtests: fix output to command log, gnunet, 2020/04/01
- [gnurl] 187/282: md5: Use pointer notation for array parameters in GnuTLS implementation, gnunet, 2020/04/01
- [gnurl] 190/282: polarssl: Additional removal, gnunet, 2020/04/01
- [gnurl] 170/282: http2: make pausing/unpausing set/clear local stream window, gnunet, 2020/04/01
- [gnurl] 168/282: tests: Automatically deduce the tool name from the test case for unit tests, gnunet, 2020/04/01
- [gnurl] 185/282: ci/tests: Send test results to Azure DevOps for reporting, gnunet, 2020/04/01