From 0e844310a49b06e3fcf6184b058915aa8b572642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 8 Aug 2013 15:21:37 -0300 Subject: Set default port for SMTP to be 2013 --- src/leap/gui/mainwindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 90492e45..1fa962a1 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -1033,7 +1033,7 @@ class MainWindow(QtGui.QMainWindow): from leap.mail.smtp import setup_smtp_relay client_cert = self._eip_config.get_client_cert_path( self._provider_config) - setup_smtp_relay(port=1234, + setup_smtp_relay(port=2013, keymanager=self._keymanager, smtp_host=host, smtp_port=port, -- cgit v1.2.3 From 27a059b28be9b05995b74b968d509c3cea19b72c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 8 Aug 2013 15:21:53 -0300 Subject: Support bundled gpg --- src/leap/gui/mainwindow.py | 3 ++- src/leap/services/soledad/soledadbootstrapper.py | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 1fa962a1..463ba2c4 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -927,7 +927,8 @@ class MainWindow(QtGui.QMainWindow): self._provider_config, self._login_widget.get_user(), self._login_widget.get_password(), - download_if_needed=True) + download_if_needed=True, + stanalone=self._standalone) self._download_eip_config() diff --git a/src/leap/services/soledad/soledadbootstrapper.py b/src/leap/services/soledad/soledadbootstrapper.py index 7ac4203b..c67bc004 100644 --- a/src/leap/services/soledad/soledadbootstrapper.py +++ b/src/leap/services/soledad/soledadbootstrapper.py @@ -198,6 +198,14 @@ class SoledadBootstrapper(AbstractBootstrapper): logger.debug("Retrieving key for %s" % (address,)) srp_auth = SRPAuth(self._provider_config) + + # TODO: Fix for Windows + gpgbin = "/usr/bin/gpg" + + if self._standalone: + gpgbin = os.path.join(self._provider_config.get_path_prefix(), + "..", "apps", "mail", "gpg") + self._keymanager = KeyManager( address, "https://nicknym.%s:6425" % (self._provider_config.get_domain(),), @@ -207,7 +215,8 @@ class SoledadBootstrapper(AbstractBootstrapper): ca_cert_path=self._provider_config.get_ca_cert_path(), api_uri=self._provider_config.get_api_uri(), api_version=self._provider_config.get_api_version(), - uid=srp_auth.get_uid()) + uid=srp_auth.get_uid(), + gpgbinary=gpgbin) try: self._keymanager.get_key(address, openpgp.OpenPGPKey, private=True, fetch_remote=False) @@ -221,7 +230,8 @@ class SoledadBootstrapper(AbstractBootstrapper): provider_config, user, password, - download_if_needed=False): + download_if_needed=False, + standalone=False): """ Starts the checks needed for a new soledad setup @@ -231,6 +241,13 @@ class SoledadBootstrapper(AbstractBootstrapper): :type user: str :param password: User's password :type password: str + :param download_if_needed: If True, it will only download + files if the have changed since the + time it was previously downloaded. + :type download_if_needed: bool + :param standalone: If True, it'll look for paths inside the + bundle (like for gpg) + :type standalone: bool """ leap_assert_type(provider_config, ProviderConfig) @@ -238,6 +255,7 @@ class SoledadBootstrapper(AbstractBootstrapper): self._download_if_needed = download_if_needed self._user = user self._password = password + self._standalone = standalone cb_chain = [ (self._download_config, self.download_config), -- cgit v1.2.3