From c3a262f47563ee43e33516cbe0415fd77edf4358 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 5 Jan 2023 19:11:52 -0500 Subject: [Enterprise] Fix LicenseCheckout not account for expired named licenses --- enterprise.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'enterprise.cpp') diff --git a/enterprise.cpp b/enterprise.cpp index e15a4691..bf68378a 100644 --- a/enterprise.cpp +++ b/enterprise.cpp @@ -235,7 +235,8 @@ BinaryNinja::EnterpriseServer::LicenseCheckout::LicenseCheckout(int64_t duration } // Keychain auth can activate a license if we have one in the keychain - if (!IsLicenseStillActivated()) + // If we have an expired named license, try to get a fresh floating one + if (!IsLicenseStillActivated() || (!IsFloatingLicense() && BNGetLicenseExpirationTime() < time(nullptr))) { if (!EnterpriseServer::AcquireLicense(duration)) { -- cgit v1.3.1