summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-06-19 15:12:06 -0300
committerTomás Touceda <chiiph@leap.se>2014-06-19 15:13:23 -0300
commit3406150b9e3e6bfce198f3b3a9716c510f3c7022 (patch)
tree0ae062948d8e20cdf2645a64d79aa3e548c3511f
parentb4c26d2b6bf0d84e723d5e7b36042c67a75f268b (diff)
Pin Riseup
-rw-r--r--changes/feature_pin_riseup1
-rw-r--r--src/leap/bitmask/provider/pinned.py5
-rw-r--r--src/leap/bitmask/provider/pinned_riseup.py94
3 files changed, 100 insertions, 0 deletions
diff --git a/changes/feature_pin_riseup b/changes/feature_pin_riseup
new file mode 100644
index 00000000..9b8b960f
--- /dev/null
+++ b/changes/feature_pin_riseup
@@ -0,0 +1 @@
+- Pin Riseup as a provider. Closes #5783. \ No newline at end of file
diff --git a/src/leap/bitmask/provider/pinned.py b/src/leap/bitmask/provider/pinned.py
index d9b74c3d..38851621 100644
--- a/src/leap/bitmask/provider/pinned.py
+++ b/src/leap/bitmask/provider/pinned.py
@@ -20,6 +20,7 @@ Pinned Providers
import logging
from leap.bitmask.provider import pinned_demobitmask
+from leap.bitmask.provider import pinned_riseup
logger = logging.getLogger(__name__)
@@ -36,6 +37,10 @@ class PinnedProviders(object):
pinned_demobitmask.DOMAIN: {
CONFIG_KEY: pinned_demobitmask.PROVIDER_JSON,
CACERT_KEY: pinned_demobitmask.CACERT_PEM,
+ },
+ pinned_riseup.DOMAIN: {
+ CONFIG_KEY: pinned_riseup.PROVIDER_JSON,
+ CACERT_KEY: pinned_riseup.CACERT_PEM,
}
}
diff --git a/src/leap/bitmask/provider/pinned_riseup.py b/src/leap/bitmask/provider/pinned_riseup.py
new file mode 100644
index 00000000..8cc51506
--- /dev/null
+++ b/src/leap/bitmask/provider/pinned_riseup.py
@@ -0,0 +1,94 @@
+# -*- coding: utf-8 -*-
+# pinned_riseup.py
+# Copyright (C) 2013-2014 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 riseup.net
+"""
+
+DOMAIN = "riseup.net"
+
+PROVIDER_JSON = """
+{
+ "api_uri": "https://api.black.riseup.net:4430",
+ "api_version": "1",
+ "ca_cert_fingerprint": "SHA256: a5244308a1374709a9afce95e3ae47c1b44bc2398c0a70ccbf8b3a8a97f29494",
+ "ca_cert_uri": "https://black.riseup.net/ca.crt",
+ "default_language": "en",
+ "description": {
+ "en": "Riseup is a non-profit collective in Seattle that provides online communication tools for people and groups working toward liberatory social change."
+ },
+ "domain": "riseup.net",
+ "enrollment_policy": "open",
+ "languages": [
+ "en"
+ ],
+ "name": {
+ "en": "Riseup Networks"
+ },
+ "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": [
+ "openvpn"
+ ]
+}
+"""
+
+CACERT_PEM = """-----BEGIN CERTIFICATE-----
+MIIFjTCCA3WgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBZMRgwFgYDVQQKDA9SaXNl
+dXAgTmV0d29ya3MxGzAZBgNVBAsMEmh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UE
+AwwXUmlzZXVwIE5ldHdvcmtzIFJvb3QgQ0EwHhcNMTQwNDI4MDAwMDAwWhcNMjQw
+NDI4MDAwMDAwWjBZMRgwFgYDVQQKDA9SaX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