diff options
| -rw-r--r-- | changes/bug-5395_update-bitmask-website-in-pkginfo | 1 | ||||
| -rw-r--r-- | changes/bug-5433_unescape-logs-for-pastebin | 1 | ||||
| -rw-r--r-- | changes/feature-5391_support-selfsigned-certs | 1 | ||||
| -rw-r--r-- | changes/feature-5401_add-shortcut-for-help-menu | 1 | ||||
| -rwxr-xr-x | setup.py | 2 | ||||
| -rw-r--r-- | src/leap/bitmask/app.py | 2 | ||||
| -rw-r--r-- | src/leap/bitmask/config/flags.py | 5 | ||||
| -rw-r--r-- | src/leap/bitmask/gui/loggerwindow.py | 3 | ||||
| -rw-r--r-- | src/leap/bitmask/gui/ui/mainwindow.ui | 16 | ||||
| -rw-r--r-- | src/leap/bitmask/provider/providerbootstrapper.py | 7 | ||||
| -rw-r--r-- | src/leap/bitmask/util/leap_argparse.py | 13 | 
11 files changed, 32 insertions, 20 deletions
| diff --git a/changes/bug-5395_update-bitmask-website-in-pkginfo b/changes/bug-5395_update-bitmask-website-in-pkginfo new file mode 100644 index 00000000..a762a8bb --- /dev/null +++ b/changes/bug-5395_update-bitmask-website-in-pkginfo @@ -0,0 +1 @@ +- Update bitmask url in PKG-INFO. Closes #5395. diff --git a/changes/bug-5433_unescape-logs-for-pastebin b/changes/bug-5433_unescape-logs-for-pastebin new file mode 100644 index 00000000..289dd64a --- /dev/null +++ b/changes/bug-5433_unescape-logs-for-pastebin @@ -0,0 +1 @@ +- Don't escape logs for pastebin. Closes #5433. diff --git a/changes/feature-5391_support-selfsigned-certs b/changes/feature-5391_support-selfsigned-certs new file mode 100644 index 00000000..58c68f23 --- /dev/null +++ b/changes/feature-5391_support-selfsigned-certs @@ -0,0 +1 @@ +- Add support for self signed certs. Closes #5391. diff --git a/changes/feature-5401_add-shortcut-for-help-menu b/changes/feature-5401_add-shortcut-for-help-menu new file mode 100644 index 00000000..9e33388b --- /dev/null +++ b/changes/feature-5401_add-shortcut-for-help-menu @@ -0,0 +1 @@ +- Add hotkey for the Help menu. Closes #5401. @@ -229,7 +229,7 @@ setup(      author_email='info@leap.se',      maintainer='Kali Kaneko',      maintainer_email='kali@leap.se', -    url='https://bitmask.rtfd.org', +    url='https://bitmask.net',      download_url=DOWNLOAD_URL,      license='GPL-3+',      packages=find_packages( diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py index 124671b3..02e27123 100644 --- a/src/leap/bitmask/app.py +++ b/src/leap/bitmask/app.py @@ -214,6 +214,8 @@ def main():      flags.APP_VERSION_CHECK = opts.app_version_check      flags.API_VERSION_CHECK = opts.api_version_check +    flags.CA_CERT_FILE = opts.ca_cert_file +      BaseConfig.standalone = standalone      replace_stdout = True diff --git a/src/leap/bitmask/config/flags.py b/src/leap/bitmask/config/flags.py index 82501fb2..5d8bc9b3 100644 --- a/src/leap/bitmask/config/flags.py +++ b/src/leap/bitmask/config/flags.py @@ -45,3 +45,8 @@ API_VERSION_CHECK = True  # Offline mode?  # Used for skipping soledad bootstrapping/syncs.  OFFLINE = False + + +# CA cert path +# used to allow self signed certs in requests that needs SSL +CA_CERT_FILE = None diff --git a/src/leap/bitmask/gui/loggerwindow.py b/src/leap/bitmask/gui/loggerwindow.py index c01642fc..9f396574 100644 --- a/src/leap/bitmask/gui/loggerwindow.py +++ b/src/leap/bitmask/gui/loggerwindow.py @@ -127,7 +127,7 @@ class LoggerWindow(QtGui.QDialog):          current_history = []          for line in history:              self._add_log_line(line) -            message = cgi.escape(line[LeapLogHandler.MESSAGE_KEY]) +            message = line[LeapLogHandler.MESSAGE_KEY]              current_history.append(message)          self._current_history = "\n".join(current_history) @@ -222,7 +222,6 @@ class LoggerWindow(QtGui.QDialog):              """              msg = self.tr("Your pastebin link <a href='{0}'>{0}</a>")              msg = msg.format(link) -            logger.debug(msg)              show_info = lambda: QtGui.QMessageBox.information(                  self, self.tr("Pastebin OK"), msg)              self._set_pastebin_sending(False) diff --git a/src/leap/bitmask/gui/ui/mainwindow.ui b/src/leap/bitmask/gui/ui/mainwindow.ui index ce05f8f3..d755115a 100644 --- a/src/leap/bitmask/gui/ui/mainwindow.ui +++ b/src/leap/bitmask/gui/ui/mainwindow.ui @@ -75,7 +75,7 @@           <x>0</x>           <y>0</y>           <width>524</width> -         <height>651</height> +         <height>667</height>          </rect>         </property>         <layout class="QVBoxLayout" name="verticalLayout"> @@ -85,8 +85,6 @@          <property name="margin">           <number>0</number>          </property> - -        <!-- LOGIN -->          <item>           <widget class="QFrame" name="frame">            <property name="sizePolicy"> @@ -134,7 +132,6 @@            </property>           </layout>          </item> -          <item>           <widget class="Line" name="lineUnderLogin">            <property name="orientation"> @@ -142,8 +139,6 @@            </property>           </widget>          </item> - -        <!-- EIP -->          <item>           <widget class="QWidget" name="eipWidget" native="true">            <layout class="QVBoxLayout" name="eipVerticalLayout"> @@ -172,7 +167,6 @@            </layout>           </widget>          </item> -          <item>           <widget class="Line" name="lineUnderEIP">            <property name="orientation"> @@ -180,8 +174,6 @@            </property>           </widget>          </item> - -        <!-- EMAIL -->          <item>           <widget class="QWidget" name="mailWidget" native="true">            <layout class="QVBoxLayout" name="verticalLayout_3"> @@ -204,7 +196,6 @@            </layout>           </widget>          </item> -          <item>           <widget class="Line" name="lineUnderEmail">            <property name="orientation"> @@ -212,7 +203,6 @@            </property>           </widget>          </item> -          <item>           <spacer name="verticalSpacer">            <property name="orientation"> @@ -307,7 +297,7 @@       <x>0</x>       <y>0</y>       <width>524</width> -     <height>21</height> +     <height>23</height>      </rect>     </property>     <widget class="QMenu" name="menuFile"> @@ -324,7 +314,7 @@     </widget>     <widget class="QMenu" name="menuHelp">      <property name="title"> -     <string>Help</string> +     <string>&Help</string>      </property>      <addaction name="action_help"/>      <addaction name="action_show_logs"/> diff --git a/src/leap/bitmask/provider/providerbootstrapper.py b/src/leap/bitmask/provider/providerbootstrapper.py index 654d1790..2a519206 100644 --- a/src/leap/bitmask/provider/providerbootstrapper.py +++ b/src/leap/bitmask/provider/providerbootstrapper.py @@ -99,9 +99,14 @@ class ProviderBootstrapper(AbstractBootstrapper):          :rtype: bool or str          """          if self._bypass_checks: -            verify = False +            return False + +        cert = flags.CA_CERT_FILE +        if cert is not None: +            verify = cert          else:              verify = ca_bundle.where() +          return verify      def _check_name_resolution(self): diff --git a/src/leap/bitmask/util/leap_argparse.py b/src/leap/bitmask/util/leap_argparse.py index 56bf26dc..88267ff8 100644 --- a/src/leap/bitmask/util/leap_argparse.py +++ b/src/leap/bitmask/util/leap_argparse.py @@ -27,9 +27,10 @@ def build_parser():      All the options for the leap arg parser      Some of these could be switched on only if debug flag is present!      """ -    epilog = "Copyright 2012-2014 The LEAP Encryption Access Project" -    parser = argparse.ArgumentParser(description=""" -Launches the Bitmask client.""", epilog=epilog) +    parser = argparse.ArgumentParser( +        description="Launches the Bitmask client.", +        epilog="Copyright 2012-2014 The LEAP Encryption Access Project") +      parser.add_argument('-d', '--debug', action="store_true",                          help=("Launches Bitmask in debug mode, writing debug "                                "info to stdout.")) @@ -92,6 +93,12 @@ Launches the Bitmask client.""", epilog=epilog)                       "Use at your own risk!")          parser.add_argument('--danger', action="store_true", help=help_text) +    # optional cert file used to check domains with self signed certs. +    parser.add_argument('--ca-cert-file', metavar="/path/to/cacert.pem", +                        nargs='?', action="store", dest="ca_cert_file", +                        help='Uses the given cert file to verify ' +                             'against domains.') +      # Not in use, we might want to reintroduce them.      #parser.add_argument('-i', '--no-provider-checks',                          #action="store_true", default=False, | 
