Closed Ali7med closed 2 years ago
Hi, Ali!
This config element is a configuration for Windows users that want to use the key generation and certificate signing functions. When either function is called, PHP will search for the openssl.cnf in your system path. You must indicate its location or it will be assumed it is in the default certificate location, configured when the openssl DLL was compiled.
The current ECDSA is only a thin OpenSSL wrapper which requires this system configuration to use it. We intend to update this starkbank/ecdsa-php to a native version in order to prevent system configuration problems.
While the native version is not released, it’s possible to fork the repository and add this config parameter at your side.
If you have any additional questions, don’t hesitate to ask!
Best,
thanks , its solved
hi , i have error in use this algorithm when i try to solve this issue , i found you not declare the conflig with the class PrivateKey . $config = array( "config" => 'C:/xampp/php/extras/openssl/openssl.cnf', "digest_alg" => "sha256", "private_key_bits" => 2048, "private_key_type" => OPENSSL_KEYTYPE_EC, "curve_name" => $curve ); u can check the https://www.php.net/manual/en/function.openssl-pkey-new.php
thanks