From 39c803cba216b91ff8233f6d5585468f8662d1c4 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Mon, 8 Feb 2016 23:19:31 -0500 Subject: openssl: remove most BoringSSL #ifdefs. As of https://boringssl-review.googlesource.com/#/c/6980/, almost all of BoringSSL #ifdefs in cURL should be unnecessary: - BoringSSL provides no-op stubs for compatibility which replaces most #ifdefs. - DES_set_odd_parity has been in BoringSSL for nearly a year now. Remove the compatibility codepath. - With a small tweak to an extend_key_56_to_64 call, the NTLM code builds fine. - Switch OCSP-related #ifdefs to the more generally useful OPENSSL_NO_OCSP. The only #ifdefs which remain are Curl_ossl_version and the #undefs to work around OpenSSL and wincrypt.h name conflicts. (BoringSSL leaves that to the consumer. The in-header workaround makes things sensitive to include order.) This change errs on the side of removing conditionals despite many of the restored codepaths being no-ops. (BoringSSL generally adds no-op compatibility stubs when possible. OPENSSL_VERSION_NUMBER #ifdefs are bad enough!) Closes #640 --- lib/curl_ntlm_core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/curl_ntlm_core.c') diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index fe976c97c..e79d1f64f 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -143,14 +143,10 @@ static void setup_des_key(const unsigned char *key_56, DES_cblock key; /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, (char *) key); + extend_key_56_to_64(key_56, (char *) &key); /* Set the key parity to odd */ -#ifndef HAVE_DES_SET_ODD_PARITY /* older boringssl */ - Curl_des_set_odd_parity((unsigned char *) &key, sizeof(key)); -#else DES_set_odd_parity(&key); -#endif /* Set the key */ DES_set_key(&key, ks); -- cgit v1.2.3