Nikita Popov
af3c854074
Merge branch 'PHP-7.2' into PHP-7.3
2019-07-03 12:36:50 +02:00
Nikita Popov
0e48e35e04
Fixed bug #78231
2019-07-03 12:36:06 +02:00
Nikita Popov
021bb35aec
Merge branch 'PHP-7.3' into PHP-7.4
2019-06-21 15:08:12 +02:00
Nikita Popov
66e4b78519
Merge branch 'PHP-7.2' into PHP-7.3
2019-06-21 15:07:59 +02:00
Nikita Popov
90cb3743be
Free cert in php_openssl_load_stream_cafile()
...
X509_STORE_add_cert() increments the refcount of the cert, so we
should free it here.
2019-06-21 15:07:00 +02:00
Nikita Popov
e7ef2b52db
Merge branch 'PHP-7.3' into PHP-7.4
2019-06-21 12:56:12 +02:00
Nikita Popov
414db07bdb
Merge branch 'PHP-7.2' into PHP-7.3
2019-06-21 12:55:12 +02:00
Niklas Keller
fea9f93166
Fix memory leak in TLS matches_san_list
2019-06-21 12:54:30 +02:00
Rosen Penev
32e6d08dcd
Fix compilation without deprecated OpenSSL 1.1 APIs
2019-06-14 15:38:12 +02:00
Dmitry Stogov
457392fa64
Cheaper checks for exceptions thrown from __toString()
2019-06-06 01:47:22 +03:00
Nikita Popov
a31f46421d
Allow exceptions in __toString()
...
RFC: https://wiki.php.net/rfc/tostring_exceptions
And convert some object to string conversion related recoverable
fatal errors into Error exceptions.
Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Nikita Popov
829f18b48d
Merge branch 'PHP-7.3' into PHP-7.4
2019-06-03 15:15:22 +02:00
Nikita Popov
37bba7a678
Merge branch 'PHP-7.2' into PHP-7.3
2019-06-03 15:15:07 +02:00
Nikita Popov
ac60007bec
Clear errors after SSL_CTX_load_verify_locations()
...
We report our own errors here. Make sure these don't clog up the
error queue.
2019-06-03 15:14:01 +02:00
Jakub Zelenka
c2e9c71e36
Fix tests and logic for TLS 1.3
2019-04-28 17:37:43 +01:00
codarrenvelvindron
5c05f5e6d3
Added tls 1.3 support for PHP
2019-04-28 17:37:43 +01:00
Nikita Popov
c9ff095758
Merge branch 'PHP-7.3' into PHP-7.4
2019-04-15 10:54:39 +02:00
Nikita Popov
5611058766
Merge branch 'PHP-7.2' into PHP-7.3
2019-04-15 10:54:31 +02:00
Nikita Popov
917952453c
Fix uninitialized cert_captured
...
This is a legimitimate bug and also shows up under valgrind.
2019-04-15 10:53:33 +02:00
c9s
9f6f6fe219
Remove function_table var from the caller
...
function_table var is not used in call_user_function macro anymore
hence replace the usage with NULL
2019-03-11 10:00:39 +01:00
Peter Kokot
92ac598aab
Remove local variables
...
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.
A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.
This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.
With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.
Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70
Remove yearly range from copyright notice
2019-01-30 11:03:12 +02:00
Jakub Zelenka
9be6b16983
Merge branch 'PHP-7.3'
2019-01-25 14:16:57 +00:00
Jakub Zelenka
0da13086bd
Merge branch 'PHP-7.2' into PHP-7.3
2019-01-25 14:16:08 +00:00
Jakub Zelenka
dc2ffdeed7
Fix bug #77390 (feof might hang on TLS streams in case of fragmented TLS records)
...
Simplified version of the fix from Abyl Valg so credit to him.
2019-01-25 14:13:11 +00:00
Peter Kokot
902d39a3a7
Trim trailing whitespace in source code files
2018-10-13 14:14:50 +02:00
Anatol Belski
321c0cc349
Fix localized error messages and memory leaks
...
The FormatMessage API needs to LocalFree the delivered error messages.
In cases where messages are delivered in non ASCII compatible encoding,
the messages might be unreadable. This aligns the error message encoding
with the encoding settings in PHP, the focus is UTF-8 as default.
Initialize error buffer
Avoid code duplication
2018-09-17 10:56:50 +02:00
Jakub Zelenka
52ea129efb
Merge branch 'PHP-7.2' into PHP-7.3
2018-08-19 20:19:48 +01:00
Jakub Zelenka
73a8f72617
Merge branch 'PHP-7.1' into PHP-7.2
2018-08-19 20:19:01 +01:00
Jakub Zelenka
4c542e6c13
Fix bug #76705 (unusable ssl => peer_fingerprint in stream_context_create())
2018-08-19 20:14:26 +01:00
Peter Kokot
8d3f8ca12a
Remove unused Git attributes ident
...
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.
2018-07-25 00:53:25 +02:00
Jakub Zelenka
d404b5e255
Add ssl/tls streams options for min and max proto version
2018-07-01 18:46:52 +01:00
Dmitry Stogov
5eb1f92f31
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
2018-05-28 16:27:12 +03:00
Jakub Zelenka
3986b6ab6e
Merge branch 'PHP-7.2'
2018-05-22 13:41:22 +01:00
Jakub Zelenka
a231860b02
Merge branch 'PHP-7.1' into PHP-7.2
2018-05-22 13:40:23 +01:00
Jakub Zelenka
68c3d09c2c
Fix bug #76174 (openssl extension fails to build with LibreSSL 2.7)
2018-05-22 13:30:58 +01:00
Gabriel Caruso
6400264856
Trailing whitespaces
...
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49
year++
2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7
year++
2018-01-02 12:53:31 +08:00
Dmitry Stogov
83e495e0fd
Move constants into read-only data segment
2017-12-14 22:14:36 +03:00
Dmitry Stogov
6a9d2b2190
Cleanup type conversion
2017-12-07 19:24:55 +03:00
Nikita Popov
26f8fc833b
Enable and fix printf() format warnings
...
Add _unchecked() variants of zend_spprintf and zend_strpprintf for
cases where we specifically want to disable these checks, such as
use of %H.
2017-11-16 21:15:36 +01:00
Dmitry Stogov
49ea143bbd
Encapsulate reference-counting primitives.
...
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Xinchen Hui
513b0093c2
Refactor php_url struct to save memory dup in common cases
2017-08-06 17:48:05 +08:00
Anatol Belski
e2b61eccb9
Followup on 0ec147d3
for another place
...
which requires also to move the macros into the header
(cherry picked from commit b7eb2c0604
)
2017-07-24 16:33:12 +02:00
Anatol Belski
b7eb2c0604
Followup on 0ec147d3
for another place
...
which requires also to move the macros into the header
2017-07-24 16:24:04 +02:00
Jakub Zelenka
26982e36d5
Add support for OpenSSL security level
2017-07-17 17:40:51 +01:00
Jakub Zelenka
5381ff757d
Make consitent naming and improve CS in xp_ssl
2017-07-16 17:57:43 +01:00
Jakub Zelenka
c08dba3431
Allow setting SNI cert and pk in separate files
2017-07-16 16:15:43 +01:00
Niklas Keller
9badf35386
Default single_dh_use and honor_cipher_order to true
2017-06-18 19:54:45 -04:00
Niklas Keller
bec91e1117
Use any TLS crypto method by default, don't use SSL
2017-06-10 17:31:24 -04:00
Thomas Punt
932c4b35dc
Remove more unnecessary checks on Zend's allocator functions
2017-03-16 12:23:55 +01:00
Jakub Zelenka
117d6a9a14
Merge branch 'PHP-7.1'
2017-03-14 18:47:51 +00:00
Jakub Zelenka
b4f0174e5c
Merge branch 'PHP-7.0' into PHP-7.1
2017-03-14 18:46:29 +00:00
Jakub Zelenka
411f4b1b6f
Fix indent and add comment
2017-03-14 18:13:57 +00:00
Jakub Zelenka
760ff21bf3
Tidy up setting of SSL_MODE_RELEASE_BUFFERS
2017-03-14 18:13:57 +00:00
Jakub Zelenka
53cc72ef86
Remove extra SSL mode settings
2017-03-14 18:13:57 +00:00
Jakub Zelenka
17e9fc9bfe
Fix bug #72333 (fwrite() on non-blocking SSL sockets does not work)
2017-03-14 18:13:57 +00:00
Aaron Piotrowski
fb76d81b6c
Merge branch 'PHP-7.1'
2017-02-23 21:22:28 -06:00
Aaron Piotrowski
c05c65ac80
Merge branch 'PHP-7.0' into PHP-7.1
2017-02-23 21:19:46 -06:00
Aaron Piotrowski
e9873d9853
Fix bug #74159
...
Thanks to @brzuchal for the patch to xp_ssl.c and @DaveRandom for helping debug the problem.
2017-02-23 20:59:43 -06:00
Xinchen Hui
b012d48a3f
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Fixed bug #73854 (Always true condition in php_openssl_sockop_io)
2017-01-09 16:30:55 +08:00
Xinchen Hui
697809d425
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #73854 (Always true condition in php_openssl_sockop_io)
2017-01-09 16:30:48 +08:00
Xinchen Hui
f7cb79431f
Fixed bug #73854 (Always true condition in php_openssl_sockop_io)
2017-01-09 16:30:00 +08:00
Anatol Belski
97ac819c2b
Merge branch 'PHP-7.1'
...
* PHP-7.1:
move various places to the centralized OpenSSL setup routine
use the new API for opaque symbol in OpenSSL 1.1.x
implement basic config support for OpenSSL 1.1.x
2017-01-08 00:39:53 +01:00
Anatol Belski
bf14ecc0d8
use the new API for opaque symbol in OpenSSL 1.1.x
2017-01-08 00:25:46 +01:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Bob Weinand
1f474fddbb
Merge branch 'PHP-7.1'
...
Also inline alpn_ctx in openssl_netstream_data (no need for the extra allocation there)
2016-12-22 23:40:24 +01:00
Bob Weinand
7b133e074c
Merge branch 'PHP-7.0' into PHP-7.1
2016-12-22 23:34:51 +01:00
Bob Weinand
ac1372d811
Fix alpn_ctx leaking in openssl
2016-12-22 23:34:07 +01:00
Kalle Sommer Nielsen
2104bea5d7
Remove Netware support
...
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Jakub Zelenka
820bca8ca3
Try to fix LibreSSL build
2016-10-23 19:55:22 +01:00
Jakub Zelenka
930ae4034e
Drop useless checks for DH and RSA
...
If DH or RSA was disabled, the build would fail already as
it's used already elsewhere without checking the OPENSSL_NO_DH
or OPENSSL_NO_RSA defines.
2016-10-23 19:37:07 +01:00
Jakub Zelenka
1b1b7f8809
Merge branch 'PHP-7.0' into PHP-7.1
2016-09-13 18:27:55 +01:00
Jakub Zelenka
3a739c9f9f
Merge branch 'PHP-5.6' into PHP-7.0
2016-09-13 18:19:20 +01:00
Jakub Zelenka
05baa92727
Fix bug #73072 (Invalid path SNI_server_certs causes segfault)
2016-09-13 18:15:34 +01:00
Jakub Zelenka
d8580cb286
Use always non const SSL cipher version string
2016-07-19 20:01:20 +01:00
Jakub Zelenka
069d20a33b
Hide setting server ECDH curve for OpenSSL 1.1
...
It seems to be done automatically
2016-07-17 17:46:14 +01:00
Jakub Zelenka
1123c85d79
Do not use tmp_rsa_cb for OpenSSL 1.1
...
The SSL_CTX_set_tmp_rsa_callback has been removed
2016-07-17 17:46:14 +01:00
Jakub Zelenka
5f569cc03e
Bump minimal OpenSSL version to 1.0.1
2016-07-17 17:21:07 +01:00
Remi Collet
d30b6a85b2
force SSL_OP_NO_SSLv2
2016-07-17 16:41:47 +01:00
Remi Collet
642aee1deb
Cleanup all SSLv2 code, whatever OpenSSL version is
2016-07-17 16:41:47 +01:00
Dmitry Stogov
323b2733f6
Fixed compilation warnings
2016-06-22 00:40:50 +03:00
Joe Watkins
66fc5a3436
Implement #51879 stream context socket option tcp_nodelay
2016-04-29 12:11:58 +01:00
Lior Kaplan
ed35de784f
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf
Happy new year (Update copyright to 2016)
2016-01-01 19:21:47 +02:00
Dmitry Stogov
c67fc6bb09
Fixed memory leak in php_stream_context_set_option()
2015-10-29 20:06:55 +03:00
Anatol Belski
83bfefeccb
Fixed bug #70718 stream_select() when OpenSSL extension is loaded on PHP Win64
2015-10-26 15:54:29 +01:00
Anatol Belski
545b364d56
remove TSRMLS_*
...
either remains or merged in from PHP5
2015-08-02 13:42:01 +02:00
Dmitry Stogov
4a2e40bb86
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 04:05:24 +03:00
Nikita Popov
2a87a42cd4
Dropped CN_match and SNI_server_name context options
2015-04-24 18:18:18 +02:00
Daniel Lowrey
4f07330e79
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fix Bug #69402 : Reading empty SSL stream hangs until timeout
Conflicts:
ext/openssl/xp_ssl.c
2015-04-14 09:27:37 -06:00
Daniel Lowrey
81f356b4ae
Fix Bug #69402 : Reading empty SSL stream hangs until timeout
2015-04-14 09:25:11 -06:00
Dmitry Stogov
5ba72e5f80
Fixed resource leak
2015-04-08 23:37:05 +03:00
Daniel Lowrey
589374d027
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Don't block on crypto data inside stream_select()
2015-03-11 09:45:28 -06:00
Daniel Lowrey
c661121459
Don't block on crypto data inside stream_select()
2015-03-11 09:44:07 -06:00
Daniel Lowrey
4a336f5d0b
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fix bug# 69215 (Crypto servers should send client CA list)
Conflicts:
ext/openssl/xp_ssl.c
2015-03-10 18:18:19 -06:00