Fix missing brace

This commit is contained in:
Damodar Lohani 2026-01-01 07:35:28 +00:00
parent 4ef906b836
commit 4b3fe0b6fe

View file

@ -72,9 +72,9 @@ class Get extends Action
$streamContextParams = stream_context_get_params($sslSocket);
$peerCertificate = $streamContextParams['options']['ssl']['peer_certificate'];
$certificatePayload = openssl_x509_parse($peerCertificate);
fclose($sslSocket); // Close the socket to prevent resource leak
if ($certificatePayload === false) {
throw new Exception(Exception::HEALTH_INVALID_HOST);
}
@ -94,4 +94,5 @@ class Get extends Action
'validTo' => $certificatePayload['validTo_time_t'],
'signatureTypeSN' => $certificatePayload['signatureTypeSN'] ?? '',
]), Response::MODEL_HEALTH_CERTIFICATE);
}
}