diff options
author | Frederic Peters <fpeters@entrouvert.com> | 2004-12-16 14:04:43 +0000 |
---|---|---|
committer | Frederic Peters <fpeters@entrouvert.com> | 2004-12-16 14:04:43 +0000 |
commit | 76ec7eb692476075c9ab2649f8612479ed5df0f5 (patch) | |
tree | 46ad31e6810679215c6cbc2577faca952040f7b0 /lasso/xml | |
parent | f5471b3acf9069cba291593e21f77705299d3b7e (diff) | |
download | lasso-76ec7eb692476075c9ab2649f8612479ed5df0f5.tar.gz lasso-76ec7eb692476075c9ab2649f8612479ed5df0f5.tar.xz lasso-76ec7eb692476075c9ab2649f8612479ed5df0f5.zip |
(almost) done with errors in ID-FF; remaining "return -1" have been converted
to LASSO_ERROR_UNDEFINED (there are forty-three of them).
LASSO_ERROR_UNDEFINED was redefined from -999 to -1 so it is easier to add new
sequences of errros.
Diffstat (limited to 'lasso/xml')
-rw-r--r-- | lasso/xml/errors.c | 17 | ||||
-rw-r--r-- | lasso/xml/errors.h | 19 |
2 files changed, 31 insertions, 5 deletions
diff --git a/lasso/xml/errors.c b/lasso/xml/errors.c index e43a7974..9a938677 100644 --- a/lasso/xml/errors.c +++ b/lasso/xml/errors.c @@ -97,6 +97,18 @@ lasso_strerror(int error_code) return "Name identifier not found"; case LASSO_PROFILE_ERROR_BUILDING_QUERY_FAILED: return "Error building request QUERY url"; + case LASSO_PROFILE_ERROR_BUILDING_REQUEST_FAILED: + return "Error building request object"; + case LASSO_PROFILE_ERROR_BUILDING_MESSAGE_FAILED: + return "Error building request message"; + case LASSO_PROFILE_ERROR_BUILDING_RESPONSE_FAILED: + return "Error building response object"; + case LASSO_PROFILE_ERROR_SESSION_NOT_FOUND: + return "Session not found"; + case LASSO_PROFILE_ERROR_BAD_IDENTITY_DUMP: + return "Failed to create identity from dump"; + case LASSO_PROFILE_ERROR_BAD_SESSION_DUMP: + return "Failed to create session from dump"; case LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ: return "An object type provided as parameter "\ @@ -106,8 +118,13 @@ lasso_strerror(int error_code) case LASSO_PARAM_ERROR_CHECK_FAILED: return "The error return location should be "\ "either NULL or contains a NULL error."; + case LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY: return "Invalid NameIDPolicy in lib:AuthnRequest: %s"; + + case LASSO_DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER: + return "Name identifier not found in request"; + default: return g_strdup_printf("Undefined error code %d.", error_code); } diff --git a/lasso/xml/errors.h b/lasso/xml/errors.h index d7e40b36..1a5fdf8b 100644 --- a/lasso/xml/errors.h +++ b/lasso/xml/errors.h @@ -26,6 +26,9 @@ /* Negative errors : programming or runtime recoverable errors */ /* Positive errors : Liberty Alliance recoverable errors */ +/* undefined */ +#define LASSO_ERROR_UNDEFINED -1 + /* generic XML */ #define LASSO_XML_ERROR_NODE_NOT_FOUND -10 #define LASSO_XML_ERROR_NODE_CONTENT_NOT_FOUND -11 @@ -48,14 +51,14 @@ #define LASSO_DS_ERROR_INVALID_SIGALG -113 #define LASSO_DS_ERROR_DIGEST_COMPUTE_FAILED -114 -/* server */ +/* Server */ #define LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND -201 #define LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED -202 -/* logout */ +/* Single Logout */ #define LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE -301 -/* profile */ +/* Profile */ #define LASSO_PROFILE_ERROR_INVALID_QUERY -401 #define LASSO_PROFILE_ERROR_INVALID_POST_MSG -402 #define LASSO_PROFILE_ERROR_INVALID_SOAP_MSG -403 @@ -70,6 +73,12 @@ #define LASSO_PROFILE_ERROR_FEDERATION_NOT_FOUND -412 #define LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND -413 #define LASSO_PROFILE_ERROR_BUILDING_QUERY_FAILED -414 +#define LASSO_PROFILE_ERROR_BUILDING_REQUEST_FAILED -415 +#define LASSO_PROFILE_ERROR_BUILDING_MESSAGE_FAILED -416 +#define LASSO_PROFILE_ERROR_BUILDING_RESPONSE_FAILED -417 +#define LASSO_PROFILE_ERROR_SESSION_NOT_FOUND -418 +#define LASSO_PROFILE_ERROR_BAD_IDENTITY_DUMP -419 +#define LASSO_PROFILE_ERROR_BAD_SESSION_DUMP -420 /* functions/methods parameters checking */ #define LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ -501 @@ -84,7 +93,7 @@ #define LASSO_LOGIN_ERROR_INVALID_SIGNATURE 605 #define LASSO_LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST 606 -/* others */ -#define LASSO_ERROR_UNDEFINED -999 +/* Federation Termination Notification */ +#define LASSO_DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER -700 const char* lasso_strerror(int error_code); |