summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/common/config/__init__.py39
-rw-r--r--src/leap/common/config/baseconfig.py5
-rw-r--r--src/leap/common/config/prefixers.py132
-rw-r--r--src/leap/common/config/tests/test_baseconfig.py5
-rw-r--r--src/leap/common/config/tests/test_get_path_prefix.py63
-rw-r--r--src/leap/common/events/client.py31
-rw-r--r--src/leap/common/events/server.py11
-rw-r--r--src/leap/common/testing/cacert.pem49
-rw-r--r--src/leap/common/testing/leaptestscert.pem143
-rw-r--r--src/leap/common/testing/leaptestskey.pem55
10 files changed, 265 insertions, 268 deletions
diff --git a/src/leap/common/config/__init__.py b/src/leap/common/config/__init__.py
index e69de29..68d92dc 100644
--- a/src/leap/common/config/__init__.py
+++ b/src/leap/common/config/__init__.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+# __init__.py
+# Copyright (C) 2013 LEAP
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+Common configs
+"""
+import os
+
+from dirspec.basedir import get_xdg_config_home
+
+
+def get_path_prefix(standalone=False):
+ """
+ Returns the platform dependent path prefix.
+
+ :param standalone: if True it will return the prefix for a standalone
+ application.
+ Otherwise, it will return the system default for
+ configuration storage.
+ :type standalone: bool
+ """
+ config_home = get_xdg_config_home()
+ if standalone:
+ config_home = os.path.join(os.getcwd(), "config")
+
+ return config_home
diff --git a/src/leap/common/config/baseconfig.py b/src/leap/common/config/baseconfig.py
index e310bc0..2d98031 100644
--- a/src/leap/common/config/baseconfig.py
+++ b/src/leap/common/config/baseconfig.py
@@ -29,7 +29,7 @@ from abc import ABCMeta, abstractmethod
from leap.common.check import leap_assert, leap_check
from leap.common.files import mkdir_p
from leap.common.config.pluggableconfig import PluggableConfig
-from leap.common.config.prefixers import get_platform_prefixer
+from leap.common.config import get_path_prefix
logger = logging.getLogger(__name__)
@@ -108,8 +108,7 @@ class BaseConfig:
"""
Returns the platform dependant path prefixer
"""
- return get_platform_prefixer().get_path_prefix(
- standalone=self.standalone)
+ return get_path_prefix(standalone=self.standalone)
def loaded(self):
"""
diff --git a/src/leap/common/config/prefixers.py b/src/leap/common/config/prefixers.py
deleted file mode 100644
index 9a5b043..0000000
--- a/src/leap/common/config/prefixers.py
+++ /dev/null
@@ -1,132 +0,0 @@
-# -*- coding: utf-8 -*-
-# prefixers.py
-# Copyright (C) 2013 LEAP
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-"""
-Platform dependant configuration path prefixers
-"""
-import os
-import platform
-
-from abc import ABCMeta, abstractmethod
-from xdg import BaseDirectory
-
-from leap.common.check import leap_assert
-
-
-class Prefixer:
- """
- Abstract prefixer class
- """
-
- __metaclass__ = ABCMeta
-
- @abstractmethod
- def get_path_prefix(self, standalone=False):
- """
- Returns the platform dependant path prefixer
-
- :param standalone: if True it will return the prefix for a
- standalone application. Otherwise, it will return the system
- default for configuration storage.
- :type standalone: bool
- """
- return ""
-
-
-def get_platform_prefixer():
- prefixer = globals()[platform.system() + "Prefixer"]
- leap_assert(prefixer, "Unimplemented platform prefixer: %s" %
- (platform.system(),))
- return prefixer()
-
-
-class LinuxPrefixer(Prefixer):
- """
- Config prefixer for the Linux platform
- """
-
- def get_path_prefix(self, standalone=False):
- """
- Returns the platform dependant path prefixer.
- This method expects an env variable named LEAP_CLIENT_PATH if
- standalone is used.
-
- :param standalone: if True it will return the prefix for a
- standalone application. Otherwise, it will return the system
- default for configuration storage.
- :type standalone: bool
- """
- config_dir = BaseDirectory.xdg_config_home
- if not standalone:
- return config_dir
- return os.path.join(os.getcwd(), "config")
-
-
-class DarwinPrefixer(Prefixer):
- """
- Config prefixer for the Darwin platform
- """
-
- def get_path_prefix(self, standalone=False):
- """
- Returns the platform dependant path prefixer.
- This method expects an env variable named LEAP_CLIENT_PATH if
- standalone is used.
-
- :param standalone: if True it will return the prefix for a
- standalone application. Otherwise, it will return the system
- default for configuration storage.
- :type standalone: bool
- """
- config_dir = BaseDirectory.xdg_config_home
- if not standalone:
- return config_dir
- return os.path.join(os.getcwd(), "config")
-
-
-class WindowsPrefixer(Prefixer):
- """
- Config prefixer for the Windows platform
- """
-
- def get_path_prefix(self, standalone=False):
- """
- Returns the platform dependant path prefixer.
- This method expects an env variable named LEAP_CLIENT_PATH if
- standalone is used.
-
- :param standalone: if True it will return the prefix for a
- standalone application. Otherwise, it will return the system
- default for configuration storage.
- :type standalone: bool
- """
- config_dir = BaseDirectory.xdg_config_home
-
- if not standalone:
- return config_dir
- return os.path.join(os.getcwd(), "config")
-
-if __name__ == "__main__":
- try:
- abs_prefixer = Prefixer()
- except Exception as e:
- assert isinstance(e, TypeError), "Something went wrong"
- print "Abstract Prefixer class is working as expected"
-
- linux_prefixer = LinuxPrefixer()
- print linux_prefixer.get_path_prefix(standalone=True)
- print linux_prefixer.get_path_prefix()
diff --git a/src/leap/common/config/tests/test_baseconfig.py b/src/leap/common/config/tests/test_baseconfig.py
index 8a2915e..8bdf4d0 100644
--- a/src/leap/common/config/tests/test_baseconfig.py
+++ b/src/leap/common/config/tests/test_baseconfig.py
@@ -113,9 +113,12 @@ class TestConfig(BaseConfig):
def get_version(self):
return self._safe_get_value("version")
- def _get_spec(self):
+ def _get_schema(self):
return sample_spec
+ def _get_spec(self):
+ return self._get_schema()
+
def get_default_language(self):
return self._safe_get_value("default_language")
diff --git a/src/leap/common/config/tests/test_get_path_prefix.py b/src/leap/common/config/tests/test_get_path_prefix.py
new file mode 100644
index 0000000..27824fc
--- /dev/null
+++ b/src/leap/common/config/tests/test_get_path_prefix.py
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+# test_get_path_prefix.py
+# Copyright (C) 2013 LEAP
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+Tests for get_path_prefix
+"""
+import os
+import mock
+
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+
+from leap.common.config import get_path_prefix
+from leap.common.testing.basetest import BaseLeapTest
+
+
+class GetPathPrefixTest(BaseLeapTest):
+ """
+ Tests for the get_path_prefix helper.
+
+ Note: we only are testing that the path is correctly returned and that if
+ we are not in a bundle (standalone=False) then the paths are different.
+
+ dirspec calculates the correct path using different methods and dlls
+ (in case of Windows) so we don't implement tests to check if the paths
+ are the correct ones.
+ """
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_standalone_path(self):
+ expected_path = os.path.join('expected', 'path', 'config')
+ fake_cwd = os.path.join('expected', 'path')
+ with mock.patch('os.getcwd', lambda: fake_cwd):
+ path = get_path_prefix(standalone=True)
+ self.assertEquals(path, expected_path)
+
+ def test_path_prefix(self):
+ standalone_path = get_path_prefix(standalone=True)
+ path = get_path_prefix(standalone=False)
+ self.assertNotEquals(path, standalone_path)
+
+
+if __name__ == "__main__":
+ unittest.main(verbosity=2)
diff --git a/src/leap/common/events/client.py b/src/leap/common/events/client.py
index 4ae9bff..83f18e0 100644
--- a/src/leap/common/events/client.py
+++ b/src/leap/common/events/client.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/>.
-
"""
The client end point of the events mechanism.
@@ -27,18 +26,15 @@ server that it wants to be notified whenever signals of that type are sent by
some other client.
"""
-
import logging
-import threading
from protobuf.socketrpc import RpcService
-from leap.common.events import (
- events_pb2 as proto,
- server,
- daemon,
- mac_auth,
-)
+
+from leap.common.events import events_pb2 as proto
+from leap.common.events import server
+from leap.common.events import daemon
+from leap.common.events import mac_auth
logger = logging.getLogger(__name__)
@@ -118,9 +114,13 @@ def register(signal, callback, uid=None, replace=False, reqcbk=None,
if signal not in registered_callbacks:
registered_callbacks[signal] = []
cbklist = registered_callbacks[signal]
+
+ # TODO should check that the callback has the right
+ # number of arguments.
+
if uid and filter(lambda (x, y): x == uid, cbklist):
if not replace:
- raise CallbackAlreadyRegisteredException()
+ raise CallbackAlreadyRegistered()
else:
registered_callbacks[signal] = filter(lambda(x, y): x != uid,
cbklist)
@@ -133,12 +133,13 @@ def register(signal, callback, uid=None, replace=False, reqcbk=None,
request.mac = ""
service = RpcService(proto.EventsServerService_Stub,
server.SERVER_PORT, 'localhost')
- logger.info(
+ logger.debug(
"Sending registration request to server on port %s: %s",
server.SERVER_PORT,
str(request)[:40])
return service.register(request, callback=reqcbk, timeout=timeout)
+
def unregister(signal, uid=None, reqcbk=None, timeout=1000):
"""
Unregister a callback.
@@ -226,7 +227,7 @@ def signal(signal, content="", mac_method="", mac="", reqcbk=None,
request.mac = mac
service = RpcService(proto.EventsServerService_Stub, server.SERVER_PORT,
'localhost')
- logger.info("Sending signal to server: %s", str(request)[:40])
+ logger.debug("Sending signal to server: %s", str(request)[:40])
return service.signal(request, callback=reqcbk, timeout=timeout)
@@ -251,7 +252,7 @@ def ping(port, reqcbk=None, timeout=1000):
proto.EventsClientService_Stub,
port,
'localhost')
- logger.info("Pinging a client in port %d..." % port)
+ logger.debug("Pinging a client in port %d..." % port)
return service.ping(request, callback=reqcbk, timeout=timeout)
@@ -277,7 +278,7 @@ class EventsClientService(proto.EventsClientService):
:param done: callback to be called when done
:type done: protobuf.socketrpc.server.Callback
"""
- logger.info('Received signal from server: %s...' % str(request)[:40])
+ logger.debug('Received signal from server: %s...' % str(request)[:40])
# run registered callbacks
# TODO: verify authentication using mac in incoming message
@@ -303,7 +304,7 @@ class EventsClientService(proto.EventsClientService):
:param done: callback to be called when done
:type done: protobuf.socketrpc.server.Callback
"""
- logger.info("Received ping request, sending response.")
+ logger.debug("Received ping request, sending response.")
response = proto.EventResponse()
response.status = proto.EventResponse.OK
done.run(response)
diff --git a/src/leap/common/events/server.py b/src/leap/common/events/server.py
index 861cb4f..dc55551 100644
--- a/src/leap/common/events/server.py
+++ b/src/leap/common/events/server.py
@@ -85,6 +85,7 @@ def ensure_server(port=SERVER_PORT):
logger.info('Launching server on port %d.', port)
return EventsServerDaemon.ensure(port)
+
def process_ping(port, request, response):
"""
Response callback for the ping event.
@@ -100,7 +101,7 @@ def process_ping(port, request, response):
logger.info('A server is already running on port %d.', port)
return
# port is taken, and not by an events server
- logger.info('Port %d is taken by something not an events server.', port)
+ logger.warning('Port %d is taken by something not an events server.', port)
raise PortAlreadyTaken(port)
@@ -125,7 +126,7 @@ def ping(port=SERVER_PORT, reqcbk=None, timeout=1000):
proto.EventsServerService_Stub,
port,
'localhost')
- logger.info("Pinging server in port %d..." % port)
+ logger.debug("Pinging server in port %d..." % port)
return service.ping(request, callback=reqcbk, timeout=timeout)
@@ -196,14 +197,14 @@ class EventsServerService(proto.EventsServerService):
:param done: callback to be called when done
:type done: protobuf.socketrpc.server.Callback
"""
- logger.info('Received signal from client: %s...', str(request)[:40])
+ logger.debug('Received signal from client: %s...', str(request)[:40])
# send signal to all registered clients
# TODO: verify signal auth
if request.event in registered_clients:
for port in registered_clients[request.event]:
def callback(req, resp):
- logger.info("Signal received by " + str(port))
+ logger.debug("Signal received by " + str(port))
service = RpcService(proto.EventsClientService_Stub,
port, 'localhost')
@@ -224,7 +225,7 @@ class EventsServerService(proto.EventsServerService):
:param done: callback to be called when done
:type done: protobuf.socketrpc.server.Callback
"""
- logger.info("Received ping request, sending response.")
+ logger.debug("Received ping request, sending response.")
response = proto.EventResponse()
response.status = proto.EventResponse.OK
done.run(response)
diff --git a/src/leap/common/testing/cacert.pem b/src/leap/common/testing/cacert.pem
index 6989c48..30c69c6 100644
--- a/src/leap/common/testing/cacert.pem
+++ b/src/leap/common/testing/cacert.pem
@@ -1,23 +1,30 @@
-----BEGIN CERTIFICATE-----
-MIID1TCCAr2gAwIBAgIJAOv0BS09D8byMA0GCSqGSIb3DQEBBQUAMIGAMQswCQYD
-VQQGEwJVUzETMBEGA1UECAwKY3liZXJzcGFjZTEnMCUGA1UECgweTEVBUCBFbmNy
-eXB0aW9uIEFjY2VzcyBQcm9qZWN0MRYwFAYDVQQDDA10ZXN0cy1sZWFwLnNlMRsw
-GQYJKoZIhvcNAQkBFgxpbmZvQGxlYXAuc2UwHhcNMTIwODMxMTYyNjMwWhcNMTUw
-ODMxMTYyNjMwWjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCmN5YmVyc3BhY2Ux
-JzAlBgNVBAoMHkxFQVAgRW5jcnlwdGlvbiBBY2Nlc3MgUHJvamVjdDEWMBQGA1UE
-AwwNdGVzdHMtbGVhcC5zZTEbMBkGCSqGSIb3DQEJARYMaW5mb0BsZWFwLnNlMIIB
-IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1pU7OU+abrUXFZwp6X0LlF0f
-xQvC1Nmr5sFH7N9RTu3bdwY2t57ECP2TPkH6+x7oOvCTgAMxIE1scWEEkfgKViqW
-FH/Om1UW1PMaiDYGtFuqEuxM95FvaYxp2K6rzA37WNsedA28sCYzhRD+/5HqbCNT
-3rRS2cPaVO8kXI/5bgd8bUk3009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7g3In+uk3iyfZT+yhmjz1j6IWqbno+sc3CfCOiEgTRTphFTN2aP6pvigD
+yKUBYZ0NRA5mAl3xopeT819DPkLgkacm4wugYKqV+60yrekmbEWsu/T5/jLWHN6s
+QelIKdLklA9oivM1lCIqR+XV4A2MX3zwXdEmZp8QYiBAqLf49wgCLhSOrgXXUlb0
+EUMsyclHs9PN33YRd9qQiE0hwBwpcxxus/sonnMP2xDiDiCu6dnYC7BmzfYfgiS5
+7tfEGpKyuY+7J+etOzOKfkNA20ooVRvvpQ4rpcHulKwZE3yI0geW7YS2uL+p5ORO
+twHvLcMPlAXUkXhS
-----END CERTIFICATE-----
diff --git a/src/leap/common/testing/leaptestscert.pem b/src/leap/common/testing/leaptestscert.pem
index 65596b1..7cb9265 100644
--- a/src/leap/common/testing/leaptestscert.pem
+++ b/src/leap/common/testing/leaptestscert.pem
@@ -1,84 +1,99 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number:
- eb:f4:05:2d:3d:0f:c6:f3
+ Serial Number: 4 (0x4)
Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=US, ST=cyberspace, O=LEAP Encryption Access Project, CN=tests-leap.se/emailAddress=info@leap.se
+ Issuer: C=US, ST=CA, L=Cyberspace, O=LEAP Encryption Access Project, OU=cyberspace, CN=tests-leap.se/name=tests-leap/emailAddress=tests@leap.se
Validity
- Not Before: Aug 31 16:30:17 2012 GMT
- Not After : Aug 31 16:30:17 2013 GMT
- Subject: C=US, ST=cyberspace, L=net, O=LEAP Encryption Access Project, CN=localhost/emailAddress=info@leap.se
+ Not Before: Sep 3 17:52:16 2013 GMT
+ Not After : Sep 1 17:52:16 2023 GMT
+ Subject: C=US, ST=CA, L=Cyberspace, O=LEAP Encryption Access Project, OU=cyberspace, CN=localhost/name=tests-leap/emailAddress=tests@leap.se
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
- 00:bc:f1:c4:05:ce:4b:d5:9b:9a:fa:c1:a5:0c:89:
- 15:7e:05:69:b6:a4:62:38:3a:d6:14:4a:36:aa:3c:
- 31:70:54:2e:bf:7d:05:19:ad:7b:0c:a9:a6:7d:46:
- be:83:62:cb:ea:b9:48:6c:7d:78:a0:10:0b:ad:8a:
- 74:7a:b8:ff:32:85:64:36:90:dc:38:dd:90:6e:07:
- 82:70:ae:5f:4e:1f:f4:46:98:f3:98:b4:fa:08:65:
- bf:d6:ec:a9:ba:7e:a8:f0:40:a2:d0:1a:cb:e6:fc:
- 95:c5:54:63:92:5b:b8:0a:36:cc:26:d3:2b:ad:16:
- ff:49:53:f4:65:7c:64:27:9a:f5:12:75:11:a5:0c:
- 5a:ea:1e:e4:31:f3:a6:2b:db:0e:4a:5d:aa:47:3a:
- f0:5e:2a:d5:6f:74:b6:f8:bc:9a:73:d0:fa:8a:be:
- a8:69:47:9b:07:45:d9:b5:cd:1c:9b:c5:41:9a:65:
- cc:99:a0:bd:bf:b5:e8:9f:66:5f:69:c9:6d:c8:68:
- 50:68:74:ae:8e:12:7e:9c:24:4f:dc:05:61:b7:8a:
- 6d:2a:95:43:d9:3f:fe:d8:c9:a7:ae:63:cd:30:d5:
- 95:84:18:2d:12:b5:2d:a6:fe:37:dd:74:b8:f8:a5:
- 59:18:8f:ca:f7:ae:63:0d:9d:66:51:7d:9c:40:48:
- 9b:a1
+ 00:c0:4f:ae:dc:f3:2e:0e:45:ae:a8:fe:0a:2b:de:
+ 00:28:b8:92:3a:5b:a4:7b:62:53:f3:ce:1e:2e:69:
+ b6:b8:62:1a:a0:00:46:73:71:9e:d2:e7:cf:42:a8:
+ e3:7c:12:8f:06:da:d4:2f:87:e6:52:68:d9:8f:89:
+ d1:43:8c:5c:5f:a5:bd:6c:04:c6:fd:36:ee:f6:d2:
+ cd:15:f1:43:31:cc:20:e1:ee:8c:9e:3d:91:9d:28:
+ ff:85:d3:8f:8c:90:1d:1e:1d:64:8e:6c:1a:f3:b2:
+ 3b:23:29:5b:03:ff:97:d4:78:b6:dd:d5:27:4a:d4:
+ 2d:9c:2b:3b:28:45:0f:86:54:4c:8c:25:e8:88:48:
+ 59:55:d3:97:f1:74:06:52:c9:b3:dc:c0:7f:b7:6a:
+ 25:57:fb:b7:0c:f5:e9:3c:6e:e7:c8:7a:aa:c0:7d:
+ 95:5d:bc:ef:f6:16:eb:fa:59:f4:76:30:47:b7:d9:
+ 73:bf:f6:08:f4:d9:74:86:59:de:ac:3d:73:27:fe:
+ 57:e5:2a:f3:4d:28:45:82:51:67:6a:4c:0a:c6:8b:
+ 40:aa:43:80:fe:43:bd:eb:b9:42:2d:84:22:6b:fb:
+ b2:d6:2b:ee:d0:28:6f:7c:d1:ad:51:47:b1:99:26:
+ fb:37:b2:48:54:0e:1d:de:b9:ad:ae:20:23:e2:a9:
+ 02:e5
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
+ Netscape Cert Type:
+ SSL Server
Netscape Comment:
- OpenSSL Generated Certificate
+ Easy-RSA Generated Server Certificate
X509v3 Subject Key Identifier:
- B2:50:B4:C6:38:8F:BA:C4:3B:69:4C:6B:45:7C:CF:08:48:36:02:E0
+ 51:92:B6:A3:D7:D6:EC:8F:FC:16:C5:D4:0F:87:CC:EA:5C:7C:17:81
X509v3 Authority Key Identifier:
- keyid:9E:92:44:BF:81:67:96:A2:9B:7E:6E:E6:A6:BB:9D:29:DA:E7:38:0A
+ keyid:36:19:70:96:A9:5C:FE:A3:82:0F:79:95:31:52:2B:4A:41:BD:81:CB
+ DirName:/C=US/ST=CA/L=Cyberspace/O=LEAP Encryption Access Project/OU=cyberspace/CN=tests-leap.se/name=tests-leap/emailAddress=tests@leap.se
+ serial:8B:BF:41:63:1E:10:6A:EC
+ X509v3 Extended Key Usage:
+ TLS Web Server Authentication
+ X509v3 Key Usage:
+ Digital Signature, Key Encipherment
Signature Algorithm: sha1WithRSAEncryption
- aa:ab:d4:27:e3:cb:42:05:55:fd:24:b3:e5:55:7d:fb:ce:6c:
- ff:c7:96:f0:7d:30:a1:53:4a:04:eb:a4:24:5e:96:ee:65:ef:
- e5:aa:08:47:9d:aa:95:2a:bb:6a:28:9f:51:62:63:d9:7d:1a:
- 81:a0:72:f7:9f:33:6b:3b:f4:dc:85:cd:2a:ee:83:a9:93:3d:
- 75:53:91:fa:0b:1b:10:83:11:2c:03:4e:ac:bf:c3:e6:25:74:
- 9f:14:13:4a:43:66:c2:d7:1c:6c:94:3e:a6:f3:a5:bd:01:2c:
- 9f:20:29:2e:62:82:12:d8:8b:70:1b:88:2b:18:68:5a:45:80:
- 46:2a:6a:d5:df:1f:d3:e8:57:39:0a:be:1a:d8:b0:3e:e5:b6:
- c3:69:b7:5e:c0:7b:b3:a8:a6:78:ee:0a:3d:a0:74:40:fb:42:
- 9f:f4:98:7f:47:cc:15:28:eb:b1:95:77:82:a8:65:9b:46:c3:
- 4f:f9:f4:72:be:bd:24:28:5c:0d:b3:89:e4:13:71:c8:a7:54:
- 1b:26:15:f3:c1:b2:a9:13:77:54:c2:b9:b0:c7:24:39:00:4c:
- 1a:a7:9b:e7:ad:4a:3a:32:c2:81:0d:13:2d:27:ea:98:00:a9:
- 0e:9e:38:3b:8f:80:34:17:17:3d:49:7e:f4:a5:19:05:28:08:
- 7d:de:d3:1f
+ 88:d9:35:e0:d9:fa:fd:6b:57:e2:4d:f6:ef:91:6f:56:a6:2b:
+ 1a:1e:ec:8f:b0:18:e3:ec:ca:c9:1e:78:07:1d:0f:cf:fe:09:
+ 21:84:25:c4:27:ea:22:d7:48:53:73:ed:78:0f:42:5c:c7:f7:
+ 38:04:84:df:67:99:fd:75:6f:e8:dc:3b:91:ab:fa:c7:32:e5:
+ fd:3b:ce:de:7c:6a:df:39:46:1e:46:3a:4d:e1:e1:60:f3:bf:
+ aa:b2:0b:5d:ee:f2:0c:ee:82:7f:b5:02:75:04:47:d5:2b:c8:
+ e0:6d:6a:10:4a:ca:e0:c3:4f:ee:ff:15:71:37:f5:4d:95:38:
+ fe:a3:da:84:46:90:04:c2:61:86:a0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hY2UxFjAU
+BgNVBAMTDXRlc3RzLWxlYXAuc2UxEzARBgNVBCkTCnRlc3RzLWxlYXAxHDAaBgkq
+hkiG9w0BCQEWDXRlc3RzQGxlYXAuc2WCCQCLv0FjHhBq7DATBgNVHSUEDDAKBggr
+BgEFBQcDATALBgNVHQ8EBAMCBaAwDQYJKoZIhvcNAQEFBQADggEBAIjZNeDZ+v1r
+V+JN9u+Rb1amKxoe7I+wGOPsyskeeAcdD8/+CSGEJcQn6iLXSFNz7XgPQlzH9zgE
+hN9nmf11b+jcO5Gr+scy5f07zt58at85Rh5GOk3h4WDzv6qyC13u8gzugn+1AnUE
+R9UryOBtahBKyuDDT+7/FXE39U2VOP6j2oRGkATCYYagf+J9YkZt9viQUYjD8ozK
+s4lAn2uLM2Xh/Q+L12qT3N6+hQfH0R2123BUn5XY+xH3p+aQupsoDj1HemNtYET2
+lqq2orwK5SXIonSRVJW74gkBVnNuVuhv1qXYGJbBgu8snuJMlLwAcV4WSWvklHrR
+DC70GbIqwrg=
-----END CERTIFICATE-----
diff --git a/src/leap/common/testing/leaptestskey.pem b/src/leap/common/testing/leaptestskey.pem
index fe6291a..3a3f3fc 100644
--- a/src/leap/common/testing/leaptestskey.pem
+++ b/src/leap/common/testing/leaptestskey.pem
@@ -1,27 +1,28 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEAvPHEBc5L1Zua+sGlDIkVfgVptqRiODrWFEo2qjwxcFQuv30F
-Ga17DKmmfUa+g2LL6rlIbH14oBALrYp0erj/MoVkNpDcON2QbgeCcK5fTh/0Rpjz
-mLT6CGW/1uypun6o8ECi0BrL5vyVxVRjklu4CjbMJtMrrRb/SVP0ZXxkJ5r1EnUR
-pQxa6h7kMfOmK9sOSl2qRzrwXirVb3S2+Lyac9D6ir6oaUebB0XZtc0cm8VBmmXM
-maC9v7Xon2ZfacltyGhQaHSujhJ+nCRP3AVht4ptKpVD2T/+2MmnrmPNMNWVhBgt
-ErUtpv433XS4+KVZGI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