Commit Graph

147 Commits

Author SHA1 Message Date
Anatol Belski
901a551bda Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Implement github PR #1736
2017-01-07 15:40:00 +01:00
Anatol Belski
486fc0424a Implement github PR #1736
This fixes leak issues on *BSD systems, as described in the PR.
2017-01-07 15:36:14 +01:00
Leigh
eba6e7ce9a Split rand and mt_rand into separate files 2016-07-05 11:16:37 +01:00
Nikita Popov
be7a50b9ab Move HAVE_ATTRIBUTE_ALIGNED check outside crypt block
This is checked outside the crypt() implementation as well.
2016-03-25 20:50:52 +01:00
Nikita Popov
786effaff6 Remove PHP_*_CRYPT constants
They are always 1.
2016-03-25 20:48:34 +01:00
Nikita Popov
a142c274fb Ensure that all crypt() formats are supported
Checks for md5, sha512 and sha256 were missing.

As a result the PHP_*_CRYPT constants are always 1 now.
2016-03-25 20:39:14 +01:00
Nikita Popov
159602bd86 Merge branch 'PHP-5.6' into PHP-7.0 2016-03-03 17:29:58 +01:00
Anton Blanchard
ccd215a517 Additional improvements to crypt() detection code
Reformat to normalize tabs vs spaces, return 1 if crypt.h not
defined, fix C99 compliance.
2016-03-03 17:28:34 +01:00
Nikita Popov
5a01605b4b Merge branch 'PHP-5.6' into PHP-7.0 2016-03-03 17:14:18 +01:00
Michael Orlitzky
08fce8e2c5 ext/standard/config.m4: fix crypt() test segfaults in >=glibc-2.17.
Starting with glibc-2.17, the crypt() function will report an EINVAL
and return NULL when the format of the "salt" parameter is
invalid. The current tests for crypt() pass its result to strcmp(),
causing segfaults when the value returned from crypt() is NULL.

This commit modifies the test programs to exit with failure when
crypt() returns NULL.

Reference: https://bugs.gentoo.org/show_bug.cgi?id=518964
2016-03-03 17:12:57 +01:00
Leigh
faf835be2b Use arc4random on OpenBSD 5.5+ and NetBSD 7+
As discussed with @weltling, keeping arc4random on the condition that the OS has a solid implementation of it
2015-10-30 19:08:20 +00:00
Leigh
a53510239f Remove arc4random
There has been a lot of discussion around whether arc4random should be included. Given how many different impementations of it are in the wild, we can't guarantee a secure implementation on all platforms.
2015-10-26 20:40:28 +00:00
Scott
6554f721f7 Add support for getrandom(2), add type check on file descriptor
Fix to_read, throw exception if syscall fails

Fixes thanks to feedback from sarnold at ##crypto on freenode

Correction on error conditions

Remove dead code (thanks @defuse)

It turns out getrandom can take >256, getentropy refuses.

Better semantics

Thanks @defuse for catching my silly mistake here

Cast to size_t to be explicit

Let's simplify the logic a bit

Let's be consistent; define everything before we do any logic

Continuously check that the file descriptor is still a valid one

Add device type check on fd initialization
2015-09-29 09:14:28 +02:00
Leigh
5f1b83e9bb Improve CSPRNG implementation 2015-05-09 21:57:59 +02:00
SammyK
bc54d139aa Initial implementation for CSPRNG API 2015-05-09 21:57:50 +02:00
Felipe Pena
85aab94d81 - Fix merge 2015-02-17 01:11:48 -02:00
Felipe Pena
0c01fca444 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  - Fixed bug #67827 (broken detection of system crypt sha256/sha512 support)
  - Fixed bug #67427 (SoapServer cannot handle large messages) patch by: brandt at docoloc dot de
  Update NEWS
2015-02-17 00:28:28 -02:00
Felipe Pena
a331ae4630 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed bug #67827 (broken detection of system crypt sha256/sha512 support)
  - Fixed bug #67427 (SoapServer cannot handle large messages) patch by: brandt at docoloc dot de
  Update NEWS
2015-02-17 00:28:11 -02:00
Felipe Pena
8f9ab04d93 - Fixed bug #67827 (broken detection of system crypt sha256/sha512 support) 2015-02-17 00:23:47 -02:00
Michael Wallner
4137956d0e fix detection of mbstate_t with clang
AC_TRY_COMPILE expexts a function body
2015-02-15 09:25:03 +01:00
Michael Wallner
3121116a93 fix detection of mbstate_t with clang
AC_TRY_COMPILE expexts a function body
2015-02-08 21:46:16 +01:00
Keyur Govande
4c6918ec17 Patch commit d9f85373e3 by moving the float_to_double function to
a header file.
2015-01-26 21:20:29 +00:00
Keyur Govande
b34f8ef599 Fix for bugs #68114 (Build fails on OS X due to undefined symbols)
and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient
has rounding errors).

The patch removes support for Decimal floating point numbers and
now defaults to using similar logic as what libmysqlclient does:
convert a 4 byte floating point number into a string, and then the
string into a double. The quirks of MySQL are maintained as seen in
Field_Float::val_str()
2015-01-26 21:20:29 +00:00
Keyur Govande
1933b556b9 Patch commit d9f85373e3 by moving the float_to_double function to
a header file.
2015-01-26 21:19:00 +00:00
Keyur Govande
e51980f4e6 Fix for bugs #68114 (Build fails on OS X due to undefined symbols)
and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient
has rounding errors).

