summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--REFLECTION44
-rw-r--r--libsodium-pr70.patch39
-rw-r--r--php-pecl-libsodium.spec22
3 files changed, 54 insertions, 51 deletions
diff --git a/REFLECTION b/REFLECTION
index ed4b650..32773c1 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,6 +1,6 @@
-Extension [ <persistent> extension #117 libsodium version 1.0.2 ] {
+Extension [ <persistent> extension #121 libsodium version 1.0.3 ] {
- - Constants [46] {
+ - Constants [54] {
Constant [ integer Sodium\CRYPTO_AEAD_AES256GCM_KEYBYTES ] { 32 }
Constant [ integer Sodium\CRYPTO_AEAD_AES256GCM_NSECBYTES ] { 0 }
Constant [ integer Sodium\CRYPTO_AEAD_AES256GCM_NPUBBYTES ] { 12 }
@@ -27,6 +27,14 @@ Extension [ <persistent> extension #117 libsodium version 1.0.2 ] {
Constant [ integer Sodium\CRYPTO_GENERICHASH_KEYBYTES ] { 32 }
Constant [ integer Sodium\CRYPTO_GENERICHASH_KEYBYTES_MIN ] { 16 }
Constant [ integer Sodium\CRYPTO_GENERICHASH_KEYBYTES_MAX ] { 64 }
+ Constant [ integer Sodium\CRYPTO_PWHASH_SALTBYTES ] { 16 }
+ Constant [ string Sodium\CRYPTO_PWHASH_STRPREFIX ] { $argon2i$ }
+ Constant [ integer Sodium\CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE ] { 4 }
+ Constant [ integer Sodium\CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE ] { 33554432 }
+ Constant [ integer Sodium\CRYPTO_PWHASH_OPSLIMIT_MODERATE ] { 6 }
+ Constant [ integer Sodium\CRYPTO_PWHASH_MEMLIMIT_MODERATE ] { 6 }
+ Constant [ integer Sodium\CRYPTO_PWHASH_OPSLIMIT_SENSITIVE ] { 8 }
+ Constant [ integer Sodium\CRYPTO_PWHASH_MEMLIMIT_SENSITIVE ] { 8 }
Constant [ integer Sodium\CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES ] { 32 }
Constant [ string Sodium\CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX ] { $7$ }
Constant [ integer Sodium\CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE ] { 524288 }
@@ -210,6 +218,31 @@ Extension [ <persistent> extension #117 libsodium version 1.0.2 ] {
Parameter #1 [ <optional> $length ]
}
}
+ Function [ <internal:libsodium> function Sodium\crypto_pwhash ] {
+
+ - Parameters [5] {
+ Parameter #0 [ <required> $length ]
+ Parameter #1 [ <required> $password ]
+ Parameter #2 [ <required> $salt ]
+ Parameter #3 [ <required> $opslimit ]
+ Parameter #4 [ <required> $memlimit ]
+ }
+ }
+ Function [ <internal:libsodium> function Sodium\crypto_pwhash_str ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> $password ]
+ Parameter #1 [ <required> $opslimit ]
+ Parameter #2 [ <required> $memlimit ]
+ }
+ }
+ Function [ <internal:libsodium> function Sodium\crypto_pwhash_str_verify ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> $hash ]
+ Parameter #1 [ <required> $password ]
+ }
+ }
Function [ <internal:libsodium> function Sodium\crypto_pwhash_scryptsalsa208sha256 ] {
- Parameters [5] {
@@ -400,6 +433,13 @@ Extension [ <persistent> extension #117 libsodium version 1.0.2 ] {
Parameter #0 [ <required> $string ]
}
}
+ Function [ <internal:libsodium> function Sodium\add ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> $string_1 ]
+ Parameter #1 [ <required> $string_2 ]
+ }
+ }
Function [ <internal:libsodium> function Sodium\library_version_major ] {
- Parameters [0] {
diff --git a/libsodium-pr70.patch b/libsodium-pr70.patch
deleted file mode 100644
index b97287f..0000000
--- a/libsodium-pr70.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From ca45bd4a55541d58136c21b38b9b90e750fedfbc Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Mon, 30 Nov 2015 18:31:42 +0100
-Subject: [PATCH] fix test
-
----
- tests/crypto_auth.phpt | 12 ++++--------
- 1 file changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/tests/crypto_auth.phpt b/tests/crypto_auth.phpt
-index c72451e..76f30eb 100644
---- a/tests/crypto_auth.phpt
-+++ b/tests/crypto_auth.phpt
-@@ -18,13 +18,9 @@ var_dump(\Sodium\crypto_auth_verify($mac, $badmsg, $key));
-
- // Let's flip a bit pseudo-randomly
- $badmsg = $msg;
--$badmsg[mt_rand(0, 999)] = \chr(
-- \ord($msg[0]) ^ (
-- // Mask out higher bits (thus 256 => 0)
-- 0xFF & (
-- // 1, 2, 4, 8, 16, 32, 64, 128, 256
-- 1 << mt_rand(0, 8)
-- )
-+$badmsg[$i=mt_rand(0, 999)] = \chr(
-+ \ord($msg[$i]) ^ (
-+ 1 << mt_rand(0, 7)
- )
- );
-
-@@ -32,7 +28,7 @@ var_dump(\Sodium\crypto_auth_verify($mac, $badmsg, $key));
-
- // Now let's change a bit in the MAC
- $badmac = $mac;
--$badmac[0] = \chr(\ord($badmsg[0]) ^ 0x80);
-+$badmac[0] = \chr(\ord($badmac[0]) ^ 0x80);
- var_dump(\Sodium\crypto_auth_verify($badmac, $msg, $key));
- ?>
- --EXPECT--
diff --git a/php-pecl-libsodium.spec b/php-pecl-libsodium.spec
index 0ce52a0..0b3abe6 100644
--- a/php-pecl-libsodium.spec
+++ b/php-pecl-libsodium.spec
@@ -12,11 +12,10 @@
%else
%global sub_prefix %{scl_prefix}
%endif
+%scl_package php-pecl-libsodium
%endif
-%{?scl: %scl_package php-pecl-libsodium}
-
-%global with_zts 0%{?__ztsphp:1}
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name libsodium
%global with_tests 0%{!?_without_tests:1}
%if "%{php_version}" < "5.6"
@@ -28,16 +27,13 @@
Summary: Wrapper for the Sodium cryptographic library
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.0.2
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 1.0.3
+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
-# See https://github.com/jedisct1/libsodium-php/pull/70
-Patch0: %{pecl_name}-pr70.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{?vendor}" == "Remi Collet"
# Ensure libsodium-last is used
@@ -46,7 +42,7 @@ BuildRequires: libsodium-devel >= 1.0.7
# Per upstream documentation
BuildRequires: libsodium-devel >= 0.6.0
%endif
-BuildRequires: %{?scl_prefix}php-devel > 5.2
+BuildRequires: %{?scl_prefix}php-devel > 5.4
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
BuildRequires: pkgconfig
@@ -60,8 +56,10 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+%if "%{?scl_prefix}" != "%{?sub_prefix}"
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}
# Other third party repo stuff
@@ -106,7 +104,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p1 -b .pr70
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_LIBSODIUM_VERSION/{s/.* "//;s/".*$//;p}' php_libsodium.h)
@@ -241,6 +238,11 @@ rm -rf %{buildroot}
%changelog
+* Tue Apr 5 2016 Remi Collet <remi@fedoraproject.org> - 1.0.3-1
+- Update to 1.0.3
+- raise minimal PHP version to 5.4
+- drop patch merged upstream
+
* Sun Mar 6 2016 Remi Collet <remi@fedoraproject.org> - 1.0.2-4
- adapt for F24