Commit Graph

78487 Commits

Author SHA1 Message Date
Christopher Jones
2cf9560921 Misc cleanup including adding the version number 2014-03-06 10:16:42 -08:00
Remi Collet
a8121ca0e1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix order in NEWS
  Add CVE ref (not known at release time)
  Fix NEWS for 5.5.11 fix (really not in 5.5.10)
  5.5.10 release date for NEWS
2014-03-06 11:02:40 +01:00
Remi Collet
70dd3f1731 Fix order in NEWS 2014-03-06 10:55:10 +01:00
Remi Collet
9acdf71194 Add CVE ref (not known at release time) 2014-03-06 10:54:18 +01:00
Remi Collet
cab1894b81 Fix NEWS for 5.5.11 fix (really not in 5.5.10) 2014-03-06 10:53:07 +01:00
Julien Pauli
b31a9cd4da 5.5.10 release date for NEWS 2014-03-06 10:18:10 +01:00
Remi Collet
518a6ed95b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
2014-03-06 10:16:30 +01:00
Remi Collet
7d5c11c235 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
2014-03-06 10:16:16 +01:00
Remi Collet
721b9a7c8d Set default Digest Message to use SHA1 instead of MD5 in openssl tests
as MD5 signature are now rejected by newer openssl Version.

Noticed in RHEL-7 and Fedora 21 build.
2014-03-06 10:14:08 +01:00
Daniel Lowrey
a9cdf2e2e3 Add NEWS/UPGRADING notes (openssl + curl) 2014-03-05 10:49:21 -07:00
Daniel Lowrey
fad14e3180 Add encrypted server SNI support
- New "SNI_server_certs" context option maps host names to
  appropriate certs should client handshakes advertise the
  SNI extension:

    $ctx = stream_context_create(["ssl" => [
        "local_cert" => "/path/to/cert.pem",
        "SNI_server_certs" => [
            "domain1.com" => "/path/to/domain1.pem",
            "*.domain2.com" => "/path/to/domain2.pem",
            "domain3.com" => "/path/to/domain3.pem"
        ]
    ]]);

- Prefixing a "*." will utilize the matching cert if a client
  requests the primary host name or any subdomain thereof. So
  in the above example our "domain2.pem" will be used for both
  requests to "domain2.com" -and- "subdomain.domain2.com"
- The "SNI_server_certs" ctx option has no effect for client
  streams.
- SNI support is enabled by default as of 5.6 for both servers
  and clients. Servers must specify the "SNI_server_certs" array
  to actually use the SNI extension, though.
- If the `"SNI_enabled" => false` ctx option is also passed then
  "SNI_server_certs" has no effect.
- While supporting SNI by itself is enough to successfully
  negotiate the TLS handshake with many clients, servers MUST
  still specify a "local_cert" ctx option or run the risk of
  connection failures from clients that do not support the SNI
  extension.
2014-03-05 10:03:33 -07:00
datibbaw
020e161966 Raise timeout to 2s, reworded ssl timeout warning 2014-03-05 10:03:23 -07:00
Daniel Lowrey
27849c998a Refactor + reorganize openssl files
- All streams-related code now lives in xp_ssl.c. Previously
  stream code was split across both openssl.c and xp_ssl.c
- Folded superfluous php_openssl_structs.h into xp_ssl.c
- Server-specific options now set on SSL_CTX instead of SSL
- Deprecate SNI_server_name ctx option
- Miscellaneous refactoring
2014-03-05 10:03:11 -07:00
Andrey Hristov
36d3c83abd Merge branch 'PHP-5.6' of git.php.net:php-src into PHP-5.6 2014-03-05 16:47:16 +02:00
Nikita Popov
d595502d0a Add NEWS entry for mcrypt changes 2014-03-05 15:36:00 +01:00
Nikita Popov
d8ed84e4c4 Use zpp for accepting encryption mode string
Leaving the non-zpp usage for the mcrypt_{MODE} functions, as
they're deprecated and I'm too lazy to update all their tests.
2014-03-05 15:32:32 +01:00
Nikita Popov
eb0eac75ef Remove a number of macros that are no longer used 2014-03-05 15:32:32 +01:00
Nikita Popov
e5738d3bc9 Provide expected IV length in IV error messages 2014-03-05 15:32:32 +01:00
Nikita Popov
b9737aa08e Call mcrypt_module_close on error 2014-03-05 15:32:32 +01:00
Nikita Popov
e4876ecbfb Print supported key sizes in error message 2014-03-05 15:32:32 +01:00
Nikita Popov
32333abe3e Clean up do_crypt code
Avoid unnecessary alloc/copy/free cycles and clean up structure in
general. Add a few extra checks for the key length.
2014-03-05 15:32:32 +01:00
Nikita Popov
a861a3a93d Abort on invalid key size
Previously an incorrectly sized key was either silently padded
with NUL bytes or truncated. Especially the silent nature of this
behavior makes it extremely easy to use weak encryption. A common
mistake - which has also been extensively made in our tests - is
to use a password instead of a key.

