Исправление ошибки проверки даты сертификата

This commit is contained in:
Artem Vasilev 2022-11-09 18:43:03 +03:00
parent 84879f7a1e
commit 84dd8b6dfd

View File

@ -691,16 +691,18 @@ class CryptoPro
if ($validOnly === true) if ($validOnly === true)
{ {
$currentDateTime = (new \DateTime())->format('YmdHis.u') . 'Z';
$cadesCertificates = $cadesCertificates->Find( $cadesCertificates = $cadesCertificates->Find(
CAPICOM_CERTIFICATE_FIND_TYPE::TIME_VALID, CAPICOM_CERTIFICATE_FIND_TYPE::TIME_VALID,
'', $currentDateTime,
true true
); );
$cadesCertificates = $cadesCertificates->Find( $cadesCertificates = $cadesCertificates->Find(
CAPICOM_CERTIFICATE_FIND_TYPE::EXTENDED_PROPERTY, CAPICOM_CERTIFICATE_FIND_TYPE::EXTENDED_PROPERTY,
CAPICOM_PROPID::KEY_PROV_INFO, CAPICOM_PROPID::KEY_PROV_INFO,
true false
); );
} }