From fb17cb2f5b208110470e182690d2e7df090d63ca Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 8 Mar 2021 07:51:25 +0100 Subject: update to 0.3.2 --- REFLECTION | 268 ++++++++++++++++++++++++++++++++++++--------------- php-pecl-crypto.spec | 60 +++--------- 2 files changed, 204 insertions(+), 124 deletions(-) diff --git a/REFLECTION b/REFLECTION index 3f8dbe1..a868d35 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #78 crypto version 0.3.1 ] { +Extension [ extension #119 crypto version 0.3.2 ] { - Classes [17] { Class [ class Crypto\CryptoException extends Exception implements Throwable ] { @@ -61,36 +61,36 @@ Extension [ extension #78 crypto version 0.3.1 ] { Class [ class Crypto\CipherException extends Crypto\CryptoException implements Throwable ] { - Constants [30] { - Constant [ integer ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer STATIC_METHOD_NOT_FOUND ] { 2 } - Constant [ integer STATIC_METHOD_TOO_MANY_ARGS ] { 3 } - Constant [ integer MODE_NOT_FOUND ] { 4 } - Constant [ integer MODE_NOT_AVAILABLE ] { 5 } - Constant [ integer AUTHENTICATION_NOT_SUPPORTED ] { 6 } - Constant [ integer KEY_LENGTH_INVALID ] { 7 } - Constant [ integer IV_LENGTH_INVALID ] { 8 } - Constant [ integer AAD_SETTER_FORBIDDEN ] { 9 } - Constant [ integer AAD_SETTER_FAILED ] { 10 } - Constant [ integer AAD_LENGTH_HIGH ] { 11 } - Constant [ integer TAG_GETTER_FORBIDDEN ] { 12 } - Constant [ integer TAG_SETTER_FORBIDDEN ] { 13 } - Constant [ integer TAG_GETTER_FAILED ] { 14 } - Constant [ integer TAG_SETTER_FAILED ] { 15 } - Constant [ integer TAG_LENGTH_SETTER_FORBIDDEN ] { 16 } - Constant [ integer TAG_LENGTH_LOW ] { 17 } - Constant [ integer TAG_LENGTH_HIGH ] { 18 } - Constant [ integer TAG_VERIFY_FAILED ] { 19 } - Constant [ integer INIT_ALG_FAILED ] { 20 } - Constant [ integer INIT_CTX_FAILED ] { 21 } - Constant [ integer INIT_ENCRYPT_FORBIDDEN ] { 22 } - Constant [ integer INIT_DECRYPT_FORBIDDEN ] { 23 } - Constant [ integer UPDATE_FAILED ] { 24 } - Constant [ integer UPDATE_ENCRYPT_FORBIDDEN ] { 25 } - Constant [ integer UPDATE_DECRYPT_FORBIDDEN ] { 26 } - Constant [ integer FINISH_FAILED ] { 27 } - Constant [ integer FINISH_ENCRYPT_FORBIDDEN ] { 28 } - Constant [ integer FINISH_DECRYPT_FORBIDDEN ] { 29 } - Constant [ integer INPUT_DATA_LENGTH_HIGH ] { 30 } + Constant [ public int ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int STATIC_METHOD_NOT_FOUND ] { 2 } + Constant [ public int STATIC_METHOD_TOO_MANY_ARGS ] { 3 } + Constant [ public int MODE_NOT_FOUND ] { 4 } + Constant [ public int MODE_NOT_AVAILABLE ] { 5 } + Constant [ public int AUTHENTICATION_NOT_SUPPORTED ] { 6 } + Constant [ public int KEY_LENGTH_INVALID ] { 7 } + Constant [ public int IV_LENGTH_INVALID ] { 8 } + Constant [ public int AAD_SETTER_FORBIDDEN ] { 9 } + Constant [ public int AAD_SETTER_FAILED ] { 10 } + Constant [ public int AAD_LENGTH_HIGH ] { 11 } + Constant [ public int TAG_GETTER_FORBIDDEN ] { 12 } + Constant [ public int TAG_SETTER_FORBIDDEN ] { 13 } + Constant [ public int TAG_GETTER_FAILED ] { 14 } + Constant [ public int TAG_SETTER_FAILED ] { 15 } + Constant [ public int TAG_LENGTH_SETTER_FORBIDDEN ] { 16 } + Constant [ public int TAG_LENGTH_LOW ] { 17 } + Constant [ public int TAG_LENGTH_HIGH ] { 18 } + Constant [ public int TAG_VERIFY_FAILED ] { 19 } + Constant [ public int INIT_ALG_FAILED ] { 20 } + Constant [ public int INIT_CTX_FAILED ] { 21 } + Constant [ public int INIT_ENCRYPT_FORBIDDEN ] { 22 } + Constant [ public int INIT_DECRYPT_FORBIDDEN ] { 23 } + Constant [ public int UPDATE_FAILED ] { 24 } + Constant [ public int UPDATE_ENCRYPT_FORBIDDEN ] { 25 } + Constant [ public int UPDATE_DECRYPT_FORBIDDEN ] { 26 } + Constant [ public int FINISH_FAILED ] { 27 } + Constant [ public int FINISH_ENCRYPT_FORBIDDEN ] { 28 } + Constant [ public int FINISH_DECRYPT_FORBIDDEN ] { 29 } + Constant [ public int INPUT_DATA_LENGTH_HIGH ] { 30 } } - Static properties [0] { @@ -148,14 +148,14 @@ Extension [ extension #78 crypto version 0.3.1 ] { Class [ class Crypto\Cipher ] { - Constants [8] { - Constant [ integer MODE_ECB ] { 1 } - Constant [ integer MODE_CBC ] { 2 } - Constant [ integer MODE_CFB ] { 3 } - Constant [ integer MODE_OFB ] { 4 } - Constant [ integer MODE_CTR ] { 5 } - Constant [ integer MODE_GCM ] { 6 } - Constant [ integer MODE_CCM ] { 7 } - Constant [ integer MODE_XTS ] { 65537 } + Constant [ public int MODE_ECB ] { 1 } + Constant [ public int MODE_CBC ] { 2 } + Constant [ public int MODE_CFB ] { 3 } + Constant [ public int MODE_OFB ] { 4 } + Constant [ public int MODE_CTR ] { 5 } + Constant [ public int MODE_GCM ] { 6 } + Constant [ public int MODE_CCM ] { 7 } + Constant [ public int MODE_XTS ] { 65537 } } - Static properties [0] { @@ -208,6 +208,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ public method encryptInit ] { @@ -226,6 +229,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method encryptFinish ] { + + - Parameters [0] { + } } Method [ public method encrypt ] { @@ -253,6 +259,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method decryptFinish ] { + + - Parameters [0] { + } } Method [ public method decrypt ] { @@ -265,18 +274,33 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getBlockSize ] { + + - Parameters [0] { + } } Method [ public method getKeyLength ] { + + - Parameters [0] { + } } Method [ public method getIVLength ] { + + - Parameters [0] { + } } Method [ public method getMode ] { + + - Parameters [0] { + } } Method [ public method getTag ] { + + - Parameters [0] { + } } Method [ public method setTag ] { @@ -355,18 +379,33 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ public method digest ] { + + - Parameters [0] { + } } Method [ public method hexdigest ] { + + - Parameters [0] { + } } Method [ public method getSize ] { + + - Parameters [0] { + } } Method [ public method getBlockSize ] { + + - Parameters [0] { + } } } } @@ -374,13 +413,13 @@ Extension [ extension #78 crypto version 0.3.1 ] { Class [ class Crypto\HashException extends Crypto\CryptoException implements Throwable ] { - Constants [7] { - Constant [ integer HASH_ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer STATIC_METHOD_NOT_FOUND ] { 2 } - Constant [ integer STATIC_METHOD_TOO_MANY_ARGS ] { 3 } - Constant [ integer INIT_FAILED ] { 4 } - Constant [ integer UPDATE_FAILED ] { 5 } - Constant [ integer DIGEST_FAILED ] { 6 } - Constant [ integer INPUT_DATA_LENGTH_HIGH ] { 7 } + Constant [ public int HASH_ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int STATIC_METHOD_NOT_FOUND ] { 2 } + Constant [ public int STATIC_METHOD_TOO_MANY_ARGS ] { 3 } + Constant [ public int INIT_FAILED ] { 4 } + Constant [ public int UPDATE_FAILED ] { 5 } + Constant [ public int DIGEST_FAILED ] { 6 } + Constant [ public int INPUT_DATA_LENGTH_HIGH ] { 7 } } - Static properties [0] { @@ -489,18 +528,33 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ public method digest ] { + + - Parameters [0] { + } } Method [ public method hexdigest ] { + + - Parameters [0] { + } } Method [ public method getSize ] { + + - Parameters [0] { + } } Method [ public method getBlockSize ] { + + - Parameters [0] { + } } } } @@ -508,15 +562,15 @@ Extension [ extension #78 crypto version 0.3.1 ] { Class [ class Crypto\MACException extends Crypto\HashException implements Throwable ] { - Constants [9] { - Constant [ integer HASH_ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer STATIC_METHOD_NOT_FOUND ] { 2 } - Constant [ integer STATIC_METHOD_TOO_MANY_ARGS ] { 3 } - Constant [ integer INIT_FAILED ] { 4 } - Constant [ integer UPDATE_FAILED ] { 5 } - Constant [ integer DIGEST_FAILED ] { 6 } - Constant [ integer INPUT_DATA_LENGTH_HIGH ] { 7 } - Constant [ integer MAC_ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer KEY_LENGTH_INVALID ] { 2 } + Constant [ public int HASH_ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int STATIC_METHOD_NOT_FOUND ] { 2 } + Constant [ public int STATIC_METHOD_TOO_MANY_ARGS ] { 3 } + Constant [ public int INIT_FAILED ] { 4 } + Constant [ public int UPDATE_FAILED ] { 5 } + Constant [ public int DIGEST_FAILED ] { 6 } + Constant [ public int INPUT_DATA_LENGTH_HIGH ] { 7 } + Constant [ public int MAC_ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int KEY_LENGTH_INVALID ] { 2 } } - Static properties [0] { @@ -625,18 +679,33 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ public method digest ] { + + - Parameters [0] { + } } Method [ public method hexdigest ] { + + - Parameters [0] { + } } Method [ public method getSize ] { + + - Parameters [0] { + } } Method [ public method getBlockSize ] { + + - Parameters [0] { + } } } } @@ -695,18 +764,33 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ public method digest ] { + + - Parameters [0] { + } } Method [ public method hexdigest ] { + + - Parameters [0] { + } } Method [ public method getSize ] { + + - Parameters [0] { + } } Method [ public method getBlockSize ] { + + - Parameters [0] { + } } } } @@ -740,6 +824,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { - Methods [5] { Method [ public method __construct ] { + + - Parameters [0] { + } } Method [ public method encodeUpdate ] { @@ -750,6 +837,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method encodeFinish ] { + + - Parameters [0] { + } } Method [ public method decodeUpdate ] { @@ -760,6 +850,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method decodeFinish ] { + + - Parameters [0] { + } } } } @@ -767,12 +860,12 @@ Extension [ extension #78 crypto version 0.3.1 ] { Class [ class Crypto\Base64Exception extends Crypto\CryptoException implements Throwable ] { - Constants [6] { - Constant [ integer ENCODE_UPDATE_FORBIDDEN ] { 1 } - Constant [ integer ENCODE_FINISH_FORBIDDEN ] { 2 } - Constant [ integer DECODE_UPDATE_FORBIDDEN ] { 3 } - Constant [ integer DECODE_FINISH_FORBIDDEN ] { 4 } - Constant [ integer DECODE_UPDATE_FAILED ] { 5 } - Constant [ integer INPUT_DATA_LENGTH_HIGH ] { 6 } + Constant [ public int ENCODE_UPDATE_FORBIDDEN ] { 1 } + Constant [ public int ENCODE_FINISH_FORBIDDEN ] { 2 } + Constant [ public int DECODE_UPDATE_FORBIDDEN ] { 3 } + Constant [ public int DECODE_FINISH_FORBIDDEN ] { 4 } + Constant [ public int DECODE_UPDATE_FAILED ] { 5 } + Constant [ public int INPUT_DATA_LENGTH_HIGH ] { 6 } } - Static properties [0] { @@ -854,6 +947,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ static public method cleanup ] { + + - Parameters [0] { + } } Method [ static public method loadFile ] { @@ -882,10 +978,10 @@ Extension [ extension #78 crypto version 0.3.1 ] { Class [ class Crypto\RandException extends Crypto\CryptoException implements Throwable ] { - Constants [4] { - Constant [ integer GENERATE_PREDICTABLE ] { 1 } - Constant [ integer FILE_WRITE_PREDICTABLE ] { 2 } - Constant [ integer REQUESTED_BYTES_NUMBER_TOO_HIGH ] { 3 } - Constant [ integer SEED_LENGTH_TOO_HIGH ] { 4 } + Constant [ public int GENERATE_PREDICTABLE ] { 1 } + Constant [ public int FILE_WRITE_PREDICTABLE ] { 2 } + Constant [ public int REQUESTED_BYTES_NUMBER_TOO_HIGH ] { 3 } + Constant [ public int SEED_LENGTH_TOO_HIGH ] { 4 } } - Static properties [0] { @@ -971,6 +1067,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getLength ] { + + - Parameters [0] { + } } Method [ public method setLength ] { @@ -981,6 +1080,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getSalt ] { + + - Parameters [0] { + } } Method [ public method setSalt ] { @@ -995,11 +1097,11 @@ Extension [ extension #78 crypto version 0.3.1 ] { Class [ class Crypto\KDFException extends Crypto\CryptoException implements Throwable ] { - Constants [5] { - Constant [ integer KEY_LENGTH_LOW ] { 1 } - Constant [ integer KEY_LENGTH_HIGH ] { 2 } - Constant [ integer SALT_LENGTH_HIGH ] { 3 } - Constant [ integer PASSWORD_LENGTH_INVALID ] { 4 } - Constant [ integer DERIVATION_FAILED ] { 5 } + Constant [ public int KEY_LENGTH_LOW ] { 1 } + Constant [ public int KEY_LENGTH_HIGH ] { 2 } + Constant [ public int SALT_LENGTH_HIGH ] { 3 } + Constant [ public int PASSWORD_LENGTH_INVALID ] { 4 } + Constant [ public int DERIVATION_FAILED ] { 5 } } - Static properties [0] { @@ -1087,6 +1189,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getIterations ] { + + - Parameters [0] { + } } Method [ public method setIterations ] { @@ -1097,6 +1202,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getHashAlgorithm ] { + + - Parameters [0] { + } } Method [ public method setHashAlgorithm ] { @@ -1107,6 +1215,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getLength ] { + + - Parameters [0] { + } } Method [ public method setLength ] { @@ -1117,6 +1228,9 @@ Extension [ extension #78 crypto version 0.3.1 ] { } Method [ public method getSalt ] { + + - Parameters [0] { + } } Method [ public method setSalt ] { @@ -1131,13 +1245,13 @@ Extension [ extension #78 crypto version 0.3.1 ] { Class [ class Crypto\PBKDF2Exception extends Crypto\KDFException implements Throwable ] { - Constants [7] { - Constant [ integer KEY_LENGTH_LOW ] { 1 } - Constant [ integer KEY_LENGTH_HIGH ] { 2 } - Constant [ integer SALT_LENGTH_HIGH ] { 3 } - Constant [ integer PASSWORD_LENGTH_INVALID ] { 4 } - Constant [ integer DERIVATION_FAILED ] { 5 } - Constant [ integer HASH_ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer ITERATIONS_HIGH ] { 2 } + Constant [ public int KEY_LENGTH_LOW ] { 1 } + Constant [ public int KEY_LENGTH_HIGH ] { 2 } + Constant [ public int SALT_LENGTH_HIGH ] { 3 } + Constant [ public int PASSWORD_LENGTH_INVALID ] { 4 } + Constant [ public int DERIVATION_FAILED ] { 5 } + Constant [ public int HASH_ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int ITERATIONS_HIGH ] { 2 } } - Static properties [0] { diff --git a/php-pecl-crypto.spec b/php-pecl-crypto.spec index cdcded6..cea2879 100644 --- a/php-pecl-crypto.spec +++ b/php-pecl-crypto.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-crypto # -# Copyright (c) 2013-2018 Remi Collet +# Copyright (c) 2013-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -26,14 +26,15 @@ Summary: Wrapper for OpenSSL Crypto Library Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 0.3.1 -Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 0.3.2 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel > 5.3 +BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear # don't use pkg-config to avoid compat-openssl10 BuildRequires: openssl-devel @@ -51,46 +52,16 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %endif -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} %if "%{php_version}" > "7.3" Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} %endif @@ -110,7 +81,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS - # Sanity check, really often broken extver=$(sed -n '/#define PHP_CRYPTO_VERSION/{s/.* "//;s/".*$//;p}' php_crypto.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -195,13 +165,6 @@ fi %check -%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 -: Ignore tests broken by new algo -rm ?TS/tests/Cipher_getAlgorithms_all_basic.phpt -rm ?TS/tests/Cipher_getAlgorithms_ccm_basic.phpt -rm ?TS/tests/Hash_getAlgorithms_basic.phpt -%endif - cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ @@ -250,6 +213,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Mon Mar 8 2021 Remi Collet - 0.3.2-1 +- update to 0.3.2 + * Tue Sep 03 2019 Remi Collet - 0.3.1-9 - rebuild for 7.4.0RC1 -- cgit