озвращаем алгоритм массивом

This commit is contained in:
Artem Vasilev 2022-11-04 17:02:07 +03:00
parent bafd80f316
commit c47e29fc9f

View File

@ -102,7 +102,7 @@ class Certificate
* возвращает информацию об алгоритме сертификата * возвращает информацию об алгоритме сертификата
* *
* @throws \Exception * @throws \Exception
* @return AlgorithmInfoInterface * @return array
*/ */
public function getAlgorithm() public function getAlgorithm()
{ {
@ -110,10 +110,10 @@ class Certificate
{ {
$cadesPublicKey = $this->_cadesCertificate->PublicKey(); $cadesPublicKey = $this->_cadesCertificate->PublicKey();
$cadesPublicKeyAlgorithm = $cadesPublicKey->get_Algorithm(); $cadesPublicKeyAlgorithm = $cadesPublicKey->get_Algorithm();
$algorithmInfo = new class( $algorithmInfo = [
$cadesPublicKeyAlgorithm->get_FriendlyName(), 'algorithm' => $cadesPublicKeyAlgorithm->get_FriendlyName(),
$cadesPublicKeyAlgorithm->get_Value()) extends AbstractAlgorithmInfo { 'oid' => $cadesPublicKeyAlgorithm->get_Value(),
}; ];
} }
catch (\Throwable $e) catch (\Throwable $e)
{ {