Commit Graph

68 Commits

Author SHA1 Message Date
Robrecht Plaisier
d9cd2876d9 Fixed bug #67707 IV not needed for ECB encryption mode, but it returns a warning 2017-01-10 23:42:44 +01:00
Nikita Popov
e892e2e253 Merge branch 'PHP-5.6' into PHP-7.0 2015-10-03 10:13:44 +02:00
Nikita Popov
fe1933aae2 Fixed bug #70625 2015-10-03 10:12:11 +02:00
Xinchen Hui
0981345734 Merge branch 'PHP-5.6' 2015-04-12 12:12:38 +08:00
Xinchen Hui
dd50ec1538 Remove failing test
<nikic> [19:57:28] debian has a libmcrypt patch that makes it work
<nikic> [19:57:43] but not all other distros have it
2015-04-12 12:12:16 +08:00
Nikita Popov
7810659cc3 Removed deprecated mcrypt_ecb() etc 2015-03-09 11:37:13 +01:00
Veres Lajos
06fdf359e3 typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-23 14:52:47 -08:00
Veres Lajos
4dc994571d typo fixes - https://github.com/vlajos/misspell_fixer
Conflicts:
	ext/ftp/ftp.h
	ext/pcre/pcrelib/pcre_printint.c
	ext/pcre/pcrelib/sljit/sljitLir.c
	ext/pcre/pcrelib/sljit/sljitLir.h
	ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
	ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
	ext/pgsql/pgsql.c
	ext/phar/func_interceptors.c
	ext/soap/soap.c
	ext/standard/image.c
