Commit graph

1335 commits

Author SHA1 Message Date
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
Jakub Zelenka
8b07cc4914 Merge branch 'PHP-7.2' 2017-10-30 16:44:33 +00:00
Jakub Zelenka
19c62e83fa Merge branch 'PHP-7.1' into PHP-7.2 2017-10-30 16:43:36 +00:00
Jakub Zelenka
7c2031bfca Merge branch 'PHP-7.0' into PHP-7.1 2017-10-30 16:42:23 +00:00
Jakub Zelenka
fc169d2133 Prevent leaking x509 and csr resources if it is not requested
All functions using php_openssl_x509_from_zval or php_openssl_csr_from_zval
with makeresource equal to 0 do not deref the resource which means there
is a leak till the end of the request. This can cause issues for long
running apps. It is a generic solution for bug #75363 which also covers
other functions.
2017-10-30 16:40:56 +00:00
Jakub Zelenka
d8ccffa79a Extend and speed up pkey export tests 2017-10-30 16:40:56 +00:00
Jakub Zelenka
e78e839e53 Rewrite openssl_csr_get_subject test to improve coverage 2017-10-30 16:40:56 +00:00
Jakub Zelenka
528aa540b4 Add openssl_csr_get_public_key test 2017-10-30 16:40:56 +00:00
Jakub Zelenka
548798818b Extend openssl_pkcs7_* tests to cover resource cert 2017-10-30 16:40:56 +00:00
Jakub Zelenka
55d92413b9 Fix cleaning tmp output file in openssl_csr_export_to_file test 2017-10-30 16:40:56 +00:00
Jelle van der Waa
5812f7a8d3 openssl: add basic openssl_csr_export_to_file tests
Add a basic test for openssl_csr_export_to_file.
2017-10-30 16:40:56 +00:00
Jakub Zelenka
628a52d365 Extend openssl_csr_sign test to cover cert resource 2017-10-30 16:40:56 +00:00
Jakub Zelenka
80191eebec Set different invalid path in openssl_pkcs12_export so it is more unlikely to exist 2017-10-30 16:40:55 +00:00
Jakub Zelenka
cd66aad141 Extend openssl_x509_parse to cover cert resource 2017-10-30 16:40:55 +00:00
Jakub Zelenka
c1d98588a2 Rename and test resource cert in openssl_x509_checkpurpose test 2017-10-30 16:40:55 +00:00
Jakub Zelenka
d23d4fd61b Extend openssl_x509_check_private_key to test resource cert 2017-10-30 16:40:55 +00:00
Jakub Zelenka
be0758b75a Extend openssl_x509_fingerprint test to cover resource cert with sha1 2017-10-30 16:40:55 +00:00
Dmitry Stogov
fad75a54d4 Merge branch 'master' into rc_debug
* master: (26 commits)
  Better fix for bug #75451 (Assertion fails while foreach on empty xpath query)
  Catch with the latest AppVeyor unzip errors
  Fixed type inference
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
  Fix compiler warnings
  We don't use a specific model for a MAKERNOTE so remove these checks that doesn't do anything anyway
  Remove these old comments, as for the TODO, there is already a FR for this
  Re-enable AppVeyor cache
  make sure run-tests reports exit status upon prerequisite error
  Remove implicit constants from test case
  Fix invalid read in zend_use_undefined_constant()
  Fix invalid read in mb_ord()
  Remove --with-libmbfl configure option
  Fixed bug #75451 (Assertion fails while foreach on empty xpath query)
  Add tests for UConverter::getStandards()
  convert spaces to tabs in ext/ftp/tests/server.inc
  Add tests for ftp_rename
  Fix bug #75434 Wrong reflection for mysqli_fetch_all function
  Don't optimize input arrays with suffix holes
  Fix bug #75307 Wrong reflection for openssl_open function
  ...
