From 5510c24e61046269e5b29df7d7ffb67a42bdc763 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 9 Jan 2018 20:10:44 +0100 Subject: [feat] get cert automatically on vpn start --- src/leap/bitmask/vpn/service.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/leap/bitmask') 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. ' -- cgit v1.2.3