Fix key upgrade on no expiration date and higher validation level
authorRuben Pollan <meskio@sindominio.net>
Fri, 19 Dec 2014 13:38:42 +0000 (07:38 -0600)
committerRuben Pollan <meskio@sindominio.net>
Thu, 15 Jan 2015 19:10:57 +0000 (13:10 -0600)
src/leap/keymanager/validation.py

index 245013e..87de2af 100644 (file)
@@ -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