summaryrefslogtreecommitdiff
path: root/src/leap/base/auth.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-12-10 23:20:09 +0900
committerkali <kali@leap.se>2012-12-10 23:20:09 +0900
commit53fa2c134ab2c96376276aa1c0ed74db0aaba218 (patch)
tree16283d3f6a9fb563e01fc475415865b4d532177b /src/leap/base/auth.py
parent38cc1758240a3c64db387b0437dcf1517b52da15 (diff)
get cipher config from eip-service
Diffstat (limited to 'src/leap/base/auth.py')
-rw-r--r--src/leap/base/auth.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/leap/base/auth.py b/src/leap/base/auth.py
index 50533278..73856bb0 100644
--- a/src/leap/base/auth.py
+++ b/src/leap/base/auth.py
@@ -10,6 +10,7 @@ from PyQt4 import QtCore
from leap.base import constants as baseconstants
from leap.crypto import leapkeyring
+from leap.util.misc import null_check
from leap.util.web import get_https_domain_and_port
logger = logging.getLogger(__name__)
@@ -26,11 +27,6 @@ one if not.
"""
-class ImproperlyConfigured(Exception):
- """
- """
-
-
class SRPAuthenticationError(Exception):
"""
exception raised
@@ -38,14 +34,6 @@ class SRPAuthenticationError(Exception):
"""
-def null_check(value, value_name):
- try:
- assert value is not None
- except AssertionError:
- raise ImproperlyConfigured(
- "%s parameter cannot be None" % value_name)
-
-
safe_unhexlify = lambda x: binascii.unhexlify(x) \
if (len(x) % 2 == 0) else binascii.unhexlify('0' + x)
@@ -64,7 +52,7 @@ class LeapSRPRegister(object):
hashfun=srp.SHA256,
ng_constant=srp.NG_1024):
- null_check(provider, provider)
+ null_check(provider, "provider")
self.schema = schema