Skip to content

Commit

Permalink
https://telecominfraproject.atlassian.net/browse/WIFI-7831
Browse files Browse the repository at this point in the history
Signed-off-by: stephb9959 <[email protected]>
  • Loading branch information
stephb9959 committed Sep 26, 2023
1 parent ac078ec commit 673f506
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/RADSEC_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@ namespace OpenWifi {
DecodeFile(CertFile_.path(), Server_.radsecCert);
DecodeFile(KeyFile_.path(), Server_.radsecKey);

Poco::Crypto::X509Certificate Cert(CertFile_.path());
if(IsExpired(Cert)) {
poco_error(Logger_, fmt::format("Certificate for {} has expired. We cannot connect to this server.", Server_.name));
return false;
}

for (auto &cert : Server_.radsecCacerts) {
CaCertFiles_.emplace_back(
std::make_unique<Poco::TemporaryFile>(MicroServiceDataDirectory()));
Expand Down

0 comments on commit 673f506

Please sign in to comment.