The patch removes support for Decimal floating point numbers and
now defaults to using similar logic as what libmysqlclient does:
convert a 4 byte floating point number into a string, and then the
string into a double. The quirks of MySQL are maintained as seen in
Field_Float::val_str()
2015-01-26 21:19:00 +00:00
Anatol Belski
b946348969 enable static tsrm ls cache in ext/standard 2014-10-05 19:49:41 +02:00
Anatol Belski
e206409a8c exclude log2 usage which requires C99 support 2014-08-29 10:55:55 +02:00
Sara Golemon
37e91cc5d3 Merge branch 'pull-request/658' 2014-08-14 09:44:14 -07:00
Marc Bennewitz
b547e1358d Improved logarithm of base 2 and 10 of standard math functions 2014-04-28 19:58:10 +02:00
Michael Wallner
2e692b22e9 fix broken sha2 configure tests
see http://patch-tracker.debian.org/patch/series/view/php5/5.5.3+dfsg-1/fix_broken_sha2_test.patch
2013-09-13 12:56:38 +02:00
Michael Wallner
9eaffd34c1 fix broken sha2 configure tests
see http://patch-tracker.debian.org/patch/series/view/php5/5.5.3+dfsg-1/fix_broken_sha2_test.patch
2013-09-13 12:56:26 +02:00
Anatol Belski
ecf057d197 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #65226 chroot() does not get enabled
2013-07-11 00:49:41 +02:00
Anatol Belski
2acc386270 Fixed bug #65226 chroot() does not get enabled 2013-07-11 00:48:12 +02:00
Anthony Ferrara
c77f2c2958 Base structure for passsword_create and password_make_salt 2012-06-24 22:44:43 -04:00
Rasmus Lerdorf
438cc7f201 Drop support for autoconf < 2.60 in trunk and the
new PHP_5_4 branch. autoconf >= 2.60 should finally
be working now.
2011-05-15 06:09:21 +00:00
Rasmus Lerdorf
245d15fdc6 Drop support for autoconf < 2.60 in trunk and the
new PHP_5_4 branch. autoconf >= 2.60 should finally
be working now.
2011-05-15 06:09:21 +00:00
Pierre Joye
377ffeb50a - #51424, solaris part 2010-06-17 10:22:03 +00:00
Felipe Pena
5234958f8a - Fixed bug #51435 (Missing ifdefs / logic bug in crypt code cause compile errors) 2010-04-22 20:54:35 +00:00
Joey Smith
dd8ab3ad57 Not sure how I screwed up that MFH so badly. Proper
fix to config.m4 applied for when checking different
crypt() types.
2010-02-21 18:50:14 +00:00
Joey Smith
dd6ecfc01e MFH fix to config.m4 to make MD5 check label accurate 2010-02-20 19:28:39 +00:00
Christopher Jones
e2b9a01e70 Spelling typo in new check message 2010-02-10 23:56:27 +00:00
Johannes Schlüter
466c122aaa Fix config test 2010-02-10 13:37:17 +00:00
Johannes Schlüter
f732d74f6b Detect if we can rely on compiler-specific alignment features else use custom
workarounds. Fixes #50753
2010-02-09 21:58:13 +00:00
Pierre Joye
9001b4036a - #50334, crypt ignores sha512 and add support for sha256/512 to php's crypt [DOC] 2009-12-09 00:20:14 +00:00
Rasmus Lerdorf
937358ebc7 Revert attempt at supporting both autoconf 2.13 and
modern versions in the same build chain.  There are
simply too many broken things in 2.13 to make it work.
Cache handling is broken as well which is why I need
to revert the pdo_inc_path cache fix as well.

trunk is now 2.60+ only and I'll work on cleaning out
all the legacy cruft from there.
2009-11-29 06:13:22 +00:00
Rasmus Lerdorf
7cdd773081 More work on the autoconf 2.13->2.60+ transition code.
2.13 should be working again with one weird libtool issue
left to solve.  It doesn't seem directly related to this
stuff.
2009-11-28 23:06:54 +00:00
Rasmus Lerdorf
6961cd023a Ok, new attempt. Require autoconf-2.60 in this branch.
This simplifies things quite a bit by entirely getting
rid of the m4 diversions which were messing things up.
Now we are using the built-in autoconf diversions the
way they were intended and the HELP output order is
preserved through the AC_PRESERVE_HELP_ORDER macro 
which was introduced in autoconf-2.59c

The next thing to clean up are the template warnings
and I want to get to the bottom of the cache warning
we generate as well.  Now that I fixed the _cv_ stuff, 
I am not sure that is still a valid warning.
2009-11-28 17:56:03 +00:00
Rasmus Lerdorf
befa23748a Fix bug #50315 2009-11-27 23:41:13 +00:00
Rasmus Lerdorf
58ae9eeb11 Missed a few - now it really works with autoconf-2.64+ 2009-11-25 01:36:41 +00:00
Rasmus Lerdorf
5a2b41a627 Someone strap down Jani and give him a sedative please.
This makes our toolchain work with the latest versions
of autoconf and avoids a lot of end-user grief.
2009-11-25 01:30:06 +00:00