Implement check if LotW cert itself is valid to

use for signing. If not skip.
This commit is contained in:
phl0
2022-08-24 16:04:26 +02:00
parent a0d551d3c3
commit 1e32fbed3f

View File

@@ -229,6 +229,18 @@ class Lotw extends CI_Controller {
continue;
}
// Check if LotW certificate itself is valid
// Validty of QSO dates will be checked later
$current_date = date('Y-m-d H:i:s');
if ($current_date <= $data['lotw_cert_info']->date_created) {
echo $data['lotw_cert_info']->callsign.": LotW certificate not valid yet!";
continue;
}
if ($current_date >= $data['lotw_cert_info']->date_expires) {
echo $data['lotw_cert_info']->callsign.": LotW certificate expired!";
continue;
}
$this->load->model('Dxcc');
$data['station_profile_dxcc'] = $this->Dxcc->lookup_country($data['lotw_cert_info']->cert_dxcc);