I know documentation says to pass in intermediate CAs. But Mobile-ID and Smart-ID libraries require full chain - so I can't reference the same CA directory.
The "getChain()" returns
- current cert
- intermediate certs...
- root cert
Would be nice if this would return the second (intermediate) cert otherwise OCSP revocation check will fail.
|
if ($certificate->validateSignature()) { |
|
$chain = $certificate->getChain(); |
|
$trustedCACert = end($chain); |
|
|
|
// Verify that the trusted CA cert is presently valid before returning the result. |
|
self::certificateIsValidOnDate($trustedCACert, $now, "Trusted CA"); |
|
return $trustedCACert; |
|
} |