summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/gui/mail_status.py17
-rw-r--r--src/leap/bitmask/gui/mainwindow.py6
-rw-r--r--src/leap/bitmask/gui/ui/mail_status.ui105
-rw-r--r--src/leap/bitmask/provider/pinned.py7
-rw-r--r--src/leap/bitmask/provider/pinned_mailbitmask.py99
5 files changed, 190 insertions, 44 deletions
diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py
index eebae49b..8b4329d7 100644
--- a/src/leap/bitmask/gui/mail_status.py
+++ b/src/leap/bitmask/gui/mail_status.py
@@ -58,6 +58,8 @@ class MailStatusWidget(QtGui.QWidget):
self.ui = Ui_MailStatusWidget()
self.ui.setupUi(self)
+ self.ui.lblMailReadyHelp.setVisible(False)
+
# set systray tooltip status
self._mx_status = ""
self._service_name = get_service_display_name(MX_SERVICE)
@@ -103,6 +105,8 @@ class MailStatusWidget(QtGui.QWidget):
callback=self._mail_handle_imap_events)
register(event=catalog.SMTP_SERVICE_STARTED,
callback=self._mail_handle_imap_events)
+ register(event=catalog.IMAP_CLIENT_LOGIN,
+ callback=self._mail_handle_imap_events)
self._soledad_event.connect(
self._mail_handle_soledad_events_slot)
@@ -415,6 +419,10 @@ class MailStatusWidget(QtGui.QWidget):
self._show_unread_mails()
elif event == catalog.IMAP_SERVICE_STARTED:
self._imap_started = True
+ elif event == catalog.IMAP_CLIENT_LOGIN:
+ # If a MUA has logged in then we don't need to show this.
+ self._hide_mail_ready_help()
+
if ext_status is not None:
self._set_mail_status(ext_status, ready=1)
@@ -483,6 +491,15 @@ class MailStatusWidget(QtGui.QWidget):
"""
self._set_mail_status(self.tr("ON"), 2)
+ # this help message will hide when the MUA connects
+ self.ui.lblMailReadyHelp.setVisible(True)
+
+ def _hide_mail_ready_help(self):
+ """
+ Hide the mail help message on the UI.
+ """
+ self.ui.lblMailReadyHelp.setVisible(False)
+
def mail_state_disabled(self):
"""
Display the correct UI for the disabled state.
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 387c6283..a8a4e41d 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -1021,9 +1021,9 @@ class MainWindow(QtGui.QMainWindow, SignalTracker):
"Version: <b>{ver}</b> ({ver_hash})<br>"
"<br>{greet}"
"Bitmask is the Desktop client application for the LEAP "
- "platform, supporting encrypted internet proxy.<br>"
- # "Secure email is comming soon.<br>"
- "<br>"
+ "platform, supporting Encrypted Internet Proxy "
+ "and <a href='https://bitmask.net/help/email'> "
+ "Encrypted Email</a>.<br><br>"
"LEAP is a non-profit dedicated to giving all internet users "
"access to secure communication. Our focus is on adapting "
"encryption technology to make it easy to use and widely "
diff --git a/src/leap/bitmask/gui/ui/mail_status.ui b/src/leap/bitmask/gui/ui/mail_status.ui
index 6fd63aec..8e8f1848 100644
--- a/src/leap/bitmask/gui/ui/mail_status.ui
+++ b/src/leap/bitmask/gui/ui/mail_status.ui
@@ -6,12 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>79</height>
+ <width>417</width>
+ <height>185</height>
</rect>
</property>
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -23,9 +23,9 @@
<property name="topMargin">
<number>0</number>
</property>
- <item row="0" column="1" rowspan="2">
+ <item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_3">
- <item row="1" column="1">
+ <item row="0" column="2">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -38,17 +38,20 @@
</property>
</spacer>
</item>
- <item row="2" column="0" colspan="3">
- <widget class="QLabel" name="lblMailStatus">
- <property name="styleSheet">
- <string notr="true">color: rgb(80, 80, 80);</string>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
<property name="text">
- <string>You must login to use encrypted email.</string>
+ <string>Email</string>
</property>
</widget>
</item>
- <item row="1" column="3">
+ <item row="0" column="4">
<widget class="QLabel" name="lblMailStatusIcon">
<property name="maximumSize">
<size>
@@ -67,47 +70,69 @@
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="3" column="1" colspan="2">
+ <widget class="QLabel" name="lblMailReadyHelp">
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color: #e0efd8;
+padding: 10px;</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
</property>
<property name="text">
- <string>Email</string>
+ <string>Congratulations! You are ready to use Bitmask to encrypt your email. Go to &lt;a href=&quot;https://bitmask.net/en/help/email&quot;&gt;https://bitmask.net/en/help/email&lt;/a&gt; for instructions on how to set up your mail client.</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::AutoText</enum>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="indent">
+ <number>-1</number>
</property>
</widget>
</item>
<item row="0" column="0">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string/>
</property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
+ <property name="pixmap">
+ <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/32/email.png</pixmap>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>5</height>
- </size>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2">
+ <widget class="QLabel" name="lblMailStatus">
+ <property name="styleSheet">
+ <string notr="true">color: rgb(80, 80, 80);</string>
</property>
- </spacer>
+ <property name="text">
+ <string>You must login to use encrypted email.</string>
+ </property>
+ </widget>
</item>
</layout>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/32/email.png</pixmap>
- </property>
- </widget>
- </item>
</layout>
</widget>
<resources>
diff --git a/src/leap/bitmask/provider/pinned.py b/src/leap/bitmask/provider/pinned.py
index ea1788eb..db46bde6 100644
--- a/src/leap/bitmask/provider/pinned.py
+++ b/src/leap/bitmask/provider/pinned.py
@@ -20,6 +20,7 @@ Pinned Providers
from leap.bitmask.logs.utils import get_logger
from leap.bitmask.provider import pinned_calyx
from leap.bitmask.provider import pinned_demobitmask
+from leap.bitmask.provider import pinned_mailbitmask
from leap.bitmask.provider import pinned_riseup
logger = get_logger()
@@ -46,7 +47,11 @@ class PinnedProviders(object):
pinned_riseup.DOMAIN: {
CONFIG_KEY: pinned_riseup.PROVIDER_JSON,
CACERT_KEY: pinned_riseup.CACERT_PEM,
- }
+ },
+ pinned_mailbitmask.DOMAIN: {
+ CONFIG_KEY: pinned_mailbitmask.PROVIDER_JSON,
+ CACERT_KEY: pinned_mailbitmask.CACERT_PEM,
+ },
}
def __init__(self):
diff --git a/src/leap/bitmask/provider/pinned_mailbitmask.py b/src/leap/bitmask/provider/pinned_mailbitmask.py
new file mode 100644
index 00000000..5adec33e
--- /dev/null
+++ b/src/leap/bitmask/provider/pinned_mailbitmask.py
@@ -0,0 +1,99 @@
+# -*- coding: utf-8 -*-
+# pinned_mailbitmask.py
+# Copyright (C) 2015 LEAP
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+Pinned provider.json and cacert.pem for mail.bitmask.net
+"""
+
+DOMAIN = "mail.bitmask.net"
+
+PROVIDER_JSON = """
+{
+ "api_uri": "https://api.mail.bitmask.net:4430",
+ "api_version": "1",
+ "ca_cert_fingerprint": "SHA256: 0f17c033115f6b76ff67871872303ff65034efe7dd1b910062ca323eb4da5c7e",
+ "ca_cert_uri": "https://mail.bitmask.net/ca.crt",
+ "default_language": "en",
+ "description": {
+ "el": "Bitmask \u03b5\u03af\u03bd\u03b1\u03b9 \u03ad\u03bd\u03b1 \u03ad\u03c1\u03b3\u03bf \u03c4\u03bf\u03c5 LEAP \u03bc\u03b5 \u03c3\u03ba\u03bf\u03c0\u03cc \u03c4\u03bf\u03bd \u03ad\u03bb\u03b5\u03b3\u03c7\u03bf \u03c4\u03b7\u03c2 \u03b1\u03c0\u03cc\u03b4\u03bf\u03c3\u03b7\u03c2 \u03ba\u03b1\u03b9 \u03c4\u03b7\u03c2 \u03b1\u03be\u03b9\u03bf\u03c0\u03b9\u03c3\u03c4\u03af\u03b1\u03c2 \u03c4\u03bf\u03c5 \u03bb\u03bf\u03b3\u03b9\u03c3\u03bc\u03b9\u03ba\u03bf\u03cd LEAP. Bitmask \u03c4\u03c1\u03ad\u03c7\u03b5\u03b9 \u03b3\u03b9\u03b1 \u03c4\u03b9\u03c2 \u03c4\u03b5\u03bb\u03b5\u03c5\u03c4\u03b1\u03af\u03b5\u03c2 \u03b1\u03b9\u03bc\u03bf\u03c1\u03c1\u03b1\u03b3\u03af\u03b1 \u03ac\u03ba\u03c1\u03bf \u03c4\u03bf\u03c5 \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1 LEAP, \u03ba\u03b1\u03b9 \u03b8\u03b1 \u03ad\u03c7\u03b5\u03b9 \u03c0\u03b9\u03b8\u03b1\u03bd\u03cc\u03c4\u03b1\u03c4\u03b1 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03b4\u03c5\u03bd\u03b1\u03c4\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03ba\u03b1\u03b9 \u03bb\u03b9\u03b3\u03cc\u03c4\u03b5\u03c1\u03b1 \u03b1\u03be\u03b9\u03bf\u03c0\u03b9\u03c3\u03c4\u03af\u03b1 \u03b1\u03c0\u03cc \u03ac\u03bb\u03bb\u03bf\u03c5\u03c2 \u03c6\u03bf\u03c1\u03b5\u03af\u03c2 \u03c0\u03b1\u03c1\u03bf\u03c7\u03ae\u03c2 \u03c5\u03c0\u03b7\u03c1\u03b5\u03c3\u03b9\u03ce\u03bd.",
+ "en": "Bitmask is a project of LEAP with the purpose to test the performance and reliability of the LEAP software. Bitmask runs on the latest bleeding edge of the LEAP code, and will likely have more features and less reliability than other service providers.",
+ "es": "Bitmask es un proyecto de LEAP con el prop\u00f3sito de probar el rendimiento y la fiabilidad del software LEAP. Bitmask corre la \u00faltima versi\u00f3n del c\u00f3digo LEAP, y es de esperar que tenga m\u00e1s funciones y menos fiabilidad que los proveedores de servicios."
+ },
+ "domain": "mail.bitmask.net",
+ "enrollment_policy": "open",
+ "languages": [
+ "de",
+ "en",
+ "es",
+ "pt"
+ ],
+ "name": {
+ "en": "Bitmask"
+ },
+ "service": {
+ "allow_anonymous": false,
+ "allow_free": true,
+ "allow_limited_bandwidth": false,
+ "allow_paid": false,
+ "allow_registration": true,
+ "allow_unlimited_bandwidth": true,
+ "bandwidth_limit": 102400,
+ "default_service_level": 1,
+ "levels": {
+ "1": {
+ "description": "Please donate.",
+ "name": "free"
+ }
+ }
+ },
+ "services": [
+ "mx"
+ ]
+}
+"""
+
+CACERT_PEM = """-----BEGIN CERTIFICATE-----
+MIIFbzCCA1egAwIBAgIBATANBgkqhkiG9w0BAQ0FADBKMRgwFgYDVQQDDA9CaXRt
+YXNrIFJvb3QgQ0ExEDAOBgNVBAoMB0JpdG1hc2sxHDAaBgNVBAsME2h0dHBzOi8v
+Yml0bWFzay5uZXQwHhcNMTIxMTA2MDAwMDAwWhcNMjIxMTA2MDAwMDAwWjBKMRgw
+FgYDVQQDDA9CaXRtYXNrIFJvb3QgQ0ExEDAOBgNVBAoMB0JpdG1hc2sxHDAaBgNV
+BAsME2h0dHBzOi8vYml0bWFzay5uZXQwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
+ggIKAoICAQC1eV4YvayaU+maJbWrD4OHo3d7S1BtDlcvkIRS1Fw3iYDjsyDkZxai
+dHp4EUasfNQ+EVtXUvtk6170EmLco6Elg8SJBQ27trE6nielPRPCfX3fQzETRfvB
+7tNvGw4Jn2YKiYoMD79kkjgyZjkJ2r/bEHUSevmR09BRp86syHZerdNGpXYhcQ84
+CA1+V+603GFIHnrP+uQDdssW93rgDNYu+exT+Wj6STfnUkugyjmPRPjL7wh0tzy+
+znCeLl4xiV3g9sjPnc7r2EQKd5uaTe3j71sDPF92KRk0SSUndREz+B1+Dbe/RGk4
+MEqGFuOzrtsgEhPIX0hplhb0Tgz/rtug+yTT7oJjBa3u20AAOQ38/M99EfdeJvc4
+lPFF1XBBLh6X9UKF72an2NuANiX6XPySnJgZ7nZ09RiYZqVwu/qt3DfvLfhboq+0
+bQvLUPXrVDr70onv5UDjpmEA/cLmaIqqrduuTkFZOym65/PfAPvpGnt7crQj/Ibl
+DEDYZQmP7AS+6zBjoOzNjUGE5r40zWAR1RSi7zliXTu+yfsjXUIhUAW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