More TSA fixes

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO
2020-10-17 20:33:00 +02:00
parent 4a131f3058
commit 427114b892
3 changed files with 13 additions and 4 deletions

View File

@ -82,9 +82,12 @@ if(MODE == 'time' && $data[COUNT] < 1) {
exit;
}
$requestfile_path = TrustedTimestamps::createRequestfile($data[HASH_VALUE]);
$response = TrustedTimestamps::signRequestfile($requestfile_path, TSA_URL);
try {
$requestfile_path = TrustedTimestamps::createRequestfile($data[HASH_VALUE]);
$response = TrustedTimestamps::signRequestfile($requestfile_path, TSA_URL);
} catch(Exception $e) {
die("Error: " . $e->getMessage() . "\n");
}
$data[RESPONSE_STRING] = $response[RESPONSE_STRING];
$data[RESPONSE_TIME] = $response[RESPONSE_TIME];