aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_ntlm_core.c
AgeCommit message (Collapse)Author
2017-04-21mbedtls: enable NTLM (& SMB) even if MD4 support is unavailableDan Fandrich
In that case, use libcurl's internal MD4 routine. This fixes tests 1013 and 1014 which were failing due to configure assuming NTLM and SMB were always available whenever mbed TLS was in use (which is now true).
2017-03-29NTLM: check for features with #ifdef instead of #ifMarcel Raad
Feature defines are normally checked with #ifdef instead of #if in the rest of the codebase. Additionally, some compilers warn when a macro is implicitly evaluated to 0 because it is not defined, which was the case here. Ref: https://github.com/curl/curl/pull/1362#discussion_r108605101 Closes https://github.com/curl/curl/pull/1367
2017-02-19string formatting: fix 4 printf-style format stringsMichael Kaufmann
2017-02-06use *.sourceforge.io and misc URL updatesViktor Szakats
Ref: https://sourceforge.net/blog/introducing-https-for-project-websites/ Closes: https://github.com/curl/curl/pull/1247
2016-12-13checksrc: stricter no-space-before-paren enforcementDaniel Stenberg
In order to make the code style more uniform everywhere
2016-10-31strcasecompare: all case insensitive string compares ignore locale nowDaniel Stenberg
We had some confusions on when each function was used. We should not act differently on different locales anyway.
2016-08-03mbedtls: Added support for NTLMBill Nagel
2016-06-22internals: rename the SessionHandle struct to Curl_easyDaniel Stenberg
2016-04-29lib: include curl_printf.h as one of the last headersDaniel Stenberg
curl_printf.h defines printf to curl_mprintf, etc. This can cause problems with external headers which may use __attribute__((format(printf, ...))) markers etc. To avoid that they cause problems with system includes, we include curl_printf.h after any system headers. That makes the three last headers to always be, and we keep them in this order: curl_printf.h curl_memory.h memdebug.h None of them include system headers, they all do funny #defines. Reported-by: David Benjamin Fixes #743
2016-04-06URLs: change http to https in many placesViktor Szakats
Closes #754
2016-02-09openssl: remove most BoringSSL #ifdefs.David Benjamin
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
2016-02-03URLs: change all http:// URLs to https://Daniel Stenberg
2015-11-05curl_ntlm_core: fix 2 curl_off_t constant overflows.Patrick Monnerat
2015-10-09ntlm: error out without 64bit support as the code needs itDaniel Stenberg
It makes it a clearer message for developers reaching that point without the necessary support. Thanks-by: Jay Satiro Closes #78
2015-10-08ntlm: get rid of unconditional use of long longDaniel Stenberg
... since some compilers don't have it and instead use other types, such as __int64. Reported by: gkinseyhpw Closes #478
2015-08-22NTLM: recent boringssl brought DES_set_odd_parity backDaniel Stenberg
... so improve the #ifdefs for using our local implementation.
2015-03-24curl_memory: make curl_memory.h the second-last header file loadedDan Fandrich
This header file must be included after all header files except memdebug.h, as it does similar memory function redefinitions and can be similarly affected by conflicting definitions in system or dependent library headers.
2015-03-16free: instead of Curl_safefree()Daniel Stenberg
Since we just started make use of free(NULL) in order to simplify code, this change takes it a step further and: - converts lots of Curl_safefree() calls to good old free() - makes Curl_safefree() not check the pointer before free() The (new) rule of thumb is: if you really want a function call that frees a pointer and then assigns it to NULL, then use Curl_safefree(). But we will prefer just using free() from now on.
2015-03-05openssl: remove all uses of USE_SSLEAYDaniel Stenberg
SSLeay was the name of the library that was subsequently turned into OpenSSL many moons ago (1999). curl does not work with the old SSLeay library since years. This is now reflected by only using USE_OPENSSL in code that depends on OpenSSL.
2015-03-03mprintf.h: remove #ifdef CURLDEBUGDaniel Stenberg
... and as a consequence, introduce curl_printf.h with that re-define magic instead and make all libcurl code use that instead.
2015-02-03unit1600: unit test for Curl_ntlm_core_mk_nt_hashDaniel Stenberg
2015-01-28ntlm_core: Use own odd parity function when crypto engine doesn't have oneSteve Holme
2015-01-28ntlm_core: Prefer sizeof(key) rather than hard coded sizesSteve Holme
2015-01-28ntlm_core: Added consistent comments to DES functionsSteve Holme
2015-01-02curl_ntlm_core.c: Fixed compilation warning from commit 1cb17b2a5dSteve Holme
curl_ntlm_core.c:146: warning: passing 'DES_cblock' (aka 'unsigned char [8]') to parameter of type 'char *' converts between pointers to integer types with different sign
2015-01-02ntlm: Use extend_key_56_to_64() for all cryptography enginesSteve Holme
Rather than duplicate the code in setup_des_key() for OpenSSL and in extend_key_56_to_64() for non-OpenSSL based crypto engines, as it is the same, use extend_key_56_to_64() for all engines.
2015-01-02curl_ntlm_core.c: Fixed compilation warningSteve Holme
curl_ntlm_core.c:458: warning: 'ascii_uppercase_to_unicode_le' defined but not used
2014-12-31endian: Fixed Linux compilation issuesSteve Holme
Having files named endian.[c|h] seemed to cause issues under Linux so renamed them both to have the curl_ prefix in the filenames.
2014-12-31endian: Renamed functions for curl API naming conventionSteve Holme
2014-12-31endian: Moved write functions to new moduleSteve Holme
2014-12-24curl_ntlm_core.c: Fixed compilation warningsSteve Holme
curl_ntlm_core.c:301: warning: pointer targets in passing argument 2 of 'CryptImportKey' differ in signedness curl_ntlm_core.c:310: warning: passing argument 6 of 'CryptEncrypt' from incompatible pointer type curl_ntlm_core.c:540: warning: passing argument 4 of 'CryptGetHashParam' from incompatible pointer type
2014-12-12ntlm: Disable NTLM v2 when 64-bit integers are not supportedSteve Holme
This fixes compilation issues with compilers that don't support 64-bit integers through long long or __int64 which was introduced in commit 07b66cbfa4.
2014-12-07smb: Fixed Windows autoconf builds following commit eb88d778e7Steve Holme
As Windows based autoconf builds don't yet define USE_WIN32_CRYPTO either explicitly through --enable-win32-cypto or automatically on _WIN32 based platforms, subsequent builds broke with the following error message: "Can't compile NTLM support without a crypto library."
2014-12-07ntlm: Use Windows Crypt APIBill Nagel
Allow the use of the Windows Crypt API for NTLMv1 functions.
2014-12-05OS400: enable NTLM authenticationPatrick Monnerat
2014-10-26ntlm: Return CURLcode from Curl_ntlm_core_mk_lm_hash()Steve Holme
2014-10-26ntlm: Use 'CURLcode result'Steve Holme
Continuing commit 0eb3d15ccb more return code variable name changes.
2014-06-11NTLM: set a fake entropy for debug builds with CURL_ENTROPY setDaniel Stenberg
Curl_rand() will return a dummy and repatable random value for this case. Makes it possible to write test cases that verify output. Also, fake timestamp with CURL_FORCETIME set. Only when built debug enabled of course. Curl_ssl_random() was not used anymore so it has been removed. Curl_rand() is enough. create_digest_md5_message: generate base64 instead of hex string curl_sasl: also fix memory leaks in some OOM situations
2014-05-04curl_ntlm_core: Fixed use of long long for VC6 and VC7Steve Holme
Commit 07b66cbfa4 unfortunately broke native NTLM message support in compilers, such as VC6, VC7 and others, that don't support long long type declarations. This commit fixes VC6 and VC7 as they support the __int64 extension, however, we should consider an additional fix for other compilers that don't support this.
2014-01-29NTLM: error: conversion to 'int' from 'long int' may alter its valueDaniel Stenberg
Fixed two compiler nits
2014-01-29ntlm: Use a timestamp of 01/01/1970 for the test suiteSteve Holme
2014-01-29ntlm: Updated Curl_ntlm_core_mk_ntlmv2_resp() to use local variablesSteve Holme
...until the function is successful when it returns them in the out parameters.
2014-01-29ntlm: Added cross platform support for writing NTLMv2 timestamp in bufferSteve Holme
Added conversion functions write32_le() and write64_le() to ensure the NTLMv2 timestamp is always written in little-endian.
2014-01-29ntlm: Added support for NTLMv2Prash Dush
2013-02-16ntlm_core: fix compiler warning when building with clangNick Zitzmann
Fixed a 64-to-32 compiler warning raised when building with clang and the --with-darwinssl option.
2013-01-09build: fix circular header inclusion with other packagesYang Tse
This commit renames lib/setup.h to lib/curl_setup.h and renames lib/setup_once.h to lib/curl_setup_once.h. Removes the need and usage of a header inclusion guard foreign to libcurl. [1] Removes the need and presence of an alarming notice we carried in old setup_once.h [2] ---------------------------------------- 1 - lib/setup_once.h used __SETUP_ONCE_H macro as header inclusion guard up to commit ec691ca3 which changed this to HEADER_CURL_SETUP_ONCE_H, this single inclusion guard is enough to ensure that inclusion of lib/setup_once.h done from lib/setup.h is only done once. Additionally lib/setup.h has always used __SETUP_ONCE_H macro to protect inclusion of setup_once.h even after commit ec691ca3, this was to avoid a circular header inclusion triggered when building a c-ares enabled version with c-ares sources available which also has a setup_once.h header. Commit ec691ca3 exposes the real nature of __SETUP_ONCE_H usage in lib/setup.h, it is a header inclusion guard foreign to libcurl belonging to c-ares's setup_once.h The renaming this commit does, fixes the circular header inclusion, and as such removes the need and usage of a header inclusion guard foreign to libcurl. Macro __SETUP_ONCE_H no longer used in libcurl. 2 - Due to the circular interdependency of old lib/setup_once.h and the c-ares setup_once.h header, old file lib/setup_once.h has carried back from 2006 up to now days an alarming and prominent notice about the need of keeping libcurl's and c-ares's setup_once.h in sync. Given that this commit fixes the circular interdependency, the need and presence of mentioned notice is removed. All mentioned interdependencies come back from now old days when the c-ares project lived inside a curl subdirectory. This commit removes last traces of such fact.
2013-01-06Revert changes relative to lib/*.[ch] recent renamingYang Tse
This reverts renaming and usage of lib/*.h header files done 28-12-2012, reverting 2 commits: f871de0... build: make use of 76 lib/*.h renamed files ffd8e12... build: rename 76 lib/*.h files This also reverts removal of redundant include guard (redundant thanks to changes in above commits) done 2-12-2013, reverting 1 commit: c087374... curl_setup.h: remove redundant include guard This also reverts renaming and usage of lib/*.c source files done 3-12-2013, reverting 3 commits: 13606bb... build: make use of 93 lib/*.c renamed files 5b6e792... build: rename 93 lib/*.c files 7d83dff... build: commit 13606bbfde follow-up 1 Start of related discussion thread: http://curl.haxx.se/mail/lib-2013-01/0012.html Asking for confirmation on pushing this revertion commit: http://curl.haxx.se/mail/lib-2013-01/0048.html Confirmation summary: http://curl.haxx.se/mail/lib-2013-01/0079.html NOTICE: The list of 2 files that have been modified by other intermixed commits, while renamed, and also by at least one of the 6 commits this one reverts follows below. These 2 files will exhibit a hole in history unless git's '--follow' option is used when viewing logs. lib/curl_imap.h lib/curl_smtp.h
2013-01-03build: make use of 93 lib/*.c renamed filesYang Tse
93 *.c source files renamed to use our standard naming scheme. This change affects 77 files in libcurl's source tree.
2012-12-28build: make use of 76 lib/*.h renamed filesYang Tse
76 private header files renamed to use our standard naming scheme. This change affects 322 files in libcurl's source tree.
2012-06-27DarwinSSL: allow using NTLM authenticationNick Zitzmann
Allow NTLM authentication when building using SecureTransport (Darwin) for SSL. This uses CommonCrypto, a cryptography library that ships with all versions of iOS and Mac OS X. It's like OpenSSL's libcrypto, except that it's missing a few less-common cyphers and doesn't have a big number data structure.