aboutsummaryrefslogtreecommitdiff
path: root/lib/vauth
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2020-02-22 14:31:26 +0000
committerSteve Holme <steve_holme@hotmail.com>2020-02-23 07:52:19 +0000
commit2d432f7e499a3e04ff1a45d51a5c089e81fe66e7 (patch)
tree39882888d9a31fe4f4ab6feff1b35f5fe679a45f /lib/vauth
parent37dc4df270b0080442a9e36f9ea13855db9253e6 (diff)
ntlm: Removed the dependency on the TLS libaries when using MD5
As we have our own MD5 implementation use the MD5 wrapper to remove the TLS dependency. Closes #4967
Diffstat (limited to 'lib/vauth')
-rw-r--r--lib/vauth/ntlm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/vauth/ntlm.c b/lib/vauth/ntlm.c
index 047c2b5a3..8f9103806 100644
--- a/lib/vauth/ntlm.c
+++ b/lib/vauth/ntlm.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -40,6 +40,7 @@
#include "curl_ntlm_core.h"
#include "curl_gethostname.h"
#include "curl_multibyte.h"
+#include "curl_md5.h"
#include "warnless.h"
#include "rand.h"
#include "vtls/vtls.h"
@@ -621,11 +622,11 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
memcpy(tmp, &ntlm->nonce[0], 8);
memcpy(tmp + 8, entropy, 8);
- result = Curl_ssl_md5sum(tmp, 16, md5sum, MD5_DIGEST_LENGTH);
- if(!result)
- /* We shall only use the first 8 bytes of md5sum, but the des code in
- Curl_ntlm_core_lm_resp only encrypt the first 8 bytes */
- result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer);
+ Curl_md5it(md5sum, tmp, 16);
+
+ /* We shall only use the first 8 bytes of md5sum, but the des code in
+ Curl_ntlm_core_lm_resp only encrypt the first 8 bytes */
+ result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer);
if(result)
return result;