2017-10-30 12:11:35 +03:00
Joe Watkins
5ce7113467
Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix bug #75307 Wrong reflection for openssl_open function
2017-10-27 16:07:30 +01:00
Joe Watkins
f2367d4626
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75307 Wrong reflection for openssl_open function
2017-10-27 16:06:57 +01:00
Joe Watkins
14be7dcf8e
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75307 Wrong reflection for openssl_open function
2017-10-27 16:06:29 +01:00
Fabien Villepinte
51ea2cfbe1
Fix bug #75307 Wrong reflection for openssl_open function 2017-10-27 16:06:01 +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
Jakub Zelenka
d5127cec6a Merge branch 'PHP-7.2' 2017-10-22 18:59:32 +01:00
Jakub Zelenka
e33721978e Merge branch 'PHP-7.1' into PHP-7.2 2017-10-22 18:58:15 +01:00
Jakub Zelenka
f10fd89f99 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-22 18:57:14 +01:00
Jakub Zelenka
34ed75fab7 Fix clean up for openssl_pkcs12_export_to_file_basic 2017-10-22 18:54:15 +01:00
Jelle van der Waa
314bef5d03 openssl: Fix openssl_pkcs12_export extracerts test
Fix the openssl_pkcs12_export testcase for extracerts, the 'extracerts'
option needs to be the key of the certificate value otherwise
openssl_pkcs12_export will ignore it.
2017-10-22 18:53:30 +01:00
Jakub Zelenka
16aca56816 Merge branch 'PHP-7.2' 2017-10-15 20:33:49 +01:00
Jakub Zelenka
a3da46b524 Merge branch 'PHP-7.1' into PHP-7.2 2017-10-15 20:33:22 +01:00
Jakub Zelenka
547fee9cd4 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-15 20:31:25 +01:00
Jakub Zelenka
999fe36d40 Properly fix #75363 and address some other leaks with cert 2017-10-15 20:25:58 +01:00
Bob Weinand
2392010af4 Merge branch 'PHP-7.2' 2017-10-12 12:32:49 +02:00
Bob Weinand
ee36507423 Merge branch 'PHP-7.1' into PHP-7.2 2017-10-12 12:32:30 +02:00
Bob Weinand
f8ff4c4918 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-12 12:31:20 +02:00
Bob Weinand
a55af1e271 Fixed bug #75363 (openssl_x509_parse leaks memory) 2017-10-12 12:30:20 +02:00
Jakub Zelenka
ce10a987c8 Merge branch 'PHP-7.2' 2017-08-30 17:32:45 +01:00
Jakub Zelenka
1f843a8fb5 Automatically load OpenSSL configuration file 2017-08-30 17:31:17 +01:00
Jakub Zelenka
58df6a3b61 Do not explicitly initialize and clean up OpenSSL for OpenSSL 1.1 2017-08-30 17:29:24 +01:00
Jelle van der Waa
8106688575 openssl: add basic openssl_get_cert_locations test
Add a simple test for openssl_get_cert_locations, verifying the returned
array structure.
2017-08-19 15:31:27 +02: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
cb7e42da25 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add test for bug #74903
2017-07-24 17:03:24 +02:00
Anatol Belski
2dc81d4a09 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add test for bug #74903
2017-07-24 17:02:55 +02:00
Anatol Belski
a769d873f8 Add test for bug #74903 2017-07-24 17:02:10 +02: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
6918a68d9d Ensure binary mode for OpenSSL I/O
Essential for OpenSSL 1.1.0 on Windows, some issues was revealed earlier
and now by openssl_pkcs12_export_to_file_basic.phpt.

(cherry picked from commit 0ec147d301)
2017-07-24 16:31:09 +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
Anatol Belski
0ec147d301 Ensure binary mode for OpenSSL I/O
Essential for OpenSSL 1.1.0 on Windows, some issues was revealed earlier
and now by openssl_pkcs12_export_to_file_basic.phpt.
2017-07-24 15:43:48 +02:00
Joe Watkins
52964bbfb2
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  openssl: Add openssl_pkcs12_export_to_file tests
2017-07-24 10:47:02 +01:00
Joe Watkins
5816ce330c
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  openssl: Add openssl_pkcs12_export_to_file tests
2017-07-24 10:46:52 +01:00