com php-src: Merge branch 'PHP-5.6': ext/openssl/xp_ssl.c

From: Date: Thu, 05 Mar 2015 19:24:04 +0000
Subject: com php-src: Merge branch 'PHP-5.6': ext/openssl/xp_ssl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85272@lists.php.net to get a copy of this message
Commit: 927b137c1b6490384080a66a8ba678db3a90f6ba Author: Daniel Lowrey <rdlowrey@php.net> Thu, 5 Mar 2015 12:24:04 -0700 Parents: 7fa10095603ae03f0028041620ffe80375a1c84c c985ec737d8340e941feda05de647cce10b744ea Branches: master Link: http://git.php.net/?p=php-src..git;a=commitdiff;h=927b137c1b6490384080a66a8ba678db3a90f6ba Log: Merge branch 'PHP-5.6' * PHP-5.6: Fix ZTS Fix ZTS build Conflicts: ext/openssl/openssl.c ext/openssl/xp_ssl.c Changed paths: MM ext/openssl/xp_ssl.c Diff: diff --cc ext/openssl/xp_ssl.c index 3e1a92a,bfa46e3..9de0dcb --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@@ -345,19 -311,26 +345,20 @@@ static zend_bool php_x509_fingerprint_m return 0; } - for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(val), &pos); - zend_hash_get_current_data_ex(Z_ARRVAL_P(val), (void **)&current, &pos) == SUCCESS; - zend_hash_move_forward_ex(Z_ARRVAL_P(val), &pos) - ) { - int key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(val), &key, &key_len, &key_index, 0, &pos); - - if (!(key_type == HASH_KEY_IS_STRING && Z_TYPE_PP(current) == IS_STRING)) { - php_error_docref(NULL, E_WARNING, "Invalid peer_fingerprint array; [algo => fingerprint] form required" TSRMLS_CC); + ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(val), key, current) { + if (key == NULL || Z_TYPE_P(current) != IS_STRING) { + php_error_docref(NULL, E_WARNING, "Invalid peer_fingerprint array; [algo => fingerprint] form required"); return 0; } - if (php_x509_fingerprint_cmp(peer, key, Z_STRVAL_PP(current) TSRMLS_CC) != 0) { + if (php_x509_fingerprint_cmp(peer, key->val, Z_STRVAL_P(current)) != 0) { return 0; } - } + } ZEND_HASH_FOREACH_END(); return 1; - } else { - php_error_docref(NULL, E_WARNING, "Invalid peer_fingerprint value; fingerprint string or array of the form [algo => fingerprint] required"); + php_error_docref(NULL, E_WARNING, - "Invalid peer_fingerprint value; fingerprint string or array of the form [algo => fingerprint] required" TSRMLS_CC); ++ "Invalid peer_fingerprint value; fingerprint string or array of the form [algo => fingerprint] required"); } return 0;

« previous php.cvs (#85272) next »