From 2bbe0e0a2d852a1a7261b2fa927eab6e8f41c8c3 Mon Sep 17 00:00:00 2001 From: kali Date: Mon, 27 Aug 2012 05:45:58 +0900 Subject: change default_provider_path to base.constants fix tests by introducing a (dirtish) workaround for check for openvpn keys during vpn connection initialization. noted that eipconnection constructor should be better not having that class of side-effects. --- src/leap/base/constants.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/leap/base/constants.py (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py new file mode 100644 index 00000000..55308a31 --- /dev/null +++ b/src/leap/base/constants.py @@ -0,0 +1,8 @@ +"""constants to be used in base module""" + +# default provider placeholder +# using `example.org` we make sure that this +# is not going to be resolved during the tests phases +# (we expect testers to add it to their /etc/hosts + +DEFAULT_TEST_PROVIDER = "testprovider.example.org" -- cgit v1.2.3 From 568d52ccf33e6d7683f36f5fe2e3c32b47892216 Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 28 Aug 2012 05:30:38 +0900 Subject: eipchecker.fetch definition and tests deprecated base:test_config.test_complete_file (dup functionality) --- src/leap/base/constants.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index 55308a31..991a1dfe 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -6,3 +6,19 @@ # (we expect testers to add it to their /etc/hosts DEFAULT_TEST_PROVIDER = "testprovider.example.org" + +DEFINITION_EXPECTED_PATH = "provider-definition.json" + +DEFAULT_PROVIDER_DEFINITION = { + u'api_uri': u'https://api.testprovider.example.org/', + u'api_version': u'0.1.0', + u'ca_cert': u'8aab80ae4326fd30721689db813733783fe0bd7e', + u'ca_cert_uri': u'https://testprovider.example.org/cacert.pem', + u'description': {u'en': u'This is a test provider'}, + u'display_name': {u'en': u'Test Provider'}, + u'domain': u'testprovider.example.org', + u'enrollment_policy': u'open', + u'public_key': u'cb7dbd679f911e85bc2e51bd44afd7308ee19c21', + u'serial': 1, + u'services': [u'eip'], + u'version': u'0.1.0'} -- cgit v1.2.3 From f3b601cb525b2884e7a48c7bfc41b4aef915adf7 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 12 Sep 2012 08:38:36 +0900 Subject: moved network checks to its own class so it can be more easily moved to base.checks and reused when eip is a module. --- src/leap/base/constants.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index 991a1dfe..6c13969f 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -22,3 +22,5 @@ DEFAULT_PROVIDER_DEFINITION = { u'serial': 1, u'services': [u'eip'], u'version': u'0.1.0'} + +MAX_ICMP_PACKET_LOSS = 10 -- cgit v1.2.3 From 18109193b239be6e7ecc4c2d07c9c999e33081f8 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 12 Sep 2012 21:29:49 +0000 Subject: checks for systray in unity --- src/leap/base/constants.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index 991a1dfe..0ec3e016 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -1,4 +1,5 @@ """constants to be used in base module""" +APP_NAME = "leap" # default provider placeholder # using `example.org` we make sure that this -- cgit v1.2.3 From 0d35f2a82bf15504ace2135af3e0c66ae1c16874 Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 18 Sep 2012 11:11:43 +0900 Subject: do_branding command added to setup --- src/leap/base/constants.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index 6266c693..f3e24715 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -1,23 +1,26 @@ """constants to be used in base module""" -APP_NAME = "leap" +from leap import __branding +APP_NAME = __branding.get("short_name", "leap") # default provider placeholder # using `example.org` we make sure that this # is not going to be resolved during the tests phases # (we expect testers to add it to their /etc/hosts -DEFAULT_TEST_PROVIDER = "testprovider.example.org" +DEFAULT_PROVIDER = __branding.get( + "provider_domain", + "testprovider.example.org") -DEFINITION_EXPECTED_PATH = "provider-definition.json" +DEFINITION_EXPECTED_PATH = "definition.json" DEFAULT_PROVIDER_DEFINITION = { - u'api_uri': u'https://api.testprovider.example.org/', + u'api_uri': u'https://api.%s/' % DEFAULT_PROVIDER, u'api_version': u'0.1.0', u'ca_cert': u'8aab80ae4326fd30721689db813733783fe0bd7e', - u'ca_cert_uri': u'https://testprovider.example.org/cacert.pem', + u'ca_cert_uri': u'https://%s/cacert.pem' % DEFAULT_PROVIDER, u'description': {u'en': u'This is a test provider'}, u'display_name': {u'en': u'Test Provider'}, - u'domain': u'testprovider.example.org', + u'domain': u'%s' % DEFAULT_PROVIDER, u'enrollment_policy': u'open', u'public_key': u'cb7dbd679f911e85bc2e51bd44afd7308ee19c21', u'serial': 1, -- cgit v1.2.3 From 89735a5fd3c81e8aba3cb7b1d4836c1bf1e8c098 Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 18 Sep 2012 22:55:45 +0900 Subject: cert verification and malformed json checks --- src/leap/base/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index f3e24715..7a1415fb 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -11,7 +11,7 @@ DEFAULT_PROVIDER = __branding.get( "provider_domain", "testprovider.example.org") -DEFINITION_EXPECTED_PATH = "definition.json" +DEFINITION_EXPECTED_PATH = "provider.json" DEFAULT_PROVIDER_DEFINITION = { u'api_uri': u'https://api.%s/' % DEFAULT_PROVIDER, -- cgit v1.2.3 From 3fd7b55de96484e02accb991fb2c0c3ce0aa9883 Mon Sep 17 00:00:00 2001 From: antialias Date: Tue, 25 Sep 2012 17:37:48 -0400 Subject: First check for threaded network checks. TODO: tests. --- src/leap/base/constants.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index 7a1415fb..8a76b6b4 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -28,3 +28,5 @@ DEFAULT_PROVIDER_DEFINITION = { u'version': u'0.1.0'} MAX_ICMP_PACKET_LOSS = 10 + +ROUTE_CHECK_INTERVAL = 120 -- cgit v1.2.3 From abf481cab381a86d8a9c5607a131b56636081382 Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 25 Sep 2012 05:48:06 +0900 Subject: refactored jsonconfig, included jsonschema validation and type casting. --- src/leap/base/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index 7a1415fb..48a18dc3 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -16,7 +16,7 @@ DEFINITION_EXPECTED_PATH = "provider.json" DEFAULT_PROVIDER_DEFINITION = { u'api_uri': u'https://api.%s/' % DEFAULT_PROVIDER, u'api_version': u'0.1.0', - u'ca_cert': u'8aab80ae4326fd30721689db813733783fe0bd7e', + u'ca_cert_fingerprint': u'8aab80ae4326fd30721689db813733783fe0bd7e', u'ca_cert_uri': u'https://%s/cacert.pem' % DEFAULT_PROVIDER, u'description': {u'en': u'This is a test provider'}, u'display_name': {u'en': u'Test Provider'}, -- cgit v1.2.3 From 6728eb9afb21bad867e4052a6190a9bdb34c928a Mon Sep 17 00:00:00 2001 From: kali Date: Mon, 8 Oct 2012 07:50:24 +0900 Subject: popup dialog error when network error happens we are shutting down for now. we should be acting upon failures in the near future. lowered the recurrent checks interval to 10 seconds. --- src/leap/base/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index 8a76b6b4..3f32176f 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -29,4 +29,4 @@ DEFAULT_PROVIDER_DEFINITION = { MAX_ICMP_PACKET_LOSS = 10 -ROUTE_CHECK_INTERVAL = 120 +ROUTE_CHECK_INTERVAL = 10 -- cgit v1.2.3 From e98c3cc5fad75bea038dc67238e5ce85d701b1e1 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 20 Dec 2012 02:50:52 +0900 Subject: fix broken tests --- src/leap/base/constants.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index f7be8d98..b38723be 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -14,18 +14,27 @@ DEFAULT_PROVIDER = __branding.get( DEFINITION_EXPECTED_PATH = "provider.json" DEFAULT_PROVIDER_DEFINITION = { - u'api_uri': u'https://api.%s/' % DEFAULT_PROVIDER, - u'api_version': u'0.1.0', - u'ca_cert_fingerprint': u'8aab80ae4326fd30721689db813733783fe0bd7e', - u'ca_cert_uri': u'https://%s/cacert.pem' % DEFAULT_PROVIDER, - u'description': {u'en': u'This is a test provider'}, - u'display_name': {u'en': u'Test Provider'}, - u'domain': u'%s' % DEFAULT_PROVIDER, - u'enrollment_policy': u'open', - u'public_key': u'cb7dbd679f911e85bc2e51bd44afd7308ee19c21', - u'serial': 1, - u'services': [u'eip'], - u'version': u'0.1.0'} + u"api_uri": "https://api.%s/" % DEFAULT_PROVIDER, + u"api_version": u"1", + u"ca_cert_fingerprint": "SHA256: fff", + u"ca_cert_uri": u"https://%s/ca.crt" % DEFAULT_PROVIDER, + u"default_language": u"en", + u"description": { + u"en": u"A demonstration service provider using the LEAP platform" + }, + u"domain": "%s" % DEFAULT_PROVIDER, + u"enrollment_policy": u"open", + u"languages": [ + u"en" + ], + u"name": { + u"en": u"Test Provider" + }, + u"services": [ + "openvpn" + ] +} + MAX_ICMP_PACKET_LOSS = 10 -- cgit v1.2.3 From 6e9c63f47b98fbfcd3a5104fbfa5cc9d9ffe5143 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 17 Jan 2013 07:31:59 +0900 Subject: osx fixed already running instance check --- src/leap/base/constants.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/leap/base/constants.py') diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index b38723be..f5665e5f 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -1,6 +1,7 @@ """constants to be used in base module""" from leap import __branding -APP_NAME = __branding.get("short_name", "leap") +APP_NAME = __branding.get("short_name", "leap-client") +OPENVPN_BIN = "openvpn" # default provider placeholder # using `example.org` we make sure that this -- cgit v1.2.3