From 5d294bc34056dce963599b6119c8dcc5e5152714 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 16 Dec 2016 06:28:23 +0100 Subject: php-pecl-crypto: 0.3.1 --- REFLECTION | 2 +- crypto-pr20.patch | 66 ---------------------------------------------------- php-pecl-crypto.spec | 9 +++---- 3 files changed, 6 insertions(+), 71 deletions(-) delete mode 100644 crypto-pr20.patch diff --git a/REFLECTION b/REFLECTION index 3d092b6..3f8dbe1 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #78 crypto version 0.3.0 ] { +Extension [ extension #78 crypto version 0.3.1 ] { - Classes [17] { Class [ class Crypto\CryptoException extends Exception implements Throwable ] { diff --git a/crypto-pr20.patch b/crypto-pr20.patch deleted file mode 100644 index 69ba38b..0000000 --- a/crypto-pr20.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 536aae8e608a0f6977816eb4a1e6ab085e82e32c Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 15 Dec 2016 11:19:12 +0100 -Subject: [PATCH 1/2] fix #19 segfault in KDF::setLength and PHP 5 - ---- - crypto_kdf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/crypto_kdf.c b/crypto_kdf.c -index dca4a1b..8018324 100644 ---- a/crypto_kdf.c -+++ b/crypto_kdf.c -@@ -356,7 +356,7 @@ PHP_CRYPTO_METHOD(KDF, getLength) - PHP_CRYPTO_METHOD(KDF, setLength) - { - PHPC_THIS_DECLARE(crypto_kdf); -- phpc_str_size_t key_len; -+ phpc_long_t key_len; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", - &key_len) == FAILURE) { - -From 932bb0c65be0c389449400bfc21ca8d4860b3723 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 15 Dec 2016 11:35:45 +0100 -Subject: [PATCH 2/2] fix more zpp calls - ---- - crypto_kdf.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/crypto_kdf.c b/crypto_kdf.c -index 8018324..3fda8dc 100644 ---- a/crypto_kdf.c -+++ b/crypto_kdf.c -@@ -321,7 +321,8 @@ PHP_CRYPTO_METHOD(KDF, __construct) - { - PHPC_THIS_DECLARE(crypto_kdf); - char *salt = NULL; -- phpc_str_size_t key_len, salt_len; -+ phpc_str_size_t salt_len; -+ phpc_long_t key_len; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|s", - &key_len, &salt, &salt_len) == FAILURE) { -@@ -447,8 +448,8 @@ PHP_CRYPTO_METHOD(PBKDF2, __construct) - { - PHPC_THIS_DECLARE(crypto_kdf); - char *hash_alg, *salt = NULL; -- phpc_str_size_t key_len, hash_alg_len, salt_len; -- phpc_long_t iterations = PHP_CRYPTO_PBKDF2_ITER_DEFAULT; -+ phpc_str_size_t hash_alg_len, salt_len; -+ phpc_long_t key_len, iterations = PHP_CRYPTO_PBKDF2_ITER_DEFAULT; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|sl", - &hash_alg, &hash_alg_len, &key_len, &salt, &salt_len, &iterations) == FAILURE) { -@@ -560,7 +561,7 @@ PHP_CRYPTO_METHOD(PBKDF2, setHashAlgorithm) - char *hash_alg; - phpc_str_size_t hash_alg_len; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sl", -+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", - &hash_alg, &hash_alg_len) == FAILURE) { - return; - } diff --git a/php-pecl-crypto.spec b/php-pecl-crypto.spec index cf3e51d..9e755d5 100644 --- a/php-pecl-crypto.spec +++ b/php-pecl-crypto.spec @@ -23,15 +23,13 @@ Summary: Wrapper for OpenSSL Crypto Library Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 0.3.0 +Version: 0.3.1 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0: %{pecl_name}-pr20.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel > 5.3 BuildRequires: %{?scl_prefix}php-pear @@ -101,7 +99,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b .pr20 # Sanity check, really often broken extver=$(sed -n '/#define PHP_CRYPTO_VERSION/{s/.* "//;s/".*$//;p}' php_crypto.h) @@ -238,6 +235,10 @@ rm -rf %{buildroot} %changelog +* Fri Dec 16 2016 Remi Collet - 0.3.1-1 +- Update to 0.3.1 +- drop patch merged upstream + * Thu Dec 15 2016 Remi Collet - 0.3.0-1 - Update to 0.3.0 - open https://github.com/bukka/php-crypto/issues/19 segfault -- cgit