summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keymanager/src/leap/keymanager/validation.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/keymanager/src/leap/keymanager/validation.py b/keymanager/src/leap/keymanager/validation.py
index 245013e5..87de2af8 100644
--- a/keymanager/src/leap/keymanager/validation.py
+++ b/keymanager/src/leap/keymanager/validation.py
@@ -82,7 +82,8 @@ def can_upgrade(new_key, old_key):
return True
# No expiration date and higher validation level
- elif new_key.validation >= old_key.validation:
+ if (old_key.expiry_date is None and
+ new_key.validation > old_key.validation):
return True
return False