Incorrectly sized keys will now be rejected.
2014-03-05 15:32:32 +01:00
Nikita Popov
25d801f97e Abort on missing IV if the enc_mode requires it
Previously the code fell back on using a NUL IV if no IV was
passed and the encryption mode required it. This is dangerous and
makes no sense from a practical point of view (as you could just
as well use ECB then).
2014-03-05 15:32:31 +01:00
Nikita Popov
c4b7cdb41e Abort on invalid IV size
Previously, if the size of the IV did not match the block size
mcrypt would throw a warning and fall back to a NUL IV. This
behavior is both dangerous and makes no practical sense.

mcrypt_encrypt etc. will now return false if the IV has an incorrect
size.
2014-03-05 15:32:31 +01:00
Andrey Hristov
6b804b96b8 Refactor the result set data structures. Move more to the buffered and unbuffered
substructures. Add methods to these too. Preparing for pluggable interface for
returning data to the engine (zvals, c-style, something else)
2014-03-05 16:22:23 +02:00
Remi Collet
1b922895fc NEWS 2014-03-05 10:45:50 +01:00
Remi Collet
cf89ff3d24 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fixed Bug #66815 imagecrop(): insufficient fix for NULL defer CVE-2013-7327
2014-03-05 10:44:04 +01:00
Remi Collet
515c103a08 NEWS 2014-03-05 10:43:45 +01:00
Remi Collet
af09d8b96a Fixed Bug #66815 imagecrop(): insufficient fix for NULL defer CVE-2013-7327
This amends commit 8f4a537, which aimed to correct NULL dereference because of
missing check of gdImageCreateTrueColor() / gdImageCreate() return value.  That
commit checks for negative crop rectangle width and height, but
gdImageCreate*() can also return NULL when width * height overflows.  Hence
NULL deref is still possible, as gdImageSaveAlpha() and gdImagePaletteCopy()
is called before dst == NULL check.

This moves NULL check to happen right after gdImageCreate*().  It also removes
width and height check before gdImageCreate*(), as the same check is done by
image create functions (with an extra warning).

From thoger redhat com
2014-03-05 10:40:36 +01:00
Remi Collet
9a9add6b73 fix merge 2014-03-04 20:39:00 +01:00
Remi Collet
014b95a0a7 NEWS 2014-03-04 20:36:31 +01:00
Remi Collet
5d08cae346 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #66820 out-of-bounds memory access in fileinfo
2014-03-04 20:36:08 +01:00
Remi Collet
c2a9f73c99 NEWS 2014-03-04 20:35:56 +01:00
Remi Collet
a33759fd27 Fixed Bug #66820 out-of-bounds memory access in fileinfo
Upstream fix:
447558595a

Notice, test changed, with upstream agreement:
-define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >= ((n) - (o)))
+define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >  ((n) - (o)))
2014-03-04 20:32:52 +01:00
Remi Collet
834b719cf5 fix merge 2014-03-04 13:46:21 +01:00
Remi Collet
bc0b6e02e4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Improves fix for memory leak, keep in sync with upstream.
2014-03-04 13:43:42 +01:00
Remi Collet
731013ee8e Improves fix for memory leak, keep in sync with upstream.
Previous fix:
http://git.php.net/?p=php-src.git;a=commitdiff;h=10eb0070700382f966bf260e44135e1f724a15d2

Upstream fix:
c0c0032b9e
2014-03-04 13:41:37 +01:00
Remi Collet
f7e381eef6 Add notice about tsrm_virtual_cwd.h moved to zend_virtual_cwd.h
as this introduce need for awfull hacks...
2014-03-03 15:33:11 +01:00
Tjerk Meesters
fed56fbae8 Fixed NEWS for #60602 2014-03-03 05:59:07 +08:00
Tjerk Meesters
330ffe2e24 Merge branch 'PHP-5.5' into PHP-5.6 2014-03-03 05:58:03 +08:00
Tjerk Meesters
c34f26a938 Fixed news for #60602 2014-03-03 05:57:36 +08:00
Tjerk Meesters
bbd0781b39 Merge branch 'PHP-5.4' into PHP-5.5 2014-03-03 05:56:22 +08:00
Tjerk Meesters
1533f98afd Updated news for #60602 2014-03-03 05:54:09 +08:00
Tjerk Meesters
e73c05b75e proc_open(): separate environment values that aren't strings
Added a test case
2014-03-03 05:49:52 +08:00
Derick Rethans
574f230d3c Added DateTimeImmutable::createFromMutable. 2014-03-02 14:18:44 -05:00
Derick Rethans
b8d75cc464 Sort alphabetically 2014-03-02 14:15:30 -05:00
Derick Rethans
3eb8102348 Fixed NEWS. 2014-03-02 13:27:35 -05:00
Daniel Lowrey
c126c16479 Capture peer cert even if verify fails
Previously the "capture_peer_cert" SSL context option only
captured the peer's certificate if the verification routine
succeeded.

By also capturing the on verify failure applications have the
ability to parse the cert and ask users whether they wish to
proceed given the information presented by the peer.
2014-03-02 10:35:52 -07:00
Chris Wright
e8995c8cb0 Windows cert verify improvements + leak fixes
- Clean up properly at all fail points in native Windows peer
  verification routine
- Bring certificate usages and chain flags into line with chromium
  implementation in windows environments
2014-03-02 10:30:21 -07:00
Anatol Belski
9d4adf4fe1 turn off some false positives 2014-03-02 12:49:30 +01:00