php-src/ext
Eddie Kohler ada776c84c Make HashContexts serializable.
* Modify php_hash_ops to contain the algorithm name and
  serialize and unserialize methods.

* Implement __serialize and __unserialize magic methods on
  HashContext.

Note that serialized HashContexts are not necessarily portable
between PHP versions or from architecture to architecture.
(Most are, though Keccak and slow SHA3s are not.)

An exception is thrown when an unsupported serialization is
attempted.

Because of security concerns, HASH_HMAC contexts are not
currently serializable; attempting to serialize one throws
an exception.

Serialization exposes the state of HashContext memory, so ensure
that memory is zeroed before use by allocating it with a new
php_hash_alloc_context function. Performance impact is
negligible.

Some hash internal states have logical pointers into a buffer,
or sponge, that absorbs input provided in bytes rather than
chunks. The unserialize functions for these hash functions
must validate that the logical pointers are all within bounds,
lest future hash operations cause out-of-bounds memory accesses.

* Adler32, CRC32, FNV, joaat: simple state, no buffer positions
* Gost, MD2, SHA3, Snefru, Tiger, Whirlpool: buffer positions
  must be validated
* MD4, MD5, SHA1, SHA2, haval, ripemd: buffer positions encoded
  bitwise, forced to within bounds on use; no need to validate
2020-06-30 14:30:33 +02:00
..
bcmath Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
bz2 Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
calendar Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
com_dotnet Merge branch 'PHP-7.4' 2020-06-29 19:06:56 +02:00
ctype Remove unnecessary PHPDoc-alike blocks from tests 2020-06-24 13:13:44 +02:00
curl Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
date Add ZPP macros for class name or object parameters 2020-06-30 11:19:30 +02:00
dba Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
dom Don't throw warning if exception thrown during dom validation 2020-06-25 15:24:35 +02:00
enchant Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
exif Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
ffi Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
fileinfo Merge branch 'PHP-7.4' 2020-06-29 17:47:21 +02:00
filter Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
ftp Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
gd Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
gettext Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
gmp Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
hash Make HashContexts serializable. 2020-06-30 14:30:33 +02:00
iconv Remove unnecessary PHPDoc-alike blocks from tests 2020-06-24 13:13:44 +02:00
imap Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
intl Drop non-well numeric string in Intl test 2020-06-28 19:30:07 +02:00
json Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
ldap Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
libxml Don't throw warning if exception thrown during dom validation 2020-06-25 15:24:35 +02:00
mbstring Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
mysqli Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
mysqlnd Add helper APIs for maybe-interned string creation 2020-06-08 15:31:52 +02:00
oci8 Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
odbc Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
opcache Improve "VirtualProtect() failed" error messages 2020-06-30 13:23:41 +02:00
openssl Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
pcntl Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
pcre Remove unnecessary PHPDoc-alike blocks from tests 2020-06-24 13:13:44 +02:00
pdo Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
pdo_dblib Fix [-Wundef] warning in PDO DBLib extension 2020-05-20 16:29:52 +02:00
pdo_firebird Fix [-Wundef] warning in PDO Firebird extension 2020-05-20 16:29:52 +02:00
pdo_mysql Fix [-Wundef] warning in PDO MySQL extension 2020-05-20 16:29:52 +02:00
pdo_oci Fix [-Wundef] warning in PDO OCI extension 2020-05-20 16:29:53 +02:00
pdo_odbc Properly initialize displaysize 2020-06-24 12:07:58 +02:00
pdo_pgsql Clean up calls to extension_loaded('json') in tests 2020-05-28 15:07:47 -04:00
pdo_sqlite Merge branch 'PHP-7.4' 2020-06-03 10:17:27 +02:00
pgsql PGSQL and POD_SQL: don't include pg_config.h 2020-05-25 10:48:35 +02:00
phar Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
posix Remove unnecessary PHPDoc-alike blocks from tests 2020-06-24 13:13:44 +02:00
pspell Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
readline Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
reflection Fix leak in isDefaultValueAvailable() 2020-06-30 11:16:56 +02:00
session Make exit() unwind properly 2020-06-29 15:50:12 +02:00
shmop Make SimpleXMLElement a RecursiveIterator 2020-06-24 15:09:21 +02:00
simplexml Make SimpleXMLElement a RecursiveIterator 2020-06-24 15:09:21 +02:00
skeleton Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
snmp Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
soap Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
sockets Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
sodium Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
spl [ci skip] Various typo fixes in stub comments and CHANGES file 2020-06-25 23:32:40 +02:00
sqlite3 Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
standard Make HashContexts serializable. 2020-06-30 14:30:33 +02:00
sysvmsg Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
sysvsem Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
sysvshm Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
tidy Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
tokenizer Don't include trailing newline in comment token 2020-06-25 11:25:22 +02:00
xml Remove unnecessary PHPDoc-alike blocks from tests 2020-06-24 13:13:44 +02:00
xmlreader Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
xmlwriter Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
xsl Make exit() unwind properly 2020-06-29 15:50:12 +02:00
zend_test Implement Attribute Amendments. 2020-06-29 10:45:51 +02:00
zip Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
zlib Remove unnecessary PHPDoc-alike blocks from tests 2020-06-24 13:13:44 +02:00
ext_skel.php Repair ext_skel.php to create the basic framework for a PHP extension 2020-03-23 09:25:06 +01:00