Commit Graph

702 Commits

Author SHA1 Message Date
Daniel Lowrey
2dec21634c Revert "Add stream_socket_crypto_info() function"
This reverts commit 13acb7ec65.

With the added capability to negotiate application layer protocols
via the TLS ALPN extension userland needs a method to access the
negotiated protocol on a given stream. The reverted commit added
a new stream_socket_crypto_info() function for this purpose.

This original approach was discarded in favor of using the
already-existing stream_get_meta_data() API which specifically
exists for just such purposes and requires the addition of no new
functions.
2015-03-09 23:15:57 -06:00
Wei Dai
22a61cea33 Fixed build 2015-03-09 15:21:08 +08:00
Julien Pauli
2f06413340 Fix #67626 2015-03-08 23:45:11 -07:00
Reeze Xia
609f05fc19 ZTS cleanup 2015-03-08 19:25:55 +08:00
Daniel Lowrey
3e0a1a71e9 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug (#69195 Inconsistent stream crypto values across versions)

Conflicts:
	ext/standard/http_fopen_wrapper.c
2015-03-05 21:18:09 -07:00
Daniel Lowrey
10bc5fd4c4 Fixed bug (#69195 Inconsistent stream crypto values across versions)
PHP 5.6.0 altered the semantics of the following constants:

- STREAM_CRYPTO_METHOD_SSLv23_CLIENT
- STREAM_CRYPTO_METHOD_SSLv23_SERVER
- STREAM_CRYPTO_METHOD_TLS_CLIENT
- STREAM_CRYPTO_METHOD_TLS_SERVER

Instead of representing the SSLv23_*() handshake methods the v23
constants were changed to allow only SSLv2 or SSLv3 connections.
Likewise, the TLS methods were modified from using only the TLSv1
handshake to allowing TLS1,1.1, and 1.2. This created a situation
in which users upgrading from previous versions faced a potential
security degradation if they did not update code to use different
constants. In the interest of compatibility across PHP versions
the original semantics have been restored with the following
caveat:

**IMPORTANT**

The SSLv23 client/server methods will no longer negotiate the use
of the insecure SSLv2 or SSLv3 protocols by default. Users wishing
to allow these protocols must explicitly add them to the method
bitmask via the appropriate flags.
2015-03-05 21:09:39 -07:00
Daniel Lowrey
88cfc6ccb6 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix stream_select() issue with OpenSSL buffer

Conflicts:
	main/streams/streams.c
2015-03-05 17:53:04 -07:00
Chris Wright
e7df9d710c Fix stream_select() issue with OpenSSL buffer
Ensure data from OpenSSL internal buffer has been
transfered to PHP stream buffer before a select()
emulation operation is performed

Addresses bug #65137
https://bugs.php.net/bug.php?id=65137

Conflicts:
	ext/openssl/xp_ssl.c
2015-03-05 17:18:14 -07:00
Dmitry Stogov
6d065a8545 Avoid repeatable strlen() calls 2015-03-05 18:18:39 +03:00
Reeze Xia
c498cc7407 Merge branch 'pull-request/1142'
* pull-request/1142:
  Fixed wrong parameter type of php_stream_mmap_range()
2015-03-05 17:05:21 +08:00
Daniel Lowrey
b5d97140c0 Merge branch 'tls-alpn'
* tls-alpn:
  Improve test to target specific issue
  Misc updates/cleanup
  Add TLS ALPN extension support in crypto client/server streams
  Add stream_socket_crypto_info() function
  Update for compatibility with newer openssl libs
2015-03-04 13:56:58 -07:00
Reeze Xia
2dac92b244 Silence a empty while loop warning 2015-03-04 11:34:53 +08:00
Reeze Xia
98766e6375 Fixed wrong parameter type of php_stream_mmap_range()
There are several warings about this.
The mode type should be php_stream_mmap_access_t but not php_stream_mmap_operate_t
2015-03-04 11:28:14 +08:00
Dmitry Stogov
2fa8d67a5c Use zend_string* instead of char* for opened_patch handling. Avoid reallocations and improve string reuse. 2015-03-04 02:05:28 +03:00
Daniel Lowrey
13acb7ec65 Add stream_socket_crypto_info() function 2015-02-28 17:41:29 -05:00
Dmitry Stogov
1eb4352143 Use new ZEND_HASH_FOREACH_... API. 2015-02-10 15:43:12 +03:00
Xinchen Hui
e70c9f04ec Remove extra space 2015-02-05 16:33:45 +08:00
Xinchen Hui
ae90010891 Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	main/streams/memory.c
2015-02-05 16:33:20 +08:00
Nayana Hettiarachchi
5446377c6b Conflicts:
main/streams/memory.c
2015-02-05 16:32:30 +08:00
Xinchen Hui
22a468dc71 return size_t 2015-02-05 16:26:38 +08:00
Nayana Hettiarachchi
a3e07ff10c #68986 bug fix 2015-02-05 12:26:29 +08:00
Xinchen Hui
942809909e Cleanup resource handling APIs 2015-02-02 13:23:16 +08:00
Stanislav Malyshev
c752e1b786 Merge branch 'pull-request/1032'
* pull-request/1032:
  do_fstat changes
2015-02-01 00:56:27 -08:00
Stanislav Malyshev
50703c900f Merge branch 'PHP-5.6'
* PHP-5.6:
  fix group name handling

Conflicts:
	main/streams/plain_wrapper.c
2015-01-31 23:48:08 -08:00
Stanislav Malyshev
c5526291ce Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix group name handling
2015-01-31 23:47:25 -08:00
Joshua Rogers
f8bf646fc4 do_fstat changes
Check return values of 'do_fstat' function in all places.
2015-02-01 18:47:09 +11:00
Stanislav Malyshev
e5e251b023 fix group name handling 2015-01-31 23:47:03 -08:00
Michael Wallner
570ed1a1a4 fix warnings 2015-01-30 22:32:00 +01:00
Bob Weinand
5845f2c0c1 Merge branch 'PHP-5.6'
Conflicts:
	NEWS
	main/streams/filter.c
2015-01-26 22:53:36 +01:00
Bob Weinand
666cb333f7 Merge remote-tracking branch 'origin/PHP-5.5' into PHP-5.6
Conflicts:
	NEWS
2015-01-26 22:51:37 +01:00
Bob Weinand
b8461eb9ac Fix call after close if multiple filters are attached 2015-01-26 22:47:35 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
e112f6a04e second shot on removing TSRMLS_* 2014-12-14 14:07:59 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Julien Pauli
446eed10ee Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS
  Updated NEWS
  Fix bug #68532: convert.base64-encode omits padding bytes
2014-12-12 16:51:50 +01:00
Julien Pauli
a0d848f795 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS
  Fix bug #68532: convert.base64-encode omits padding bytes
2014-12-12 16:50:42 +01:00
mcq8
86f1875536 Fix bug #68532: convert.base64-encode omits padding bytes 2014-12-12 16:42:38 +01:00
Anatol Belski
49de5b7aed Merge branch 'PHP-5.6'
* PHP-5.6:
  add include for missing usleep proto
  C89 compat
  Added more useful warning messages
  Changed based on comments and make its behaviour equal to the Windows version
  Fix #53092 - dns_get_record does not return false on dns server failure
  Fix php cli (-S option) inconsistent port parsing

Conflicts:
	main/streams/plain_wrapper.c
2014-12-01 08:32:12 +01:00
Anatol Belski
c370683903 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  add include for missing usleep proto
  C89 compat
  Added more useful warning messages
  Changed based on comments and make its behaviour equal to the Windows version
  Fix #53092 - dns_get_record does not return false on dns server failure
  Fix php cli (-S option) inconsistent port parsing
2014-12-01 08:30:59 +01:00
Anatol Belski
c1ec815fae add include for missing usleep proto 2014-12-01 08:27:46 +01:00
Anatol Belski
f4a0e601ee C89 compat 2014-12-01 08:24:44 +01:00
Stanislav Malyshev
b564e7b0de Merge branch 'PHP-5.6'
* PHP-5.6:
  Update NEWS
  fix typo
  Added test and review suggestion
  Fix bug #68335: rmdir doesnt work with file:// stream wrapper
2014-11-30 17:35:11 -08:00
Stanislav Malyshev
60d5b2ec24 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added test and review suggestion
  Fix bug #68335: rmdir doesnt work with file:// stream wrapper
2014-11-30 17:07:02 -08:00
mcq8
04808aa7e1 Added test and review suggestion 2014-11-30 16:38:20 -08:00
mcq8
6eaa4d01d3 Fix bug #68335: rmdir doesnt work with file:// stream wrapper 2014-11-30 16:38:13 -08:00
Veres Lajos
4b9535341a typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-19 20:23:00 +00:00
Anatol Belski
5400f92c75 proper dllexport 2014-11-18 15:38:35 +01:00