Commit Graph

1307 Commits

Author SHA1 Message Date
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
Jelle van der Waa
23c124ec75
openssl: Add openssl_pkcs12_export_to_file tests
Add basic tests for openssl_pkcs12_export_to_file.
2017-07-24 10:46:42 +01:00
Jakub Zelenka
26982e36d5 Add support for OpenSSL security level 2017-07-17 17:40:51 +01:00
Jakub Zelenka
90ae2aec8c Make functions in openssl.c more consistent
Improve naming, CS and add some static defs
2017-07-16 18:38:17 +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
Stanislav Malyshev
d75dbb0e31 Merge branch 'PHP-7.1'
* PHP-7.1:
  Improve fix for #74145
  Fix wddx
  Fix tests
  Fixed bug #74111
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #74087
  Fixed parsing of strange formats with mixed month/day and time strings
  Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV
  Fixed bug #74111
  Fix #74435: Buffer over-read into uninitialized memory
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #73807
2017-07-04 21:23:16 -07:00
Stanislav Malyshev
0ba04f7737 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Improve fix for #74145
  Fix wddx
  Fix tests
  Fixed bug #74111
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #74087
  Fixed parsing of strange formats with mixed month/day and time strings
  Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV
  Fixed bug #74111
  Fix #74435: Buffer over-read into uninitialized memory
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #73807
2017-07-04 21:18:10 -07:00
Stanislav Malyshev
73cabfedf5 Fix bug #74651 - check EVP_SealInit as it can return -1 2017-07-04 19:30:56 -07:00
Jakub Zelenka
e657f0d3f2 Merge branch 'PHP-7.1' 2017-06-25 18:11:10 +01:00
Jakub Zelenka
0c707fcb10 Add OPENSSL_DONT_ZERO_PAD_KEY constant to prevent key padding
It fixes bug #71917 (openssl_open() returns junk on envelope < 16 bytes)
and bug #72362 (OpenSSL Blowfish encryption is incorrect for short
keys).
2017-06-25 18:08:50 +01:00
Anatol Belski
eb68301df1 Relax test condition, as OpenSSL 1.1.x out differs in EOL only 2017-06-24 00:25:51 +02:00
Anatol Belski
d7b9eb981a Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #74798 pkcs7_en/decrypt does not work if \x0a is used in content
2017-06-24 00:24:56 +02:00
Anatol Belski
b714309056 Fix bug #74798 pkcs7_en/decrypt does not work if \x0a is used in content
The patch for bug #74720 was incomplete.
2017-06-24 00:18:57 +02:00
Jelle van der Waa
787a18a50a Add openssl_pkcs7_read and output P7B in openssl_pkcs7_verify
Add an optional argument to openssl_pkcs7_verify to save the P7B
structure which can contain extra CA intermediate certificates send
along with an S/MIME signed email.

Introduce a new function called openssl_pkcs7_read, which can read a
PKCS#7 structure passed as a string and returns by reference an array
with PEM certificates formatted as a string.
2017-06-22 20:36:23 +01:00
Niklas Keller
9badf35386 Default single_dh_use and honor_cipher_order to true 2017-06-18 19:54:45 -04:00
Jakub Zelenka
fbb884e532 Merge branch 'PHP-7.0' into PHP-7.1 2017-06-18 19:08:51 +01:00
Jelle van der Waa
509f5097ab openssl: Add openssl_pkcs12_(read, export) tests
Add basic tests for openssl_pkcs12_read and openssl_pkcs12_export.
openssl_pkcs12_export has two tests disable which currently do not work
as intended and should be fixed.
2017-06-18 19:02:51 +01:00
Jakub Zelenka
192b2d8391 Merge branch 'PHP-7.1' 2017-06-18 19:09:21 +01:00
Jakub Zelenka
9dada7b291 Merge branch 'PHP-7.1' 2017-06-16 17:15:11 +01:00
Jakub Zelenka
c2a348b5bc Merge branch 'PHP-7.0' into PHP-7.1 2017-06-16 17:14:23 +01:00
Jelle van der Waa
f19dfac830 openssl: Fix spkstr and spki leak in openssl_spki_new
spkstr is not free'd when running the test and valgrind reports a leak
of 32,318 bytes. The free condition is not met since keyresource is not
NULL, apart from that OPENSSL_free actually free's the allocated memory
by OPENSSL_malloc inside OpenSSL.

Valgrind reports 768 bytes leaked in openssl_spki_new when running the
testsuite. Remove the keyresource check to always free spki.
2017-06-16 16:51:50 +01:00
Niklas Keller
bec91e1117 Use any TLS crypto method by default, don't use SSL 2017-06-10 17:31:24 -04:00
Anatol Belski
b50fe893a7 Merge branch 'PHP-7.1' 2017-06-09 23:48:25 +02:00
Anatol Belski
0fa40b0546 group the change for bug #74720 2017-06-09 23:47:15 +02:00
Anatol Belski
587b800811 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74720 pkcs7_en/decrypt does not work if \x1a is used in
2017-06-09 17:37:42 +02:00
Anatol Belski
cbe73b3cfe Fixed bug #74720 pkcs7_en/decrypt does not work if \x1a is used in
content
2017-06-09 17:35:37 +02:00
Jakub Zelenka
8baf12b161 Merge branch 'PHP-7.1' 2017-06-04 18:22:02 +01:00
Jakub Zelenka
ff93f74f63 Merge branch 'PHP-7.0' into PHP-7.1 2017-06-04 18:11:49 +01:00