summaryrefslogtreecommitdiff
path: root/src/leap/eip/specs.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-10-20 06:30:16 +0900
committerkali <kali@leap.se>2012-10-20 06:30:16 +0900
commitf791a83ce57cef7010da819d61e7f5132fa4611e (patch)
tree52718be680373688738a4d9ce9ea842e7cab0317 /src/leap/eip/specs.py
parenta1acfd6417beeae312f056f76ac009b80c38654d (diff)
connecting page
and changes to functions having to do with the default path to certs.
Diffstat (limited to 'src/leap/eip/specs.py')
-rw-r--r--src/leap/eip/specs.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/leap/eip/specs.py b/src/leap/eip/specs.py
index 1a670b0e..4014b7c9 100644
--- a/src/leap/eip/specs.py
+++ b/src/leap/eip/specs.py
@@ -8,7 +8,14 @@ PROVIDER_CA_CERT = __branding.get(
'provider_ca_file',
'testprovider-ca-cert.pem')
-provider_ca_path = lambda: str(os.path.join(
+provider_ca_path = lambda domain: str(os.path.join(
+ #baseconfig.get_default_provider_path(),
+ baseconfig.get_provider_path(domain),
+ 'keys', 'ca',
+ 'cacert.pem'
+))
+
+default_provider_ca_path = lambda: str(os.path.join(
baseconfig.get_default_provider_path(),
'keys', 'ca',
PROVIDER_CA_CERT
@@ -17,7 +24,13 @@ provider_ca_path = lambda: str(os.path.join(
PROVIDER_DOMAIN = __branding.get('provider_domain', 'testprovider.example.org')
-client_cert_path = lambda: unicode(os.path.join(
+client_cert_path = lambda domain: unicode(os.path.join(
+ baseconfig.get_provider_path(domain),
+ 'keys', 'client',
+ 'openvpn.pem'
+))
+
+default_client_cert_path = lambda: unicode(os.path.join(
baseconfig.get_default_provider_path(),
'keys', 'client',
'openvpn.pem'
@@ -46,11 +59,11 @@ eipconfig_spec = {
},
'openvpn_ca_certificate': {
'type': unicode, # path
- 'default': provider_ca_path
+ 'default': default_provider_ca_path
},
'openvpn_client_certificate': {
'type': unicode, # path
- 'default': client_cert_path
+ 'default': default_client_cert_path
},
'connect_on_login': {
'type': bool,