summaryrefslogtreecommitdiff
path: root/enterprise.cpp
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2023-01-05 19:11:52 -0500
committerGlenn Smith <glenn@vector35.com>2023-01-10 14:59:05 -0500
commitc3a262f47563ee43e33516cbe0415fd77edf4358 (patch)
tree1e1303ea3fb3b7c9896a8bd4597db84e8925d816 /enterprise.cpp
parent80e927bd0b200904626cabf9bf6fa65a1bd4a6a8 (diff)
[Enterprise] Fix LicenseCheckout not account for expired named licenses
Diffstat (limited to 'enterprise.cpp')
-rw-r--r--enterprise.cpp3
1 files changed, 2 insertions, 1 deletions
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))
{