From 571fd912925a76ab35c55b7906d774363b51ce37 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 7 Nov 2014 20:14:51 +0100 Subject: Do not use logger.exception during provider checks. Closes: #6219 leap log handler was choking on the captured exception. it might have to do with the exception unwinding made by the reactor. this is a workaround to allow the provider checks to show a meaningful error message. The backtrace should only be there for development purpuses, so removing it. --- src/leap/bitmask/provider/providerbootstrapper.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/leap/bitmask/provider/providerbootstrapper.py b/src/leap/bitmask/provider/providerbootstrapper.py index 71edbb87..8eefb9d9 100644 --- a/src/leap/bitmask/provider/providerbootstrapper.py +++ b/src/leap/bitmask/provider/providerbootstrapper.py @@ -148,7 +148,6 @@ class ProviderBootstrapper(AbstractBootstrapper): timeout=REQUEST_TIMEOUT) res.raise_for_status() except requests.exceptions.SSLError as exc: - logger.exception(exc) self._err_msg = self.tr("Provider certificate could " "not be verified") raise @@ -156,7 +155,6 @@ class ProviderBootstrapper(AbstractBootstrapper): # XXX careful!. The error might be also a SSL handshake # timeout error, in which case we should retry a couple of times # more, for cases where the ssl server gives high latencies. - logger.exception(exc) self._err_msg = self.tr("Provider does not support HTTPS") raise -- cgit v1.2.3 From bb17bf8295d04d4834246b0f30244933429dc247 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 7 Nov 2014 20:19:01 +0100 Subject: Fix compatibilty with newest openssl. Closes: #6133 Newest OpenSSL expect cafile to be None or byte stream (was retunrning unicode) --- src/leap/bitmask/config/providerconfig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/leap/bitmask/config/providerconfig.py b/src/leap/bitmask/config/providerconfig.py index 57bc3a98..386c697d 100644 --- a/src/leap/bitmask/config/providerconfig.py +++ b/src/leap/bitmask/config/providerconfig.py @@ -201,7 +201,8 @@ class ProviderConfig(BaseConfig): leap_check(cert_exists, error_msg, MissingCACert) logger.debug("Going to verify SSL against %s" % (cert_path,)) - return cert_path + # OpenSSL does not handle unicode. + return cert_path.encode('utf-8') def provides_eip(self): """ -- cgit v1.2.3