summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leap/keymanager/validation.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/leap/keymanager/validation.py b/src/leap/keymanager/validation.py
index 245013e..87de2af 100644
--- a/src/leap/keymanager/validation.py
+++ b/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