diff options
| -rw-r--r-- | src/leap/eip/checks.py | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/src/leap/eip/checks.py b/src/leap/eip/checks.py index 898af2fe..f79d47f5 100644 --- a/src/leap/eip/checks.py +++ b/src/leap/eip/checks.py @@ -257,7 +257,7 @@ class ProviderCertChecker(object):          valid = exists() and valid_pemfile() and not_expired()          if not valid:              if do_raise: -                raise Exception('missing cert') +                raise Exception('missing valid cert')              else:                  return False          return True @@ -273,7 +273,9 @@ class ProviderCertChecker(object):          with open(certfile) as cf:              cert_s = cf.read()          cert = crypto.X509Certificate(cert_s) -        return cert.activation_time < now() < cert.expiration_time +        from_ = time.gmtime(cert.activation_time) +        to_ = time.gmtime(cert.expiration_time) +        return from_ < now() < to_      def is_valid_pemfile(self, cert_s=None):          """ | 
