summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-03-02 11:57:32 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-03-02 11:57:32 +0000
commit49bed47bd21b2fb913a3609b71867718f37130fd (patch)
treed2a74dac43659f5d99e378a1aec6850b03609568
parent8598c1327aa999793a5985ac2d6e380cc609918c (diff)
downloadlasso-49bed47bd21b2fb913a3609b71867718f37130fd.tar.gz
lasso-49bed47bd21b2fb913a3609b71867718f37130fd.tar.xz
lasso-49bed47bd21b2fb913a3609b71867718f37130fd.zip
Core: add PROFILE errors around assertion validation
* lasso/errors.c lasso/errors.h: - add errors concerning invalid assertion, assertion with invalid conditions, unknown issuers, or when the issuer is not a provider we marked as an IdP. - add error for missing sender id in an ID-WSF message.
-rw-r--r--lasso/errors.c12
-rw-r--r--lasso/errors.h34
2 files changed, 44 insertions, 2 deletions
diff --git a/lasso/errors.c b/lasso/errors.c
index 486d9018..9ef02655 100644
--- a/lasso/errors.c
+++ b/lasso/errors.c
@@ -211,6 +211,10 @@ lasso_strerror(int error_code)
return "Identity not found";
case LASSO_PROFILE_ERROR_INVALID_ARTIFACT:
return "Invalid artifact";
+ case LASSO_PROFILE_ERROR_INVALID_ASSERTION:
+ return "The assertion is malformed, Issuer differs from NameQualifier of the subject, signature cannot be verified.";
+ case LASSO_PROFILE_ERROR_INVALID_ASSERTION_CONDITIONS:
+ return "An assertion conditions could not be validated.";
case LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD:
return "Invalid HTTP method";
case LASSO_PROFILE_ERROR_INVALID_ISSUER:
@@ -229,10 +233,12 @@ lasso_strerror(int error_code)
return "Received request is not of the expected type.";
case LASSO_PROFILE_ERROR_INVALID_SOAP_MSG:
return "Invalid SOAP message";
+ case LASSO_PROFILE_ERROR_ISSUER_IS_NOT_AN_IDP:
+ return "The issuer of an assertion is not considered as an IdP";
case LASSO_PROFILE_ERROR_MISSING_ARTIFACT:
return "Missing SAML artifact";
case LASSO_PROFILE_ERROR_MISSING_ASSERTION:
- return "Missing assertion";
+ return "When looking for an assertion we did not found it.";
case LASSO_PROFILE_ERROR_MISSING_ENCRYPTION_PRIVATE_KEY:
return "Found an encrypted element but encryption private key is not set";
case LASSO_PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE:
@@ -271,6 +277,8 @@ lasso_strerror(int error_code)
return "Session not found";
case LASSO_PROFILE_ERROR_STATUS_NOT_SUCCESS:
return "Status code is not success";
+ case LASSO_PROFILE_ERROR_UNKNOWN_ISSUER:
+ return "The issuer of an assertion is unkown to us.";
case LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL:
return "Unable to find Profile URL in metadata";
case LASSO_PROFILE_ERROR_UNKNOWN_PROVIDER:
@@ -319,6 +327,8 @@ lasso_strerror(int error_code)
return "The necessary ResourceID or EncryptedResourceID for calling an ID-WSF service is missing.";
case LASSO_WSF_PROFILE_ERROR_MISSING_SECURITY:
return "Security SOAP Header is missing";
+ case LASSO_WSF_PROFILE_ERROR_MISSING_SENDER_ID:
+ return "The received ID-WSF request miss a Sender id.";
case LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST:
return "The last parsed response contained a SOAP fault with a RedirectRequest element.";
case LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER:
diff --git a/lasso/errors.h b/lasso/errors.h
index 82323c90..9be828c2 100644
--- a/lasso/errors.h
+++ b/lasso/errors.h
@@ -446,7 +446,7 @@
/**
* LASSO_PROFILE_ERROR_MISSING_ASSERTION:
*
- * Missing assertion
+ * When looking for an assertion we did not found it.
*/
#define LASSO_PROFILE_ERROR_MISSING_ASSERTION -427
/**
@@ -559,6 +559,31 @@
* The responder reported that he does not support this binding
*/
#define LASSO_PROFILE_ERROR_UNSUPPORTED_BINDING 445
+/**
+ * LASSO_PROFILE_ERROR_INVALID_ASSERTION_CONDITIONS:
+ *
+ * An assertion conditions could not be validated.
+ */
+#define LASSO_PROFILE_ERROR_INVALID_ASSERTION_CONDITIONS 446
+/**
+ * LASSO_PROFILE_ERROR_INVALID_ASSERTION:
+ *
+ * The assertion is malformed, Issuer differs from NameQualifier of the subject, signature cannot be
+ * verified.
+ */
+#define LASSO_PROFILE_ERROR_INVALID_ASSERTION 447
+/**
+ * LASSO_PROFILE_ERROR_UNKNOWN_ISSUER:
+ *
+ * The issuer of an assertion is unkown to us.
+ */
+#define LASSO_PROFILE_ERROR_UNKNOWN_ISSUER 448
+/**
+ * LASSO_PROFILE_ERROR_ISSUER_IS_NOT_AN_IDP
+ *
+ * The issuer of an assertion is not considered as an IdP
+ */
+#define LASSO_PROFILE_ERROR_ISSUER_IS_NOT_AN_IDP 449
/* functions/methods parameters checking */
@@ -819,6 +844,13 @@
* possible to use lasso_idwsf2_profile_redirect_user_for_interaction().
*/
#define LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER 1116
+/**
+ * LASSO_WSF_PROFILE_ERROR_MISSING_SENDER_ID:
+ *
+ * The received ID-WSF request miss a Sender id.
+ */
+#define LASSO_WSF_PROFILE_ERROR_MISSING_SENDER_ID 1117
+
/* ID-WSF 2 Discovery */
/**