diff options
| author | Nicolas Clapies <nclapies@entrouvert.com> | 2004-07-21 14:12:24 +0000 |
|---|---|---|
| committer | Nicolas Clapies <nclapies@entrouvert.com> | 2004-07-21 14:12:24 +0000 |
| commit | 08254badc10dc83c4bb941e498aba0737deff485 (patch) | |
| tree | be02679af76f41f5886180b10fcec0cfbc9264db | |
| parent | 46738d03eacf3b0368e50674194f6f05cae2cddf (diff) | |
| download | lasso-08254badc10dc83c4bb941e498aba0737deff485.tar.gz lasso-08254badc10dc83c4bb941e498aba0737deff485.tar.xz lasso-08254badc10dc83c4bb941e498aba0737deff485.zip | |
*** empty log message ***
| -rw-r--r-- | lasso/id-ff/logout.c | 16 | ||||
| -rw-r--r-- | python/examples/logout-from-idp.py | 2 | ||||
| -rw-r--r-- | python/protocols/py_logout_request.c | 10 |
3 files changed, 16 insertions, 12 deletions
diff --git a/lasso/id-ff/logout.c b/lasso/id-ff/logout.c index 654165a7..de8f4b3f 100644 --- a/lasso/id-ff/logout.c +++ b/lasso/id-ff/logout.c @@ -250,6 +250,10 @@ lasso_logout_process_request_msg(LassoLogout *logout, debug(ERROR, "Unknown request method\n"); return(-3); } + if(profileContext->request==NULL){ + debug(ERROR, "Error while building the request from msg\n"); + return(-4); + } /* set the remote provider id from the request */ remote_providerID = lasso_node_get_child_content(profileContext->request, "ProviderID", NULL); @@ -262,7 +266,7 @@ lasso_logout_process_request_msg(LassoLogout *logout, if(profileContext->response==NULL){ debug(ERROR, "Error while building response\n"); - return(-4); + return(-5); } statusCode = lasso_node_get_child(profileContext->response, "StatusCode", NULL); @@ -272,13 +276,13 @@ lasso_logout_process_request_msg(LassoLogout *logout, if(nameIdentifier==NULL){ debug(ERROR, "Name identifier not found in logout request\n"); statusCode_class->set_prop(statusCode, "Value", lassoLibStatusCodeFederationDoesNotExist); - return(-5); + return(-6); } remote_providerID = lasso_node_get_child_content(profileContext->request, "ProviderID", NULL); if(remote_providerID==NULL){ debug(ERROR, "Provider id not found in logout request\n"); - return(-6); + return(-7); } /* verify authentication (if ok, delete assertion) */ @@ -291,7 +295,7 @@ lasso_logout_process_request_msg(LassoLogout *logout, if(assertion==NULL){ debug(WARNING, "%s has no assertion\n", remote_providerID); statusCode_class->set_prop(statusCode, "Value", lassoSamlStatusCodeRequestDenied); - return(-9); + return(-8); } /* Verify federation */ @@ -299,13 +303,13 @@ lasso_logout_process_request_msg(LassoLogout *logout, if(identity==NULL){ debug(WARNING, "No identity for %s\n", remote_providerID); statusCode_class->set_prop(statusCode, "Value", lassoLibStatusCodeFederationDoesNotExist); - return(-7); + return(-9); } if(lasso_identity_verify_nameIdentifier(identity, nameIdentifier)==FALSE){ debug(WARNING, "No name identifier for %s\n", remote_providerID); statusCode_class->set_prop(statusCode, "Value", lassoLibStatusCodeFederationDoesNotExist); - return(-8); + return(-10); } return(0); diff --git a/python/examples/logout-from-idp.py b/python/examples/logout-from-idp.py index 38266d44..398b9695 100644 --- a/python/examples/logout-from-idp.py +++ b/python/examples/logout-from-idp.py @@ -17,7 +17,7 @@ server.add_provider("../../examples/sp3.xml", None, None) # user : -sp1_identity = """<LassoIdentity RemoteProviderID="https://service-provider1:2003/liberty-alliance/metadata"><LassoRemoteNameIdentifier><NameIdentifier NameQualifier="https://identity-provider:2003/liberty-alliance/metadata" Format="federated">111111111111111111111111</NameIdentifier></LassoRemoteNameIdentifier></LassoIdentity>""" +sp1_identity = """<LassoIdentity RemoteProviderID="https://service-provider1:2003/liberty-alliance/metadata"><LassoRemoteNameIdentifier><NameIdentifier NameQualifier="https://identity-provider:2003/liberty-alliance/metadata" Format="federated">111111111111111111111111</NameIdentifier></LassoRemoteNameIdentifier><LassoLocalNameIdentifier><NameIdentifier NameQualifier="https://identity-provider:2003/liberty-alliance/metadata" Format="federated">222222222222222222222222</NameIdentifier></LassoLocalNameIdentifier></LassoIdentity>""" sp1_assertion = """<LassoAssertion RemoteProviderID="https://service-provider1:2003/liberty-alliance/metadata"><Assertion AssertionID="1234567890"></Assertion></LassoAssertion>""" sp2_identity = """<LassoIdentity RemoteProviderID="https://service-provider2:2003/liberty-alliance/metadata"><LassoRemoteNameIdentifier><NameIdentifier NameQualifier="https://identity-provider:2003/liberty-alliance/metadata" Format="federated">222222222222222222222</NameIdentifier></LassoRemoteNameIdentifier></LassoIdentity>""" diff --git a/python/protocols/py_logout_request.c b/python/protocols/py_logout_request.c index ee4a75bf..803a3346 100644 --- a/python/protocols/py_logout_request.c +++ b/python/protocols/py_logout_request.c @@ -63,18 +63,18 @@ PyObject *logout_request_new(PyObject *self, PyObject *args) { } PyObject *logout_request_new_from_export(PyObject *self, PyObject *args) { - gchar *buffer; - lassoNodeExportTypes export_type; - LassoNode *request; + gchar *buffer; + gint type; + LassoNode *request; if (CheckArgs(args, "SS:logout_request_new_from_export")) { if(!PyArg_ParseTuple(args, (char *) "ss:logout_request_new_from_export", - &buffer, &export_type)) + &buffer, &type)) return NULL; } else return NULL; - request = lasso_logout_request_new_from_export(buffer, export_type); + request = lasso_logout_request_new_from_export(buffer, type); return (LassoLogoutRequest_wrap(LASSO_LOGOUT_REQUEST(request))); } |
