summaryrefslogtreecommitdiff
path: root/src/leap/services/eip/eipbootstrapper.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/services/eip/eipbootstrapper.py')
-rw-r--r--src/leap/services/eip/eipbootstrapper.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/leap/services/eip/eipbootstrapper.py b/src/leap/services/eip/eipbootstrapper.py
index 3e4e2063..ec3dfe7b 100644
--- a/src/leap/services/eip/eipbootstrapper.py
+++ b/src/leap/services/eip/eipbootstrapper.py
@@ -32,6 +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
logger = logging.getLogger(__name__)
@@ -183,6 +184,10 @@ class EIPBootstrapper(QtCore.QObject):
# TODO: check certificate validity
+ if not is_valid_pemfile(client_cert):
+ raise Exception(self.tr("The downloaded certificate is not a "
+ "valid PEM file"))
+
mkdir_p(os.path.dirname(client_cert_path))
with open(client_cert_path, "w") as f: