summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-01-10 08:17:15 +0100
committerRemi Collet <remi@remirepo.net>2021-01-10 08:17:15 +0100
commit672e0c1f3d33770b2a63b5ebbd0d256ee757dd49 (patch)
tree5a54717498ffbb3830108a593476e950b1f1e6fd
parentd60c070094e4cd2eff9b31cb25fe0363de7e152e (diff)
update to 0.1.1HEADmaster
open https://github.com/gamringer/php-pkcs11/issues/37 segfaults join https://github.com/gamringer/php-pkcs11/issues/36 type hinting
-rw-r--r--REFLECTION130
-rw-r--r--php-pecl-pkcs11.spec16
2 files changed, 74 insertions, 72 deletions
diff --git a/REFLECTION b/REFLECTION
index 47f7d27..bddfa0e 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
+Extension [ <persistent> extension #94 pkcs11 version 0.1.1 ] {
- Constants [784] {
Constant [ int Pkcs11\CKM_RSA_PKCS_KEY_PAIR_GEN ] { 0 }
@@ -879,48 +879,48 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_GetInfo ] {
- Parameters [1] {
- Parameter #0 [ <required> &$pInfo ]
+ Parameter #0 [ <required> array or NULL &$pInfo ]
}
}
Method [ <internal:pkcs11> public method C_GetSlotList ] {
- Parameters [2] {
- Parameter #0 [ <required> $tokenPresent ]
- Parameter #1 [ <required> &$pSlotList ]
+ Parameter #0 [ <required> bool $tokenPresent ]
+ Parameter #1 [ <required> array or NULL &$pSlotList ]
}
}
Method [ <internal:pkcs11> public method C_GetSlotInfo ] {
- Parameters [2] {
- Parameter #0 [ <required> $slotId ]
- Parameter #1 [ <required> &$pInfo ]
+ Parameter #0 [ <required> int $slotId ]
+ Parameter #1 [ <required> array or NULL &$pInfo ]
}
}
Method [ <internal:pkcs11> public method C_GetTokenInfo ] {
- Parameters [2] {
- Parameter #0 [ <required> $slotId ]
- Parameter #1 [ <required> &$pInfo ]
+ Parameter #0 [ <required> int $slotId ]
+ Parameter #1 [ <required> array or NULL &$pInfo ]
}
}
Method [ <internal:pkcs11> public method C_GetMechanismList ] {
- Parameters [2] {
- Parameter #0 [ <required> $slotId ]
- Parameter #1 [ <required> &$pMechanismList ]
+ Parameter #0 [ <required> int $slotId ]
+ Parameter #1 [ <required> array or NULL &$pMechanismList ]
}
}
Method [ <internal:pkcs11> public method C_GetMechanismInfo ] {
- Parameters [3] {
- Parameter #0 [ <required> $slotId ]
- Parameter #1 [ <required> $type ]
- Parameter #2 [ <required> &$pInfo ]
+ Parameter #0 [ <required> int $slotId ]
+ Parameter #1 [ <required> int $type ]
+ Parameter #2 [ <required> array or NULL &$pInfo ]
}
}
@@ -936,7 +936,7 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_SetPIN ] {
- Parameters [3] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> string $oldPin ]
Parameter #2 [ <required> string $newPin ]
}
@@ -945,7 +945,7 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_InitPIN ] {
- Parameters [2] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> string $newPin ]
}
}
@@ -955,31 +955,31 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
- Parameters [5] {
Parameter #0 [ <required> int $slotID ]
Parameter #1 [ <required> int $flags ]
- Parameter #2 [ <required> resource or NULL $pApplication_TODO ]
- Parameter #3 [ <required> callable or NULL $Notify_TODO ]
- Parameter #4 [ <required> &$hSession ]
+ Parameter #2 [ <required> string or NULL $pApplication ]
+ Parameter #3 [ <required> callable or NULL $notify ]
+ Parameter #4 [ <required> Pkcs11\Session or NULL &$hSession ]
}
}
Method [ <internal:pkcs11> public method C_CloseSession ] {
- Parameters [1] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
}
}
Method [ <internal:pkcs11> public method C_GetSessionInfo ] {
- Parameters [2] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <optional> &$pInfo ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <optional> array or NULL &$pInfo ]
}
}
Method [ <internal:pkcs11> public method C_Login ] {
- Parameters [3] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> int $loginType ]
Parameter #2 [ <required> string $pin ]
}
@@ -988,44 +988,44 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_Logout ] {
- Parameters [1] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
}
}
Method [ <internal:pkcs11> public method C_GenerateKey ] {
- Parameters [4] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <required> object $mechanism ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <required> Pkcs11\Mechanism $mechanism ]
Parameter #2 [ <required> array $template ]
- Parameter #3 [ <optional> &$phKey ]
+ Parameter #3 [ <optional> Pkcs11\Key or NULL &$phKey ]
}
}
Method [ <internal:pkcs11> public method C_GenerateKeyPair ] {
- Parameters [6] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <required> object $mechanism ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <required> Pkcs11\Mechanism $mechanism ]
Parameter #2 [ <required> array $pkTemplate ]
Parameter #3 [ <required> array $skTemplate ]
- Parameter #4 [ <optional> &$phPublicKey ]
- Parameter #5 [ <optional> &$phPrivateKey ]
+ Parameter #4 [ <optional> Pkcs11\Key or NULL &$phPublicKey ]
+ Parameter #5 [ <optional> Pkcs11\Key or NULL &$phPrivateKey ]
}
}
Method [ <internal:pkcs11> public method C_DigestInit ] {
- Parameters [2] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <required> object $mechanism ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <required> Pkcs11\Mechanism $mechanism ]
}
}
Method [ <internal:pkcs11> public method C_Digest ] {
- Parameters [2] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> string $data ]
}
}
@@ -1033,7 +1033,7 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_DigestUpdate ] {
- Parameters [2] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> string $part ]
}
}
@@ -1041,23 +1041,23 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_DigestKey ] {
- Parameters [2] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <required> object $key ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <required> Pkcs11\Key $key ]
}
}
Method [ <internal:pkcs11> public method C_DigestFinal ] {
- Parameters [1] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
}
}
Method [ <internal:pkcs11> public method C_SignInit ] {
- Parameters [3] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <required> object $mechanism ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <required> Pkcs11\Mechanism $mechanism ]
Parameter #2 [ <required> int $key ]
}
}
@@ -1065,7 +1065,7 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_Sign ] {
- Parameters [3] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> string $data ]
Parameter #2 [ <required> string or NULL &$signature ]
}
@@ -1074,8 +1074,8 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_VerifyInit ] {
- Parameters [3] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <required> object $mechanism ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <required> Pkcs11\Mechanism $mechanism ]
Parameter #2 [ <required> int $key ]
}
}
@@ -1083,7 +1083,7 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_Verify ] {
- Parameters [3] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> string $data ]
Parameter #2 [ <required> string $signature ]
}
@@ -1092,32 +1092,33 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_GenerateRandom ] {
- Parameters [3] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <optional> int $RandomLen ]
- Parameter #2 [ <optional> &$pRandomData ]
+ Parameter #2 [ <optional> string or NULL &$pRandomData ]
}
}
Method [ <internal:pkcs11> public method C_SeedRandom ] {
- Parameters [2] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <optional> string $Seed ]
}
}
Method [ <internal:pkcs11> public method C_CreateObject ] {
- - Parameters [2] {
- Parameter #0 [ <required> object $session ]
+ - Parameters [3] {
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> array $template ]
+ Parameter #2 [ <required> Pkcs11\Object or NULL &$phObject ]
}
}
Method [ <internal:pkcs11> public method C_FindObjectsInit ] {
- Parameters [2] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> array $template ]
}
}
@@ -1125,8 +1126,8 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_FindObjects ] {
- Parameters [3] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <required> &$Objects ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <required> array or NULL &$Objects ]
Parameter #2 [ <optional> int $MaxObjectCount ]
}
}
@@ -1134,14 +1135,14 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_FindObjectsFinal ] {
- Parameters [1] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
}
}
Method [ <internal:pkcs11> public method C_GetAttributeValue ] {
- Parameters [3] {
- Parameter #0 [ <required> object $session ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
Parameter #1 [ <required> int $object ]
Parameter #2 [ <required> array &$template ]
}
@@ -1149,18 +1150,19 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method C_CopyObject ] {
- - Parameters [3] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <required> object $object ]
+ - Parameters [4] {
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <required> Pkcs11\Object $object ]
Parameter #2 [ <required> array $template ]
+ Parameter #3 [ <required> Pkcs11\Object or NULL &$phNewObject ]
}
}
Method [ <internal:pkcs11> public method C_DestroyObject ] {
- Parameters [2] {
- Parameter #0 [ <required> object $session ]
- Parameter #1 [ <required> $object ]
+ Parameter #0 [ <required> Pkcs11\Session $session ]
+ Parameter #1 [ <required> Pkcs11\Object $object ]
}
}
}
@@ -1233,7 +1235,7 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method copyObject ] {
- Parameters [2] {
- Parameter #0 [ <required> $object ]
+ Parameter #0 [ <required> Pkcs11\Object $object ]
Parameter #1 [ <required> array $template ]
}
}
@@ -1241,14 +1243,14 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method destroyObject ] {
- Parameters [1] {
- Parameter #0 [ <required> $object ]
+ Parameter #0 [ <required> Pkcs11\Object $object ]
}
}
Method [ <internal:pkcs11> public method digest ] {
- Parameters [2] {
- Parameter #0 [ <required> object $mechanism ]
+ Parameter #0 [ <required> Pkcs11\Mechanism $mechanism ]
Parameter #1 [ <required> string $data ]
}
}
@@ -1256,14 +1258,14 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method initializeDigest ] {
- Parameters [1] {
- Parameter #0 [ <required> object $mechanism ]
+ Parameter #0 [ <required> Pkcs11\Mechanism $mechanism ]
}
}
Method [ <internal:pkcs11> public method generateKey ] {
- Parameters [2] {
- Parameter #0 [ <required> object $mechanism ]
+ Parameter #0 [ <required> Pkcs11\Mechanism $mechanism ]
Parameter #1 [ <required> array $template ]
}
}
@@ -1271,7 +1273,7 @@ Extension [ <persistent> extension #94 pkcs11 version 0.1 ] {
Method [ <internal:pkcs11> public method generateKeyPair ] {
- Parameters [3] {
- Parameter #0 [ <required> object $mechanism ]
+ Parameter #0 [ <required> Pkcs11\Mechanism $mechanism ]
Parameter #1 [ <required> array $pkTemplate ]
Parameter #2 [ <optional> array $skTemplate ]
}
diff --git a/php-pecl-pkcs11.spec b/php-pecl-pkcs11.spec
index b946270..24c476c 100644
--- a/php-pecl-pkcs11.spec
+++ b/php-pecl-pkcs11.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-pkcs11
#
-# Copyright (c) 2020 Remi Collet
+# Copyright (c) 2020-2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -28,7 +28,7 @@
Summary: PHP Bindings for PKCS11 modules
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 0.1
+Version: 0.1.1
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
URL: https://pecl.php.net/package/%{pecl_name}
@@ -36,7 +36,7 @@ Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7.0
+BuildRequires: %{?scl_prefix}php-devel >= 7.4
BuildRequires: %{?scl_prefix}php-pear
%if %{with tests}
BuildRequires: softhsm
@@ -57,12 +57,7 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele
%endif
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "8.0"
Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
@@ -221,6 +216,11 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Sun Jan 10 2021 Remi Collet <remi@remirepo.net> - 0.1.1-1
+- update to 0.1.1
+- open https://github.com/gamringer/php-pkcs11/issues/37 segfaults
+- join https://github.com/gamringer/php-pkcs11/issues/36 type hinting
+
* Wed Dec 30 2020 Remi Collet <remi@remirepo.net> - 0.1-1
- initial package, version 0.1 (php 7, beta)
- open https://github.com/gamringer/php-pkcs11/issues/20 build with php < 7.4