2014-11-23 14:33:43 -08:00
Tjerk Meesters
03e9878c78 Fixed mcrypt test case 2014-03-11 20:49:41 +08:00
Tjerk Meesters
d09eb1504a Fixed mcrypt test case 2014-03-08 16:16:46 +08:00
Andrey Andreev
eb8dfc85ce Add test for bug #62102 / RFC 2144
Using test vectors from RFC 2144, section B.1 (http://tools.ietf.org/rfc/rfc2144.txt)
2014-03-06 22:40:26 +01:00
Nikita Popov
d8ed84e4c4 Use zpp for accepting encryption mode string
Leaving the non-zpp usage for the mcrypt_{MODE} functions, as
they're deprecated and I'm too lazy to update all their tests.
2014-03-05 15:32:32 +01:00
Nikita Popov
e5738d3bc9 Provide expected IV length in IV error messages 2014-03-05 15:32:32 +01:00
Nikita Popov
e4876ecbfb Print supported key sizes in error message 2014-03-05 15:32:32 +01:00
Nikita Popov
a861a3a93d Abort on invalid key size
Previously an incorrectly sized key was either silently padded
with NUL bytes or truncated. Especially the silent nature of this
behavior makes it extremely easy to use weak encryption. A common
mistake - which has also been extensively made in our tests - is
to use a password instead of a key.

Incorrectly sized keys will now be rejected.
2014-03-05 15:32:32 +01:00
Nikita Popov
25d801f97e Abort on missing IV if the enc_mode requires it
Previously the code fell back on using a NUL IV if no IV was
passed and the encryption mode required it. This is dangerous and
makes no sense from a practical point of view (as you could just
as well use ECB then).
2014-03-05 15:32:31 +01:00
Nikita Popov
c4b7cdb41e Abort on invalid IV size
Previously, if the size of the IV did not match the block size
mcrypt would throw a warning and fall back to a NUL IV. This
behavior is both dangerous and makes no practical sense.

mcrypt_encrypt etc. will now return false if the IV has an incorrect
size.
2014-03-05 15:32:31 +01:00
Sherif Ramadan
7014a0eb6d Fixed Mcrypt deprecated functions and related tests 2012-08-16 10:21:22 -04:00
Nikita Popov
5bf4c5f82c Merge branch 'PHP-5.4' 2012-08-13 22:06:43 +02:00
Nikita Popov
f19351b503 Merge branch 'PHP-5.3' into PHP-5.4 2012-08-13 22:06:18 +02:00
Nikita Popov
7aed239050 Ask for less random data in mcrypt_create_iv
Otherwise the RNG blocks and the test takes a lot of time to run (and
occasionally fails).
2012-08-13 22:01:19 +02:00
Nikita Popov
9bc1af1e58 Rename mcrypt_cbf -> mcrypt_cfb
Also fix ECB -> CFB in the initialization vector size call (not that it
makes a difference, they have the same size).
2012-08-13 22:01:03 +02:00
Nikita Popov
544f5ad35b Fix mcrypt_ecb tests after deprecation 2012-08-13 20:30:53 +02:00
Pierre Joye
255913f5f4 - skip if no hash 2011-09-08 10:00:47 +00:00
Pierre Joye
0e05312d03 - skip if no hash 2011-09-08 10:00:47 +00:00
Pierre Joye
567fb34eb3 - skip if no hash 2011-09-08 10:00:47 +00:00
Xinchen Hui
30d1410817 Added skipif 2011-09-06 09:19:46 +00:00
Pierre Joye
17f78b92c4 - add skipif 2011-09-06 06:47:12 +00:00
Pierre Joye
09b6360c71 - add skipif 2011-09-06 06:47:12 +00:00
Pierre Joye
7921f410fc - add skipif 2011-09-06 06:47:12 +00:00
Stanislav Malyshev
3b7cdd0227 fix failing tests 2011-08-01 01:00:57 +00:00
Stanislav Malyshev
553a08c4e1 fix failing tests 2011-08-01 01:00:57 +00:00
Ryan Biesemeyer
292abd1240 tests for bug #55169 (mcrypt and openssl) 2011-07-20 18:59:05 +00:00
Ryan Biesemeyer
cd6f4bcf8d tests for bug #55169 (mcrypt and openssl) 2011-07-20 18:59:05 +00:00
Ryan Biesemeyer
80cff0c0e9 tests for bug #55169 (mcrypt and openssl) 2011-07-20 18:59:05 +00:00
Stanislav Malyshev
845d0805a8 MFH: Fixes for broken tests. 2011-05-27 19:27:05 +00:00
Jeraimee Hughes
daecb2c0f4 Fixes for broken tests. 2011-05-17 15:08:15 +00:00
Stanislav Malyshev
932e276c0b add filters to mcrypt
# trunk will follow soon
2010-01-15 21:02:20 +00:00
Jani Taskinen
91cc127ce4 - Fix bad section names (extra - in the end..) 2009-11-09 17:08:48 +00:00
Sriram Natarajan
0f57b15e23 - Fixed bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes). 2009-10-02 00:13:53 +00:00
Ant Phillips
4faa1f1624 MCrypt tests: checked on PHP 5.2.6, 5.3 and 6.0 (Windows and Linux but not Linux 64 bit or 5.3). 2008-12-11 10:21:38 +00:00
Felipe Pena
8b00dc3f9e - Changed split() to preg_split() 2008-11-20 23:11:25 +00:00
Felipe Pena
83a6215dcc - Fixed test 2008-11-20 13:27:00 +00:00
Felipe Pena
49fc9c9e13 - MFH: Fixed bug #46010 (warnings incorrectly generated for iv in ecb mode) 2008-09-07 22:57:37 +00:00
Derick Rethans
3657b0ab5c - Revert that crap. 2008-07-04 07:47:18 +00:00
Pierre Joye
f0ec9b9475 - fix mcrypt_iv on windows, use urandom equivalent
- MFH, code cleaning and reorganisation
2008-07-03 13:50:14 +00:00
David Soria Parra
fbc29e2848 Revert. 2008-05-18 19:48:40 +00:00
David Soria Parra
472b883cc6 Make mcrypt_enc_self_test() return value compatible with documentation and mcrypt _module_self_test() 2008-05-18 17:08:56 +00:00
David Soria Parra
5dd18fed7a Wrong file 2008-05-18 14:28:19 +00:00
David Soria Parra
3e52aaf16d MFH: Tests from Munich PHP Testfest 2008 2008-05-17 23:29:14 +00:00