summaryrefslogtreecommitdiff
path: root/lib/md5.c
Commit message (Collapse)AuthorAgeFilesLines
* md(4|5): don't use deprecated iOS functionsMarcel Raad2023-05-131-3/+5
| | | | | | | | | | | They are marked as deprecated in iOS 13.0, which might result in warnings-as-errors. Also, use `*_MIN_REQUIRED` instead of `*_MIN_ALLOWED`, which seems to be what's currently used. Bug: https://github.com/curl/curl/issues/11098 Closes https://github.com/curl/curl/pull/11102
* copyright: update all copyright lines and remove year rangesDaniel Stenberg2023-01-031-1/+1
| | | | | | | | | | | | - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - saves us from pointless churn - git keeps history for us - the year range is kept in COPYING checksrc is updated to allow non-year using copyright statements Closes #10205
* misc: remove duplicated include filesDaniel Stenberg2022-10-261-41/+24
| | | | Closes #9796
* amissl: make AmiSSL v5 a minimum requirementFutaura2022-08-081-1/+1
| | | | | | | | | | AmiSSL v5 is the latest version, featuring a port of OpenSSL 3.0. Support for previous OpenSSL 1.1.x versions has been dropped, so makes sense to enforce v5 as the minimum requirement. This also allows all the AmiSSL stub workarounds to be removed as they are now provided in a link library in the AmiSSL SDK. Closes #9267
* copyright: make repository REUSE compliantmax.mehl2022-06-131-0/+2
| | | | | | | | | | | Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the file `.reuse/dep5`. This commit also adds a Github workflow to check pull requests and adapts copyright.pl to the changes. Closes #8869
* md5: check md5_init_func return valueJay Satiro2022-01-231-14/+33
| | | | | | | Prior to this change the md5_init_func (my_md5_init) return value was ignored. Closes https://github.com/curl/curl/pull/8319
* md5: refactor for standard complianceJay Satiro2022-01-231-45/+67
| | | | | | | | | | | | | | | | | | | - Wrap OpenSSL / wolfSSL MD5 functions instead of taking their function addresses during static initialization. Depending on how curl was built the old way may have used a dllimport function address during static initialization, which is not standard compliant, resulting in Visual Studio warning C4232 (nonstandard extension). Instead the function pointers now point to the wrappers which call the MD5 functions. This change only affects OpenSSL and wolfSSL because calls to other SSL libraries' md5 functions were already wrapped. Also sha256.c already does this for all SSL libraries. Ref: https://github.com/curl/curl/pull/8298 Closes https://github.com/curl/curl/pull/8318
* misc: allow curl to build with wolfssl --enable-opensslextraHarry Sarson2022-01-211-1/+6
| | | | | | | | | put all #include of openssl files behind wolfssl ifdefs so that we can use the wolfssl/ prefixed include paths. Without these curl only builds when wolfssl is built with enable-all. Fixes #8292 Closes #8315
* sha256/md5: return errors when init failsx20182021-12-131-7/+16
| | | | Closes #8133
* md5: fix compilation with OpenSSL 3.0 APIMarcel Raad2021-10-071-7/+15
| | | | | | | | | | Only use OpenSSL's MD5 code if it's available. Also fix wolfSSL build with `NO_MD5`, in which case neither the wolfSSL/OpenSSL implementation nor the fallback implementation was used. Closes https://github.com/curl/curl/pull/7808
* wolfssl: use for SHA256, MD4, MD5, and setting DES odd parityHayden Roche2021-10-021-2/+9
| | | | | | | | Prior to this commit, OpenSSL could be used for all these functions, but not wolfSSL. This commit makes it so wolfSSL will be used if USE_WOLFSSL is defined. Closes #7806
* mbedTLS: initial 3.0.0 supportBenau2021-08-091-4/+5
| | | | Closes #7428
* gnutls: assume nettle crypto supportDaniel Stenberg2021-02-181-29/+2
| | | | | | | nettle has been the default crypto library with GnuTLS since 2010. By dropping support for the previous libcrypto, we simplify code. Closes #6625
* curl.se: new homeDaniel Stenberg2020-11-041-1/+1
| | | | Closes #6172
* md(4|5): don't use deprecated macOS functionsMarcel Raad2020-07-191-1/+3
| | | | | | | They are marked as deprecated for -mmacosx-version-min >= 10.15, which might result in warnings-as-errors. Closes https://github.com/curl/curl/pull/5695
* source cleanup: remove all custom typedef structsDaniel Stenberg2020-05-151-10/+12
| | | | | | | | | | | - Stick to a single unified way to use structs - Make checksrc complain on 'typedef struct {' - Allow them in tests, public headers and examples - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually typedef different types/structs depending on build conditions. Closes #5338
* windows: suppress UI in all CryptAcquireContext() callsViktor Szakats2020-03-171-2/+2
| | | | | | Ref: https://docs.microsoft.com/windows/win32/api/wincrypt/nf-wincrypt-cryptacquirecontexta#parameters Reviewed-by: Marc Hörsken Closes https://github.com/curl/curl/pull/5088
* md5: Added implementation for mbedTLSSteve Holme2020-02-291-0/+50
| | | | | Reviewed-by: Jay Satiro Closes #4980
* md5: Use pointer notation for array parameters in GnuTLS implementationSteve Holme2020-02-291-4/+4
|
* md5/sha256: Updated the functions to allow non-string data to be hashedSteve Holme2020-02-231-3/+4
|
* win32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functionsSteve Holme2020-02-201-2/+2
| | | | | | | | | Whilst lib\md4.c used this pre-processor, lib\md5.c and src\tool_metalink.c did not and simply relied on the WIN32 pre-processor directive. Reviewed-by: Marcel Raad Closes #4955
* lib: reduce variable scopesMarcel Raad2019-05-201-3/+4
| | | | | | Fixes Codacy/CppCheck warnings. Closes https://github.com/curl/curl/pull/3872
* md5: Forgot to update the code alignment in d84da52dSteve Holme2019-04-151-2/+2
|
* md5: Return CURLcode from the internally accessible functionsSteve Holme2019-04-151-2/+2
| | | | Following 28f826b3 to return CURLE_OK instead of numeric 0.
* md(4|5): Fixed indentation oddities with the importation of replacement codeSteve Holme2019-04-141-65/+65
| | | | | | | The indentation from 211d5329 and 57d6d253 was a little strange as parts didn't align correctly, uses 4 spaces rather than 2. Checked the indentation of the original source so it aligns, albeit, using curl style.
* md5: Code style to return CURLE_OK rather than numeric 0Steve Holme2019-04-141-2/+2
|
* md5: Corrected code style for some pointer argumentsSteve Holme2019-04-141-6/+6
|
* build: fix Codacy/CppCheck warningsMarcel Raad2019-04-111-1/+1
| | | | | | | | | | - remove unused variables - declare conditionally used variables conditionally - suppress unused variable warnings in the CMake tests - remove dead variable stores - consistently use WIN32 macro to detect Windows Closes https://github.com/curl/curl/pull/3739
* configure: add --with-amisslChris Young2019-03-151-2/+2
| | | | | | | | | | AmiSSL is an Amiga native library which provides a wrapper over OpenSSL. It also requires all programs using it to use bsdsocket.library directly, rather than accessing socket functions through clib, which libcurl was not necessarily doing previously. Configure will now check for the headers and ensure they are included if found. Closes #3677
* axtls: removedDaniel Stenberg2018-11-011-7/+0
| | | | | | | | | | As has been outlined in the DEPRECATE.md document, the axTLS code has been disabled for 6 months and is hereby removed. Use a better supported TLS library! Assisted-by: Daniel Gustafsson Closes #3194
* secure Openwall URLsViktor Szakats2018-09-141-1/+1
|
* GCC: silence -Wcast-function-type uniformlyMarcel Raad2018-08-111-16/+22
| | | | | Pointed-out-by: Rikard Falkeborn Closes https://github.com/curl/curl/pull/2860
* checksrc: make sure sizeof() is used *with* parenthesesDaniel Stenberg2018-05-211-1/+1
| | | | | | ... and unify the source code to adhere. Closes #2563
* gcc: disable picky gcc-8 function pointer warnings in two placesDaniel Stenberg2018-05-141-1/+6
| | | | | | Reported-by: Rikard Falkeborn Bug: #2560 Closes #2569
* MD(4|5): silence cast-align clang warningMarcel Raad2017-06-021-1/+1
| | | | | | Unaligned access is on purpose here and the warning is harmless on affected architectures. GCC knows that, while clang warns on all architectures.
* checksrc: warn for assignments within if() expressionsDaniel Stenberg2016-12-141-1/+2
| | | | | ... they're already frowned upon in our source code style guide, this now enforces the rule harder.
* checksrc: code style: use 'char *name' styleDaniel Stenberg2016-11-241-2/+2
|
* win: Basic support for Universal Windows Platform appsMarco Deckel2016-08-211-1/+1
| | | | Closes #820
* memdebug: Ensure curl/curl.h is included before curl_memory.hSteve Holme2016-04-011-1/+3
| | | | Follow up to commit 7db9782dd6.
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-031-1/+1
|
* curl_memory: make curl_memory.h the second-last header file loadedDan Fandrich2015-03-241-5/+18
| | | | | | | 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.
* axtls: version 1.5.2 now requires that config.h be manually includedDan Fandrich2015-03-191-0/+1
|
* openssl: remove all uses of USE_SSLEAYDaniel Stenberg2015-03-051-7/+2
| | | | | | | 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.
* md5: use axTLS's own MD5 functions when availableDaniel Stenberg2015-02-061-0/+3
|
* MD(4|5): make the MD4_* and MD5_* functions staticDaniel Stenberg2015-02-061-6/+6
|
* MD5: fix compiler warnings and code style nitsDaniel Stenberg2015-02-041-184/+184
|
* MD5: replace implementationDaniel Stenberg2015-02-041-269/+273
| | | | | | | | | The previous one was "encumbered" by RSA Inc - to avoid the licensing restrictions it has being replaced. This is the initial import, inserting the md5.c and md5.h files from http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 Code-by: Alexander Peslyak
* unit1601: MD5 unit testsDaniel Stenberg2015-02-031-0/+3
|
* md5.c: fix use of uninitialized variableMarc Hoersken2014-04-181-1/+1
|
* md5: remove use of CommonCrypto-to-OpenSSL macros for the benefit of LeopardNick Zitzmann2013-08-051-5/+22
| | | | | | | | For some reason, OS X 10.5's GCC suddenly stopped working correctly with macros that change MD5_Init etc. in the code to CC_MD5_Init etc., so I worked around this by removing use of the macros and inserting static functions that just call CommonCrypto's implementations of the functions instead.