summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-01-09 20:10:44 +0100
committerKali Kaneko <kali@leap.se>2018-01-25 01:19:02 +0100
commit5510c24e61046269e5b29df7d7ffb67a42bdc763 (patch)
tree99e49711079666d4b38e2c331d410855c0bab194 /src/leap/bitmask
parentcb1b9e06e3062035df19d9c0812bef7a98bcc51f (diff)
[feat] get cert automatically on vpn start
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/vpn/service.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/bitmask/vpn/service.py b/src/leap/bitmask/vpn/service.py
index 36699712..922cfaea 100644
--- a/src/leap/bitmask/vpn/service.py
+++ b/src/leap/bitmask/vpn/service.py
@@ -264,8 +264,11 @@ class VPNService(HookableService):
ca_path = os.path.join(prefix, "ca", "cacert.pem")
if not os.path.isfile(cert_path):
- raise ImproperlyConfigured(
- 'Cannot find client certificate. Please get one')
+ gotcert = yield self.do_get_cert('ignored@%s' % provider)
+ if gotcert['get_cert'] != 'ok':
+ raise ImproperlyConfigured(
+ 'Cannot find client certificate. Please get one')
+
if not os.path.isfile(ca_path):
raise ImproperlyConfigured(
'Cannot find provider certificate. '