summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/eip/eipconfig.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-09-20 17:28:25 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-09-20 17:28:25 -0300
commit1f0f8efc4cb985c082b3b8fe7b3dc45aed047a47 (patch)
tree8d96c7a374c91699c55fb8c5b609aac222a94e74 /src/leap/bitmask/services/eip/eipconfig.py
parent9568093138c85212e15d50ade5d5fc7dcec9ff6e (diff)
parent222ce2a1513a3776b3277ded365672d7d43ad2e4 (diff)
Merge branch 'release-0.3.3'
Conflicts: pkg/requirements.pip setup.py src/leap/bitmask/config/leapsettings.py
Diffstat (limited to 'src/leap/bitmask/services/eip/eipconfig.py')
-rw-r--r--src/leap/bitmask/services/eip/eipconfig.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/leap/bitmask/services/eip/eipconfig.py b/src/leap/bitmask/services/eip/eipconfig.py
index 1cb7419e..7d8995b4 100644
--- a/src/leap/bitmask/services/eip/eipconfig.py
+++ b/src/leap/bitmask/services/eip/eipconfig.py
@@ -14,7 +14,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
"""
Provider configuration
"""
@@ -26,9 +25,10 @@ import time
import ipaddr
from leap.bitmask.config.providerconfig import ProviderConfig
+from leap.bitmask.services import ServiceConfig
from leap.bitmask.services.eip.eipspec import get_schema
+from leap.bitmask.util import get_path_prefix
from leap.common.check import leap_assert, leap_assert_type
-from leap.common.config.baseconfig import BaseConfig
logger = logging.getLogger(__name__)
@@ -144,15 +144,17 @@ class VPNGatewaySelector(object):
return -local_offset / 3600
-class EIPConfig(BaseConfig):
+class EIPConfig(ServiceConfig):
"""
Provider configuration abstraction class
"""
+ _service_name = "eip"
+
OPENVPN_ALLOWED_KEYS = ("auth", "cipher", "tls-cipher")
OPENVPN_CIPHERS_REGEX = re.compile("[A-Z0-9\-]+")
def __init__(self):
- BaseConfig.__init__(self)
+ ServiceConfig.__init__(self)
self._api_version = None
def _get_schema(self):
@@ -236,13 +238,10 @@ class EIPConfig(BaseConfig):
leap_assert(providerconfig, "We need a provider")
leap_assert_type(providerconfig, ProviderConfig)
- cert_path = os.path.join(self.get_path_prefix(),
- "leap",
- "providers",
+ cert_path = os.path.join(get_path_prefix(),
+ "leap", "providers",
providerconfig.get_domain(),
- "keys",
- "client",
- "openvpn.pem")
+ "keys", "client", "openvpn.pem")
if not about_to_download:
leap_assert(os.path.exists(cert_path),