Skip to content

Commit 449c07d

Browse files
committed
Make sure there's an issuer certificate
1 parent d7cf714 commit 449c07d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/OCSP/Ocsp.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ public static function sendRequestRaw( $certificate, $issuerCertificate = null,
212212
/** @var Sequence $certificate */
213213
/** @var Sequence $issuerCertificate */
214214

215+
// Without an issuer certificate instance extractRequestInfo will throw an exception
216+
if( ! $issuerCertificate )
217+
$issuerCertificate = $certificate;
218+
215219
// Extract the relevant data from the two certificates
216220
$requestInfo = $certificateInfo->extractRequestInfo( $certificate, $issuerCertificate );
217221

@@ -233,8 +237,8 @@ public static function sendRequestRaw( $certificate, $issuerCertificate = null,
233237
}
234238
catch( VerificationException $ex )
235239
{
236-
// error_log( $resultB64 );
237-
// error_log( $ex );
240+
error_log( $resultB64 );
241+
error_log( $ex );
238242
throw $ex;
239243
}
240244

0 commit comments

Comments
 (0)