summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorNeissi Torres Lima <neissi.lima@gmail.com>2014-08-05 15:11:56 -0300
committerNeissi Torres Lima <neissi.lima@gmail.com>2014-08-05 15:11:56 -0300
commitf0108c072f5f27382d335331b1fba44c972a6fa8 (patch)
tree8c2547ee01e49a0c478a59164e35aac785343f64 /service
parentb8645563bd0918979700a63a638c8ba2907e3d58 (diff)
Added wazokazi self signed certificate to project
Diffstat (limited to 'service')
-rw-r--r--service/.gitignore3
-rw-r--r--service/app/leap/client.py5
-rw-r--r--service/leap/example.wazokazi.is.ca.crt32
3 files changed, 38 insertions, 2 deletions
diff --git a/service/.gitignore b/service/.gitignore
index a21a0f95..6a42e787 100644
--- a/service/.gitignore
+++ b/service/.gitignore
@@ -1 +1,4 @@
.virtualenv
+leap/providers/**
+leap/soledad/**
+leap/ca.crt \ No newline at end of file
diff --git a/service/app/leap/client.py b/service/app/leap/client.py
index bc93f1e2..b1e4fb8b 100644
--- a/service/app/leap/client.py
+++ b/service/app/leap/client.py
@@ -1,5 +1,6 @@
import traceback
import sys
+import os
from app.bitmask_libraries.config import LeapConfig
from app.bitmask_libraries.provider import LeapProvider
from app.bitmask_libraries.session import LeapSessionFactory
@@ -13,7 +14,7 @@ class Client:
self.password = 'testpassword'
self.server_name = 'example.wazokazi.is'
self.mailbox_name = 'inbox'
- self.leapdir = '~/.leap'
+ self.leapdir = os.path.join(os.path.abspath("."), "leap")
self._open_leap_session()
except:
@@ -21,7 +22,7 @@ class Client:
raise
def _open_leap_session(self):
- self.leap_config = LeapConfig()
+ self.leap_config = LeapConfig(leap_home=self.leapdir)
self.provider = LeapProvider(self.server_name, self.leap_config)
self.leap_session = LeapSessionFactory(self.provider).create(LeapCredentials(self.username, self.password))
self.mbx = self.leap_session.account.getMailbox(self.mailbox_name)
diff --git a/service/leap/example.wazokazi.is.ca.crt b/service/leap/example.wazokazi.is.ca.crt
new file mode 100644
index 00000000..eaecc122
--- /dev/null
+++ b/service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