summaryrefslogtreecommitdiff
path: root/ext/standard/php_crypt_r.c
Commit message (Collapse)AuthorAgeFilesLines
* Add "const". Move constant strings to read-only memory.Dmitry Stogov2020-09-071-1/+1
|
* Clean house in cryptographic hashing codeAlex Dowad2020-06-241-203/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove dead code from php_crypt_r.c This code has been commented out since the file was added in 2008. It's safe to say that no-one is ever going to use it. - Fix typo in comment in php_crypt_r.c - Remove redundant Windows-only implementation of php_md5_crypt_r There is a portable implementation in the same file, which is selected if not building for Windows. But why should Windows have its own special implementation of this function at all? There doesn't seem to be any good reason. Better to use the portable implementation on all platforms. - Don't define useless __CONST macro in php_crypt_r.h This preprocessor macro is not used anywhere. - Add comment on functions for encoding data as Base64 - Remove dead code from crypt_blowfish.h - Remove unneeded junk comments from crypt_freesec.c - Remove dead code from crypt_blowfish.c This function has been commented out since 2011.
* Simplify `_crypt_extended_init_r`, and fix redundant initialization on ↵Alex Dowad2020-06-231-20/+3
| | | | | | | | | | | | | | | | | | | | | | Win32/Solaris Looking at the history of this function, the original implementation had a bug where it would return from the middle of the function without unlocking the mutex first. The author attempted to fix this by incrementing the `initialized` flag atomically, which is not necessary, since the section which modifies the flag is protected by a mutex. Coincidentally, at the same time that all this unnecessary 'atomic' machinery was introduced, the code was also changed so that it didn't return without unlocking the mutex. So it looks like the bug was fixed by accident. It's not necessary to declare the flag as `volatile` either, since it is protected by a mutex. Further, the 'fixed' implementation was also wrong in another respect: on Windows and Solaris, the `initialized` flag was not even declared as `static`!! So the initialization of the static tables for S-boxes, P-boxes, etc. was repeated on each call to `php_crypt`, completely defeating the purpose of this function.
* Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
| | | | Closes GH-4732.
* Remove year range from copyright noticeZeev Suraski2019-01-301-1/+1
|
* Remove redundant continue in for loopsRijnard van Tonder2018-11-201-5/+2
|
* Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Remove unused Git attributes identPeter Kokot2018-07-251-1/+0
| | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* year++Xinchen Hui2018-01-021-1/+1
|
* Merge branch 'PHP-7.1'Xinchen Hui2017-04-101-2/+2
|\ | | | | | | | | | | | | | | | | | | * PHP-7.1: Fixed condition check Fixed condition check another place Conflicts: ext/mcrypt/mcrypt.c
| * Merge branch 'PHP-7.0' into PHP-7.1Xinchen Hui2017-04-101-2/+2
| |\ | | | | | | | | | | | | * PHP-7.0: Fixed condition check
| | * Fixed condition checkXinchen Hui2017-04-101-2/+2
| | |
| | * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
| * | Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
* | | Resolve conflictSammy Kaye Powers2017-01-031-1/+1
|\ \ \
| * | | let s use the macro insteadDavid Carlier2016-10-151-1/+1
| | | |
| * | | import explicit_bzero + strlc* functions updateDavid Carlier2016-10-151-1/+1
| |/ / | | | | | | | | | | | | since 1999 algorithms have changed and register k/w not necessary anymore.
* | | Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|/ /
* | Replace usage of php_int32 and php_uint32 with int32_t and uint32_tRouven Weßling2016-02-041-1/+1
|/
* Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
| * bump yearXinchen Hui2015-01-151-1/+1
| |
* | fix data type and warningAnatol Belski2015-09-251-3/+3
| |
* | fix thread safety and zeroing methodAnatol Belski2015-07-291-2/+2
| |
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | trailing whitespace removalStanislav Malyshev2015-01-101-4/+4
| |
* | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| |
* | generalized the case with secure memory zeroingAnatol Belski2014-09-191-2/+2
| |
* | better way to zero away sensitive dataAnatol Belski2014-09-141-2/+2
|/ | | | memset could be optimized away by the compiler
* Bump yearXinchen Hui2014-01-031-1/+1
|
* Happy New YearXinchen Hui2013-01-011-1/+1
|
* - Year++Felipe Pena2012-01-011-1/+1
|
* - Fixed bug #55874 (GCC does not provide __sync_fetch_and_add on some archs)Felipe Pena2011-11-151-2/+1
| | | | | patch by: klightspeed at netspace dot net dot au
* - Fixed bug #55231 (Unsatisfied symbols __sync_fetch_and_add_4)Felipe Pena2011-09-171-1/+1
|
* Unbreak crypt() (fix bug #55439)Stanislav Malyshev2011-08-191-1/+1
| | | | | | # If you want to remove static analyser messages, be my guest, # but please run unit tests after
* Fix more signed 1-bit bitfield, and let's use strlcpy/strlcat instead for theseRasmus Lerdorf2011-08-071-1/+1
| | | | | static string copies
* Make static analyzers happyRasmus Lerdorf2011-08-071-1/+1
|
* - Disable __sync_fetch_and_add for HPUX for now, gcc seems not provide ↵Felipe Pena2011-07-231-1/+1
| | | | __sync_fetch_and_add_4 for all targets
* - Fixed bug #55231 (Unsatisfied symbols __sync_fetch_and_add_4)Felipe Pena2011-07-191-1/+2
|
* - Fix #54721, different Hashes on Windows, BSD and Linux on wrong Salt sizePierre Joye2011-05-241-1/+1
|
* - Fixed bug #54895 (Fix compiling with older gcc version without need for ↵Felipe Pena2011-05-201-1/+1
| | | | | | | membar_producer macro) patch by: mhei at heimpold dot de
* - Year++Felipe Pena2011-01-011-1/+1
|
* - Fixed bug #53530 (php_crypt tests gcc version incorrectly due toGustavo André dos Santos Lopes2010-12-121-1/+1
| | | | | typo) (vapier at gmail dot com)
* - #51424, solaris partPierre Joye2010-06-171-1/+10
|
* - cleanup, no vc6 support in trunkPierre Joye2010-06-151-8/+1
|
* - #51424, silent warnings on winPierre Joye2010-06-151-1/+5
|
* - Fix #51424, crypt() function hangs after 3rd callPierre Joye2010-06-151-4/+6
|
* sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-031-1/+1
|
* - Fixed #50052, Different Hashes on Windows and Linux on wrong Salt sizePierre Joye2009-11-021-0/+1
|
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|