summaryrefslogtreecommitdiff
path: root/src/leap/gui/mainwindow.py
diff options
context:
space:
mode:
authorTomas Touceda <chiiph@leap.se>2013-04-12 14:07:15 -0300
committerTomas Touceda <chiiph@leap.se>2013-04-12 14:07:15 -0300
commit1fbf6db1276c5bca41c4cfbcc90818d9605c1938 (patch)
treeccf6dc5720654163a36155a2c6142e48dbef9811 /src/leap/gui/mainwindow.py
parent4e4268af42e6d0bbf38e6027ca36d1b9f1bdda68 (diff)
Add --danger option to not validate the first hop of certificates
This is intended to be used while testing, not in production
Diffstat (limited to 'src/leap/gui/mainwindow.py')
-rw-r--r--src/leap/gui/mainwindow.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index bf8491d0..c9743f95 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -68,13 +68,16 @@ class MainWindow(QtGui.QMainWindow):
new_updates = QtCore.Signal(object)
raise_window = QtCore.Signal([])
- def __init__(self, standalone=False):
+ def __init__(self, standalone=False, bypass_checks=False):
"""
Constructor for the client main window
@param standalone: Set to true if the app should use configs
inside its pwd
@type standalone: bool
+ @param bypass_checks: Set to true if the app should bypass
+ first round of checks for CA certificates at bootstrap
+ @type bypass_checks: bool
"""
QtGui.QMainWindow.__init__(self)
@@ -136,7 +139,7 @@ class MainWindow(QtGui.QMainWindow):
# This thread is always running, although it's quite
# lightweight when it's done setting up provider
# configuration and certificate.
- self._provider_bootstrapper = ProviderBootstrapper()
+ self._provider_bootstrapper = ProviderBootstrapper(bypass_checks)
# Intermediate stages, only do something if there was an error
self._provider_bootstrapper.name_resolution.connect(
@@ -237,9 +240,14 @@ class MainWindow(QtGui.QMainWindow):
self._wizard = None
self._wizard_firstrun = False
+
+ self._bypass_checks = bypass_checks
+
if self._first_run():
self._wizard_firstrun = True
- self._wizard = Wizard(self._checker_thread, standalone=standalone)
+ self._wizard = Wizard(self._checker_thread,
+ standalone=standalone,
+ bypass_checks=bypass_checks)
# Give this window time to finish init and then show the wizard
QtCore.QTimer.singleShot(1, self._launch_wizard)
self._wizard.accepted.connect(self._finish_init)
@@ -256,7 +264,8 @@ class MainWindow(QtGui.QMainWindow):
def _launch_wizard(self):
if self._wizard is None:
- self._wizard = Wizard(self._checker_thread)
+ self._wizard = Wizard(self._checker_thread,
+ bypass_checks=self._bypass_checks)
self._wizard.exec_()
self._wizard = None