]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
NTLM: use DES_set_key_unchecked with OpenSSL
authorDaniel Stenberg <daniel@haxx.se>
Mon, 27 Sep 2021 14:08:39 +0000 (16:08 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 27 Sep 2021 20:34:20 +0000 (22:34 +0200)
... as the previously used function DES_set_key() will in some cases
reject using a key that it deems "weak" which will cause curl to
continue using the unitialized buffer content as key instead.

Assisted-by: Harry Sintonen
Fixes #7779
Closes #7781

lib/curl_ntlm_core.c

index 749b44e4a923b7c157e0de8ab803caef490edf54..70e360f2485d6905e0d259a588fbcdd02766f97b 100644 (file)
@@ -150,7 +150,7 @@ static void setup_des_key(const unsigned char *key_56,
   DES_set_odd_parity(&key);
 
   /* Set the key */
-  DES_set_key(&key, ks);
+  DES_set_key_unchecked(&key, ks);
 }
 
 #elif defined(USE_GNUTLS)