diff options
author | kali <kali@leap.se> | 2012-09-18 22:55:45 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-09-18 22:55:45 +0900 |
commit | 89735a5fd3c81e8aba3cb7b1d4836c1bf1e8c098 (patch) | |
tree | a8a00856a7ee856cb08f263d613ac038f82043fd /src/leap/eip/exceptions.py | |
parent | 0d35f2a82bf15504ace2135af3e0c66ae1c16874 (diff) |
cert verification and malformed json checks
Diffstat (limited to 'src/leap/eip/exceptions.py')
-rw-r--r-- | src/leap/eip/exceptions.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/leap/eip/exceptions.py b/src/leap/eip/exceptions.py index 467be7fe..f048621f 100644 --- a/src/leap/eip/exceptions.py +++ b/src/leap/eip/exceptions.py @@ -40,6 +40,8 @@ class EIPClientError(Exception): base EIPClient exception """ critical = False + failfirst = False + warning = False class CriticalError(EIPClientError): @@ -54,7 +56,7 @@ class Warning(EIPClientError): """ just that, warnings """ - pass + warning = True class EIPNoPolkitAuthAgentAvailable(CriticalError): @@ -81,10 +83,21 @@ class EIPNoCommandError(EIPClientError): "<br/>(Might be a permissions problem)") +class EIPBadCertError(Warning): + # XXX this should be critical and fail close + message = "cert verification failed" + usermessage = "there is a problem with provider certificate" + + +class LeapBadConfigFetchedError(Warning): + message = "provider sent a malformed json file" + usermessage = "an error occurred during configuratio of leap services" + # # errors still needing some love # + class EIPInitNoKeyFileError(CriticalError): message = "No vpn keys found in the expected path" usermessage = "We could not find your eip certs in the expected path" |