summaryrefslogtreecommitdiff
path: root/src/leap/services/eip/eipbootstrapper.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-03-13 11:33:42 -0300
committerTomás Touceda <chiiph@leap.se>2013-03-13 11:33:42 -0300
commit240d6b7762f7cc8f4c6fd229e4538aa9aa2262a5 (patch)
tree092380d6a067a4da799fcd81eab97fd018d99838 /src/leap/services/eip/eipbootstrapper.py
parent60bcc7b27aa934a0d62033e7152b87d5af638491 (diff)
Check validity for downloaded certs and re-download if needed
Diffstat (limited to 'src/leap/services/eip/eipbootstrapper.py')
-rw-r--r--src/leap/services/eip/eipbootstrapper.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/services/eip/eipbootstrapper.py b/src/leap/services/eip/eipbootstrapper.py
index ec3dfe7b..c83cb1b5 100644
--- a/src/leap/services/eip/eipbootstrapper.py
+++ b/src/leap/services/eip/eipbootstrapper.py
@@ -32,7 +32,7 @@ from leap.util.check import leap_assert, leap_assert_type
from leap.util.checkerthread import CheckerThread
from leap.util.files import check_and_fix_urw_only, get_mtime, mkdir_p
from leap.util.request_helpers import get_content
-from leap.util.certs import is_valid_pemfile
+from leap.util.certs import is_valid_pemfile, should_redownload
logger = logging.getLogger(__name__)
@@ -154,6 +154,10 @@ class EIPBootstrapper(QtCore.QObject):
get_client_cert_path(self._provider_config,
about_to_download=True)
+ # For re-download if something is wrong with the cert
+ self._download_if_needed = self._download_if_needed and \
+ not should_redownload(client_cert_path)
+
if self._download_if_needed and \
os.path.exists(client_cert_path):
try: