From 541c91f71e648aa86407655319980f11366f8213 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Mar 2021 06:42:59 +0100 Subject: update to 1.0 --- REFLECTION | 210 +++++++++++++++++++++++++++++++++++++++++++++++---- php-pecl-pkcs11.spec | 5 +- 2 files changed, 199 insertions(+), 16 deletions(-) diff --git a/REFLECTION b/REFLECTION index bddfa0e..2caf759 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,6 +1,6 @@ -Extension [ extension #94 pkcs11 version 0.1.1 ] { +Extension [ extension #93 pkcs11 version 1.0 ] { - - Constants [784] { + - Constants [831] { Constant [ int Pkcs11\CKM_RSA_PKCS_KEY_PAIR_GEN ] { 0 } Constant [ int Pkcs11\CKM_RSA_PKCS ] { 1 } Constant [ int Pkcs11\CKM_RSA_9796 ] { 2 } @@ -435,8 +435,9 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { Constant [ int Pkcs11\CKM_SP800_108_FEEDBACK_KDF ] { 941 } Constant [ int Pkcs11\CKM_SP800_108_DOUBLE_PIPELINE_KDF ] { 942 } Constant [ int Pkcs11\CKM_VENDOR_DEFINED ] { 2147483648 } - Constant [ int Pkcs11\CKF_RW_SESSION ] { 2 } - Constant [ int Pkcs11\CKF_SERIAL_SESSION ] { 4 } + Constant [ int Pkcs11\CKF_TOKEN_PRESENT ] { 1 } + Constant [ int Pkcs11\CKF_REMOVABLE_DEVICE ] { 2 } + Constant [ int Pkcs11\CKF_HW_SLOT ] { 4 } Constant [ int Pkcs11\CKF_RNG ] { 1 } Constant [ int Pkcs11\CKF_WRITE_PROTECTED ] { 2 } Constant [ int Pkcs11\CKF_LOGIN_REQUIRED ] { 4 } @@ -456,6 +457,52 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { Constant [ int Pkcs11\CKF_SO_PIN_LOCKED ] { 4194304 } Constant [ int Pkcs11\CKF_SO_PIN_TO_BE_CHANGED ] { 8388608 } Constant [ int Pkcs11\CKF_ERROR_STATE ] { 16777216 } + Constant [ int Pkcs11\CKF_RW_SESSION ] { 2 } + Constant [ int Pkcs11\CKF_SERIAL_SESSION ] { 4 } + Constant [ int Pkcs11\CKF_ARRAY_ATTRIBUTE ] { 1073741824 } + Constant [ int Pkcs11\CKF_HW ] { 1 } + Constant [ int Pkcs11\CKF_MESSAGE_ENCRYPT ] { 2 } + Constant [ int Pkcs11\CKF_MESSAGE_DECRYPT ] { 4 } + Constant [ int Pkcs11\CKF_MESSAGE_SIGN ] { 8 } + Constant [ int Pkcs11\CKF_MESSAGE_VERIFY ] { 16 } + Constant [ int Pkcs11\CKF_MULTI_MESSAGE ] { 32 } + Constant [ int Pkcs11\CKF_MULTI_MESSGE ] { 32 } + Constant [ int Pkcs11\CKF_FIND_OBJECTS ] { 64 } + Constant [ int Pkcs11\CKF_ENCRYPT ] { 256 } + Constant [ int Pkcs11\CKF_DECRYPT ] { 512 } + Constant [ int Pkcs11\CKF_DIGEST ] { 1024 } + Constant [ int Pkcs11\CKF_SIGN ] { 2048 } + Constant [ int Pkcs11\CKF_SIGN_RECOVER ] { 4096 } + Constant [ int Pkcs11\CKF_VERIFY ] { 8192 } + Constant [ int Pkcs11\CKF_VERIFY_RECOVER ] { 16384 } + Constant [ int Pkcs11\CKF_GENERATE ] { 32768 } + Constant [ int Pkcs11\CKF_GENERATE_KEY_PAIR ] { 65536 } + Constant [ int Pkcs11\CKF_WRAP ] { 131072 } + Constant [ int Pkcs11\CKF_UNWRAP ] { 262144 } + Constant [ int Pkcs11\CKF_DERIVE ] { 524288 } + Constant [ int Pkcs11\CKF_EC_F_P ] { 1048576 } + Constant [ int Pkcs11\CKF_EC_F_2M ] { 2097152 } + Constant [ int Pkcs11\CKF_EC_ECPARAMETERS ] { 4194304 } + Constant [ int Pkcs11\CKF_EC_OID ] { 8388608 } + Constant [ int Pkcs11\CKF_EC_NAMEDCURVE ] { 8388608 } + Constant [ int Pkcs11\CKF_EC_UNCOMPRESS ] { 16777216 } + Constant [ int Pkcs11\CKF_EC_COMPRESS ] { 33554432 } + Constant [ int Pkcs11\CKF_EC_CURVENAME ] { 67108864 } + Constant [ int Pkcs11\CKF_EXTENSION ] { 2147483648 } + Constant [ int Pkcs11\CKF_END_OF_MESSAGE ] { 1 } + Constant [ int Pkcs11\CKF_INTERFACE_FORK_SAFE ] { 1 } + Constant [ int Pkcs11\CKF_LIBRARY_CANT_CREATE_OS_THREADS ] { 1 } + Constant [ int Pkcs11\CKF_OS_LOCKING_OK ] { 2 } + Constant [ int Pkcs11\CKF_DONT_BLOCK ] { 1 } + Constant [ int Pkcs11\CKF_NEXT_OTP ] { 1 } + Constant [ int Pkcs11\CKF_EXCLUDE_TIME ] { 2 } + Constant [ int Pkcs11\CKF_EXCLUDE_COUNTER ] { 4 } + Constant [ int Pkcs11\CKF_EXCLUDE_CHALLENGE ] { 8 } + Constant [ int Pkcs11\CKF_EXCLUDE_PIN ] { 16 } + Constant [ int Pkcs11\CKF_USER_FRIENDLY_OTP ] { 32 } + Constant [ int Pkcs11\CKF_HKDF_SALT_NULL ] { 1 } + Constant [ int Pkcs11\CKF_HKDF_SALT_DATA ] { 2 } + Constant [ int Pkcs11\CKF_HKDF_SALT_KEY ] { 4 } Constant [ int Pkcs11\CKU_SO ] { 0 } Constant [ int Pkcs11\CKU_USER ] { 1 } Constant [ int Pkcs11\CKU_CONTEXT_SPECIFIC ] { 2 } @@ -787,7 +834,7 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { Constant [ int Pkcs11\CKR_VENDOR_DEFINED ] { 2147483648 } } - - Classes [18] { + - Classes [19] { Class [ class Pkcs11\Module ] { - Constants [0] { @@ -802,7 +849,7 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { - Properties [0] { } - - Methods [44] { + - Methods [52] { Method [ public method __construct ] { - Parameters [1] { @@ -876,6 +923,13 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { } } + Method [ public method waitForSlotEvent ] { + + - Parameters [1] { + Parameter #0 [ int or NULL $php_flags ] + } + } + Method [ public method C_GetInfo ] { - Parameters [1] { @@ -992,13 +1046,21 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { } } + Method [ public method C_WaitForSlotEvent ] { + + - Parameters [2] { + Parameter #0 [ int or NULL $php_flags ] + Parameter #1 [ int or NULL &$php_slotID ] + } + } + Method [ public method C_GenerateKey ] { - Parameters [4] { Parameter #0 [ Pkcs11\Session $session ] Parameter #1 [ Pkcs11\Mechanism $mechanism ] Parameter #2 [ array $template ] - Parameter #3 [ Pkcs11\Key or NULL &$phKey ] + Parameter #3 [ IS_LONG or NULL &$phKey ] } } @@ -1024,9 +1086,10 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { Method [ public method C_Digest ] { - - Parameters [2] { + - Parameters [3] { Parameter #0 [ Pkcs11\Session $session ] Parameter #1 [ string $data ] + Parameter #2 [ string or NULL &$digest ] } } @@ -1048,8 +1111,9 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { Method [ public method C_DigestFinal ] { - - Parameters [1] { + - Parameters [2] { Parameter #0 [ Pkcs11\Session $session ] + Parameter #1 [ string or NULL &$digest ] } } @@ -1089,6 +1153,65 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { } } + Method [ public method C_EncryptInit ] { + + - Parameters [3] { + Parameter #0 [ Pkcs11\Session $session ] + Parameter #1 [ Pkcs11\Mechanism $mechanism ] + Parameter #2 [ int $key ] + } + } + + Method [ public method C_Encrypt ] { + + - Parameters [3] { + Parameter #0 [ Pkcs11\Session $session ] + Parameter #1 [ string $data ] + Parameter #2 [ string or NULL &$encryptedData ] + } + } + + Method [ public method C_DecryptInit ] { + + - Parameters [3] { + Parameter #0 [ Pkcs11\Session $session ] + Parameter #1 [ Pkcs11\Mechanism $mechanism ] + Parameter #2 [ int $key ] + } + } + + Method [ public method C_Decrypt ] { + + - Parameters [3] { + Parameter #0 [ Pkcs11\Session $session ] + Parameter #1 [ string $encryptedData ] + Parameter #2 [ string or NULL &$data ] + } + } + + Method [ public method C_Wrap ] { + + - Parameters [5] { + Parameter #0 [ Pkcs11\Session $session ] + Parameter #1 [ Pkcs11\Mechanism $mechanism ] + Parameter #2 [ int $keyId ] + Parameter #3 [ int $targetKeyId ] + Parameter #4 [ string or NULL &$ciphertext ] + } + } + + Method [ public method C_Unwrap ] { + + - Parameters [6] { + Parameter #0 [ Pkcs11\Session $session ] + Parameter #1 [ Pkcs11\Mechanism $mechanism ] + Parameter #2 [ int $keyId ] + Parameter #3 [ string $encryptedData ] + Parameter #4 [ array $template ] + Parameter #5 [ int or NULL &$keyId ] + } + } + Method [ public method C_GenerateRandom ] { - Parameters [3] { @@ -1111,7 +1234,7 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { - Parameters [3] { Parameter #0 [ Pkcs11\Session $session ] Parameter #1 [ array $template ] - Parameter #2 [ Pkcs11\Object or NULL &$phObject ] + Parameter #2 [ Pkcs11\P11Object or NULL &$phObject ] } } @@ -1152,9 +1275,9 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { - Parameters [4] { Parameter #0 [ Pkcs11\Session $session ] - Parameter #1 [ Pkcs11\Object $object ] + Parameter #1 [ Pkcs11\P11Object $object ] Parameter #2 [ array $template ] - Parameter #3 [ Pkcs11\Object or NULL &$phNewObject ] + Parameter #3 [ Pkcs11\P11Object or NULL &$phNewObject ] } } @@ -1162,7 +1285,7 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { - Parameters [2] { Parameter #0 [ Pkcs11\Session $session ] - Parameter #1 [ Pkcs11\Object $object ] + Parameter #1 [ Pkcs11\P11Object $object ] } } } @@ -1235,7 +1358,7 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { Method [ public method copyObject ] { - Parameters [2] { - Parameter #0 [ Pkcs11\Object $object ] + Parameter #0 [ Pkcs11\P11Object $object ] Parameter #1 [ array $template ] } } @@ -1243,7 +1366,7 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { Method [ public method destroyObject ] { - Parameters [1] { - Parameter #0 [ Pkcs11\Object $object ] + Parameter #0 [ Pkcs11\P11Object $object ] } } @@ -1832,6 +1955,63 @@ Extension [ extension #94 pkcs11 version 0.1.1 ] { } } } + + Class [ class Pkcs11\Exception extends Exception implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [10] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ public method __wakeup ] { + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } } } diff --git a/php-pecl-pkcs11.spec b/php-pecl-pkcs11.spec index 24c476c..a90fd26 100644 --- a/php-pecl-pkcs11.spec +++ b/php-pecl-pkcs11.spec @@ -28,7 +28,7 @@ Summary: PHP Bindings for PKCS11 modules Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 0.1.1 +Version: 1.0 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP URL: https://pecl.php.net/package/%{pecl_name} @@ -216,6 +216,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Mar 24 2021 Remi Collet - 1.0-1 +- update to 1.0 + * Sun Jan 10 2021 Remi Collet - 0.1.1-1 - update to 0.1.1 - open https://github.com/gamringer/php-pkcs11/issues/37 segfaults -- cgit