summaryrefslogtreecommitdiff
path: root/service/pixelated/bitmask_libraries/provider.py
diff options
context:
space:
mode:
authorGabriel Albo <gabriel@albo.com.br>2015-11-04 11:23:50 -0200
committerGabriel Albo <gabriel@albo.com.br>2015-11-04 11:23:50 -0200
commit742f6c87b0ff37154b1c2779c0f5a44fd899c34d (patch)
tree763caa014955576b613c4114cb7962265b37e743 /service/pixelated/bitmask_libraries/provider.py
parentdccd63fcffe4a5b73282815514fdb0848a0468ed (diff)
parentd79aa00e3c24c5bf5e5ed5ba5a9b976f93034362 (diff)
Merge branch 'master' of github.com:pixelated-project/pixelated-user-agent
Diffstat (limited to 'service/pixelated/bitmask_libraries/provider.py')
-rw-r--r--service/pixelated/bitmask_libraries/provider.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/service/pixelated/bitmask_libraries/provider.py b/service/pixelated/bitmask_libraries/provider.py
index b7f82f8a..a529208d 100644
--- a/service/pixelated/bitmask_libraries/provider.py
+++ b/service/pixelated/bitmask_libraries/provider.py
@@ -14,6 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
import json
+import os
from leap.common.certs import get_digest
import requests
@@ -95,6 +96,13 @@ class LeapProvider(object):
if fingerprint.strip() != digest:
raise Exception('Certificate fingerprints don\'t match! Expected [%s] but got [%s]' % (fingerprint.strip(), digest))
+ def smtp_info(self):
+ json_data = self.fetch_smtp_json()
+ hosts = json_data['hosts']
+ hostname = hosts.keys()[0]
+ host = hosts[hostname]
+ return host['hostname'], host['port']
+
def _validated_get(self, url):
session = requests.session()
try: