mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:01:58 +01:00
Handle timestamp validation exception
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
b83ebdd8f1
commit
6c6e873043
@ -386,8 +386,14 @@ class ModelSearchMessage extends Model {
|
||||
}
|
||||
|
||||
if($query->row['hash_value'] == $computed_hash) {
|
||||
$validate = TrustedTimestamps::validate($query->row['hash_value'], $query->row['response_string'], $query->row['response_time'], TSA_PUBLIC_KEY_FILE);
|
||||
if($validate == true) { return 1; }
|
||||
try {
|
||||
if(true === TrustedTimestamps::validate($query->row['hash_value'], $query->row['response_string'], $query->row['response_time'], TSA_PUBLIC_KEY_FILE)) {
|
||||
return 1;
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
syslog(LOG_INFO, "ERROR validating the timestamp: " . $e->getMessage());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user