Commit graph

1407 commits

Author SHA1 Message Date
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
Nikita Popov
3b475910d6 Don't use xml resource in openssl test
Instead use a file resource, removing the dependency on ext/xml.
2018-09-17 10:20:26 +02:00
Anatol Belski
7015965254 Show all unmatched errors when test failed 2018-09-12 22:27:30 +02:00
Anatol Belski
a45169a6ba Add debug message for failing test parts 2018-09-12 19:59:20 +02:00
Anatol Belski
8a8edac8a5 Merge branch 'PHP-7.3'
* PHP-7.3:
  Improve error code matching
2018-09-12 16:26:26 +02:00
Anatol Belski
ed5262b589 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Improve error code matching
2018-09-12 16:25:39 +02:00
Anatol Belski
05a4fec761 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Improve error code matching
2018-09-12 16:24:38 +02:00
Anatol Belski
19ab91781e Improve error code matching 2018-09-12 16:22:22 +02:00
Jakub Zelenka
f4cf60c757 Merge branch 'PHP-7.3' 2018-09-09 19:00:37 +01:00
Jakub Zelenka
9eec7d06f6 Merge branch 'PHP-7.2' into PHP-7.3 2018-09-09 18:59:47 +01:00
Jakub Zelenka
87a9536bda Merge branch 'PHP-7.1' into PHP-7.2 2018-09-09 18:58:23 +01:00
Jakub Zelenka
be50a72715 Fix ssl stream reneg limit test to print only after first renegotiation
It has been reported that in some setup the test does multiple
renegotiations which is allowed.
2018-09-09 18:53:55 +01:00
Jakub Zelenka
ef999f0735 Merge branch 'PHP-7.3' 2018-09-02 20:03:03 +01:00
Jakub Zelenka
217888ed26 Merge branch 'PHP-7.2' into PHP-7.3 2018-09-02 20:02:09 +01:00
Jakub Zelenka
cd0a37994e Fix stream_security_level.phpt with OpenSSL 1.1.1 2018-09-02 20:00:08 +01:00
Jakub Zelenka
1dd4c62c99 Merge branch 'PHP-7.3' 2018-08-19 20:20:46 +01: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
Gabriel Caruso
0e0019f694
Remove superfluous checks of always available functions 2018-08-03 00:13:01 -03:00
Peter Kokot
cf3b852109 Trim trailing whitespaces in build files
Some editors utilizing .editorconfig automatically trim whitespaces. For
convenience this patch removes whitespaces in certain build files:
- ext/*/config*.m4
- configure.ac
- acinclude.m4
2018-07-29 03:43:45 +02: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
Dmitry Stogov
b6cc4d2009 Use zval_ptr_dtor() instead of zval_dtor() in internal functions that destroy new created object (This is safer and produces less code) 2018-07-05 11:54:26 +03:00
Dmitry Stogov
265c3ed6cf Fixed incorrrecr zval_dtor() usage to replace value of argument passed by reference, that may lead to memory leaks. 2018-07-05 10:57:49 +03:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Jakub Zelenka
d404b5e255 Add ssl/tls streams options for min and max proto version 2018-07-01 18:46:52 +01:00
Jakub Zelenka
c2a3ab070b Merge branch 'PHP-7.2' 2018-06-21 17:03:07 +01:00
Jakub Zelenka
d95ee27551 Make new openssl ext tests in 7.2 consitent 2018-06-21 17:02:44 +01:00
Jakub Zelenka
5f349b728e Merge branch 'PHP-7.2' 2018-06-21 16:50:45 +01:00
Jakub Zelenka
77bd405959 Merge branch 'PHP-7.1' into PHP-7.2 2018-06-21 16:47:08 +01:00
Jakub Zelenka
b20bcbc363 Use unix NL in all openssl ext tests 2018-06-21 16:43:32 +01:00
Jakub Zelenka
3c42f64e6e Make code in openssl ext tests more consistent
Mainly use spaces for indent and fix some other CS issues. Also
drop checks for unsupported OpenSSL library versions.
2018-06-21 16:38:19 +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
Jakub Zelenka
587cede59d Merge branch 'PHP-7.2' 2018-05-18 17:25:06 +01:00
Jakub Zelenka
b027071688 Merge branch 'PHP-7.1' into PHP-7.2 2018-05-18 17:23:17 +01:00
Jakub Zelenka
798e707eb3 Add test for bug #76296 2018-05-18 17:15:36 +01:00
Erik Lax
d6bc266ba0 Fix bug #76296 (openssl_pkey_get_public does not respect open_basedir) 2018-05-18 17:15:22 +01:00
Jakub Zelenka
2a2bf97a9a Fix keylen type mismatch in openssl_pkey_derive 2018-05-11 17:05:03 +01:00
Jakub Zelenka
a76633444c Fix openssl_pkey_derive arginfo 2018-05-09 19:38:47 +01:00
Jim Zubov
897133fbda Add openssl_pkey_derive 2018-05-09 19:37:01 +01:00
Jakub Zelenka
8327c4c3bd Merge branch 'PHP-7.2' 2018-04-15 20:43:17 +01:00
Jakub Zelenka
98e43a33c8 Merge branch 'PHP-7.1' into PHP-7.2 2018-04-15 20:42:28 +01:00
Jakub Zelenka
2ef8809ef3 Make openssl_error_string test work in OpenSSL 1.1.1
It was the only failing test
2018-04-15 20:41:23 +01:00
Christoph M. Becker
d5f84fb9c5 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix some arginfos
2018-02-23 11:32:18 +01:00
Christoph M. Becker
c6cf3d4ada Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix some arginfos
2018-02-23 11:29:21 +01:00
Gabriel Caruso
0b8cfa6c78 Fix some arginfos
* all arguments for ftp_pasv are required
* $varname for getenv function isn't required anymore
* fsockopen and pfsockopen only require $hostname
* strtok can work with only one parameter
* strpbrk needs two parameters to work
* required parameters and add some parameters in openssl_* functions
2018-02-23 11:27:14 +01:00
Gabriel Caruso
1314f0fb3a Use int instead of long in protos 2018-02-23 11:06:20 +01:00