Commit Graph

263 Commits

Author SHA1 Message Date
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Stanislav Malyshev
71daf3229b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  5.3.29-dev
  Fix CVE-2013-6420 - memory corruption in openssl_x509_parse

Conflicts:
	configure.in
	main/php_version.h
2013-12-10 11:34:35 -08:00
Stanislav Malyshev
c1224573c7 Fix CVE-2013-6420 - memory corruption in openssl_x509_parse 2013-12-10 11:03:49 -08:00
Michael Wallner
22700890d4 C89 compatibility 2013-10-09 12:30:31 +02:00
Daniel Lowrey
b026993a74 Fixed segfault when built with OpenSSL >= 1.0.1
(PR #481)
2013-10-09 09:17:25 +02:00
Stanislav Malyshev
cf96aa155e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix using wrong buffer pointer
2013-08-19 01:03:18 -07:00
Stanislav Malyshev
c1c49d6e39 fix using wrong buffer pointer 2013-08-19 01:02:12 -07:00
Mark Jones
9973658a44 Fix for php bug #64802 includes test case 2013-08-18 15:42:37 -07:00
Christopher Jones
9ad97cd489 Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings. 2013-08-14 20:36:50 -07:00
Stanislav Malyshev
dcea4ec698 Fix CVE-2013-4073 - handling of certs with null bytes 2013-08-13 22:24:11 -07:00
Stanislav Malyshev
2874696a5a Fix CVE-2013-4073 - handling of certs with null bytes 2013-08-13 22:20:33 -07:00
Stanislav Malyshev
7b0107cc5d fix bug #61930: openssl corrupts ssl key resource when using openssl_get_publickey() 2013-02-17 13:28:42 -08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
a2045ff332 Happy New Year~ 2013-01-01 16:02:16 +08:00
Mark Jones
84202c367e commit for php bug 61421
enabling SHA2 and RMD160 for openssl signature verification
2012-09-15 22:59:34 -07:00
Stanislav Malyshev
c7be96b08f Revert "Add PBKDF2 support via openssl()"
This reverts commit b5b8ea1050.
Looks like we don't have agreement yet on this for 5.4. Let's keep it in 5.5 for now.
2012-06-12 11:22:49 -07:00
Stanislav Malyshev
a2bfad051d Revert "Rename openssl_pkcs5_pbkdf2_hmac() to something that doesn't sound like a spell."
This reverts commit bccd1e672f.
Looks like we don't have agreement yet on this for 5.4. Let's keep it in 5.5 for now.
2012-06-12 11:21:54 -07:00
Scott MacVicar
bccd1e672f Rename openssl_pkcs5_pbkdf2_hmac() to something that doesn't sound like a spell.
Summary:
Stas pointed out that this is named pretty poorly. Go for openssl_pbkdf2()
2012-06-11 15:41:41 -07:00
Scott MacVicar
b5b8ea1050 Add PBKDF2 support via openssl()
Summary:
No easy way to put these in the hash extension since we don't really support optional
parameters to certain algorithms. Implemented in openssl for now since it has it already
and is pretty stable.

Only SHA1 is confirmed to work as an algorithm but openssl has a parameter so it can be
changed in the future.

Will backport to 5.4 potentially with Stas' approval.

Test Plan:
Ran newly added tests which came from RFC 6070
2012-06-11 13:35:25 -07:00
Anatoliy Belsky
270a406ac9 Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only 2012-04-24 14:05:35 +02:00
Scott MacVicar
5ef66f2cf5 Fixed bug #61124 (Crash when decoding an invalid base64 encoded string). 2012-02-23 01:26:46 +00:00
Scott MacVicar
f424fe8aed Fixed bug #61124 (Crash when decoding an invalid base64 encoded string). 2012-02-23 01:26:46 +00:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Stanislav Malyshev
2f15c1d717 fix uninitialized var that may lead to crash 2011-12-26 02:16:37 +00:00
Scott MacVicar
095cbc48a8 Fix segfault in older versions of OpenSSL (before 0.9.8i) 2011-12-18 05:14:32 +00:00
Scott MacVicar
beda5efd41 Fix segfault in older versions of OpenSSL (before 0.9.8i) 2011-12-18 05:14:32 +00:00
Scott MacVicar
287e1917cf Make sure that we set the strong crypto result to false as well as returning false. 2011-12-07 20:50:33 +00:00
Gustavo André dos Santos Lopes
1d5028be3d - Fixed bug #55646: textual data is returned in UTF-8, but is input in
another encoding. 5.4 only as this implies a BC break.
2011-09-12 17:23:10 +00:00
Felipe Pena
23e438594d - Make usage of new PHP_FE_END macro 2011-07-25 11:42:53 +00:00
Felipe Pena
4b30846b50 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00
Pierre Joye
b03817afb5 - re apply the rng change specific to windows, long term it should be a std function but as this function was badly introduced in the 1st place, we have to fix the bad things here instead, pls do not revert again, bad idea. 2011-07-19 23:01:41 +00:00
Scott MacVicar
591e0e446f Revert change to use a special Windows version of openssl_random_pseudo_bytes().
Lets discuss this on internals first. We're advertising something from the OpenSSL library 
and then subverting it with another Windows OS call.

What are the implications of this? Should we make this available in ext/standard/ instead?
2011-07-19 22:29:55 +00:00
Scott MacVicar
946456425e openssl_encrypt() / openssl_decrypt() were flawed and truncated the key to the default size for the case of a variable key length cipher.
The result is a key of 448 bits being passed to the blowfish algorithm would be truncated to 128 bit.

Also fixed an error in the zend_parse_parameters() having an invalid character being used.
2011-07-19 22:15:56 +00:00
Scott MacVicar
64a0c79a07 openssl_encrypt() / openssl_decrypt() were flawed and truncated the key to the default size for the case of a variable key length cipher.
The result is a key of 448 bits being passed to the blowfish algorithm would be truncated to 128 bit.

Also fixed an error in the zend_parse_parameters() having an invalid character being used.
2011-07-19 22:15:56 +00:00
Pierre Joye
5fb2570742 - use php_win32_get_random_bytes instead of over slow and partially wrong openssl's version 2011-07-10 14:59:33 +00:00
Pierre Joye
ccae79a2c3 - did I not kill that already? (do not use rand_screen, pointless on server and not TS) 2011-06-16 13:06:41 +00:00
Pierre Joye
104cd28e95 - did I not kill that already? (do not use rand_screen, pointless on server and not TS) 2011-06-16 13:06:41 +00:00
Felipe Pena
32b5f8a1a3 - Added new parameter parsing option (p - for valid path (string without null byte in the middle))
# The tests will be fixed in the next commits
2011-06-06 21:28:16 +00:00
Scott MacVicar
30f19bd524 Allow management of your own padding in openssl_encrypt/decrypt.
For using mcrypt / openssl interchangeabley managing your own padding is the only solution.
2011-05-20 18:56:13 +00:00
Martin Jansen
1a4897c88e MFH: The project calls itself OpenSSL and not openSSL, so let's keep it
that way in our code as well.
2011-04-25 16:51:12 +00:00
Martin Jansen
0c8438462c The project calls itself OpenSSL and not openSSL, so let's keep it
that way in our code as well.
2011-04-25 16:50:30 +00:00
Rasmus Lerdorf
be3d70df4e SSLV2 patch cleanup 2011-04-24 23:27:48 +00:00
Rasmus Lerdorf
380c3e5127 SSLV2 patch cleanup 2011-04-24 23:27:48 +00:00
Pierre Joye
69ba87b183 - fix bug #54061, memory leak in openssl_decrypt 2011-02-21 12:47:38 +00:00
Pierre Joye
f922e31129 - fix bug #54061, memory leak in openssl_decrypt 2011-02-21 12:47:38 +00:00
Pierre Joye
7deec592fd - fix test 025 2011-02-21 10:09:50 +00:00
Pierre Joye
b526a6ef44 - fix bug #54060, memory leak in openssl_encrypt 2011-02-21 10:07:31 +00:00
Pierre Joye
5261861d77 - fix bug #54060, memory leak in openssl_encrypt 2011-02-21 10:07:31 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00