summaryrefslogtreecommitdiffstats
path: root/lasso
Commit message (Collapse)AuthorAgeFilesLines
...
* XML: add API to simplify evaluation of XPath expressionsBenjamin Dauvergne2009-08-262-0/+42
| | | | | | | | | | | | | * lasso/xml/tools.c,lasso/xml/private.h: - lasso_eval_xpath_expression(xmlXPathContextPtr xpathCtx, const char *expression, xmlXPathObjectPtr *xpathObjectPtr, int *xpathErrorCode) is a boolean returning function handling call to libxml API to evaluate en XPath expression in the xpathCtx context. It eventually save the returned nodeset in the variable pointed by xpathObjectPtr if it is not-NULL (and eventually deallocate previous value) and if an error happend it copy its code into the variable pointed to by xpathErrorCode if it is not NULL.
* Only recurse into id-wsf if it is enabledBenjamin Dauvergne2009-07-061-1/+4
| | | | | * lasso/Makefile.am: only add id-wsf and id-wsf-2.0 to SUBDIRS if wsf is enabled.
* Fix: backward_comp.h is missing from tarballs.Benjamin Dauvergne2009-07-061-1/+1
| | | | | * lasso/Makefile.am: add backward_comp.h to EXTRA_DIST
* Do not remove signatures on assertion when using HTTP RedirectBenjamin Dauvergne2009-06-151-2/+1
| | | | | | | * lasso/saml-2.0/profile.c: HTTP Redirect binding mandate to remove signature at the SAML message level, but signatures at the assertion, especially if the SP asked for it, must be preserved.
* Fix bug in lasso_registry_destroy / shutdownBenjamin Dauvergne2009-05-071-1/+4
| | | | | * lasso/registry.c: if not initialized, do not free. do not segfault on NULL argument.
* Do not respect default semantic of dst:QueryBenjamin Dauvergne2009-05-073-41/+87
| | | | | | | | | | | | | | * lasso/id-wsf-2.0/data_service.c: the specification for data service template indicat that the query must fail at the first failing query, we think this is a stupid behaviour so I set the default to keep running query until the last one and returning a partial result if at least one failed and a failed result if absolutely no query matched. * lasso/id-wsf-2.0/private.h: declare the lasso_flag_follow_id_wsf_supid_semantic flag. * lasso.c: declare the lasso_flag_follow_id_wsf_supid_semantic flag, it's conditionned by the LASSO_WSF_ENABLED preprocessor symbol.
* Fix leak of mapping registryBenjamin Dauvergne2009-04-303-5/+38
| | | | | | | * lasso/lasso.c: * lasso/registry-private.h: * lasso/registry.c: make the registry be freed in lasso_shutdown.
* ID-FF 1.2: Fix leaks, reduce codeBenjamin Dauvergne2009-04-305-229/+173
| | | | | | | | | | * id-ff/login.c: * id-ff/logout.c: * id-ff/profile.c: * id-ff/provider.c: * id-ff/server.c: fix leaks by using field setting macros which frees previous values, it also reduce code length sometimes.
* Export the new flagBenjamin Dauvergne2009-04-301-0/+1
| | | | | * lasso/debug.h: export new flag lasso_flag_sign_messages.
* SAML 2.0: Fix many leaksBenjamin Dauvergne2009-04-305-224/+194
| | | | | | | | | | | * lasso/saml-2.0/login.c: * lasso/saml-2.0/logout.c: * lasso/saml-2.0/name_id_management.c: * lasso/saml-2.0/profile.c: * lasso/saml-2.0/provider.c: do not mix g_malloc strings with libxml strings, use the string/gobject handling macros as much as possible, be a good memory citizen, don't put your elbows on the table.
* LassoNode: Fix leaksBenjamin Dauvergne2009-04-301-11/+22
| | | | | * lasso/xml/xml.c: fix more and more leaks.
* Add debugging code to lasso_node_impl_init_from_xmlBenjamin Dauvergne2009-04-301-0/+13
| | | | | * lasso/xml/xml.c: add more debugging code for the memory-debug flag.
* Add debugging code to lasso_set_orginal_xmlnodeBenjamin Dauvergne2009-04-301-2/+27
| | | | | | * lasso/xml/xml.c: add code to trace allocation and deallocation of original xmlnode associated to LassoNodes.
* Remove useless codeBenjamin Dauvergne2009-04-303-12/+2
| | | | | | | * lasso/xml/lib_authentication_statement.c: * lasso/xml/saml-2.0/samlp2_name_id_policy.c: * lasso/xml/saml_name_identifier.c: remove useless initialization code.
* Fix leak in lasso_url_add_parametersBenjamin Dauvergne2009-04-301-0/+3
| | | | | * lasso/xml/tools.c: in lasso_url_add_parameters free intermediate strings.
* Fix debug echo on stdoutBenjamin Dauvergne2009-04-301-1/+1
| | | | | * lasso/utils.h: make lasso_mem_debug output on stderr and not stdout
* More work on signature validation for SAML 2.0Benjamin Dauvergne2009-04-274-7/+56
| | | | | | | | | | | | | | | | | * lasso/saml-2.0/profile.c: in lasso_saml20_profile_process_any_request and lasso_saml20_profile_process_any_response do not make signature validation failure as call failure, just store the result in profile->signature_status and let the upper level functions handle what to do with it. also add documentation about those two functions. * lasso/saml-2.0/logout.c: * lasso/saml-2.0/name_id_management.c: handle new signature_status semantic. * lasso/saml-2.0/login.c: add internal documentation for lasso_saml20_login_process_authn_response_msg.
* Update signature_status when checking signature on assertionsBenjamin Dauvergne2009-04-271-1/+1
| | | | | | * lasso/saml-2.0/login.c: if signature_status is SIGNATURE_NOT_FOUND, check one on the assertion and keep the result in signature_status.
* review laterBenjamin Dauvergne2009-04-271-0/+6
|
* FIX: verify assertion signature for SAML 2.0 when response is not signedBenjamin Dauvergne2009-04-271-1/+5
| | | | | * lasso/saml-2.0/login.c: if response was not signed, check the signature on the assertion.
* new function lasso_saml20_login_check_assertion_signature()Benjamin Dauvergne2009-04-271-0/+63
| | | | | | | * lasso/saml-2.0/login.c: lasso_saml20_login_check_assertion_signature() find the issuer of an assertion, look it up in the server object and try to validate its signature. It returns an error code if any of this step fails.
* Add keep_xmlnode flag to SAML 2.0 req, resp and assertionsBenjamin Dauvergne2009-04-274-0/+4
| | | | | | | | * lasso/xml/saml-2.0/saml2_assertion.c: * lasso/xml/saml-2.0/samlp2_request_abstract.c: * lasso/xml/saml-2.0/samlp2_response.c: * lasso/xml/saml-2.0/samlp2_status_response.c: set keep_xmlnode flag to 1 in class_init.
* new function lasso_profile_get_server()Benjamin Dauvergne2009-04-272-0/+27
| | | | | | | | | | * lasso/id-ff/profile.c: * lasso/id-ff/profile.h: in a move to try to remove direct access to object content, add a function to retrieve the LassoServer object of a LassoProfile. * bindings/overrides.xml: it conflicts with direct access to the public field server, so we do not export it in the binding for now.
* fix: in lasso_verify_signature() only look for the first direct child ↵Benjamin Dauvergne2009-04-271-2/+2
| | | | | | | | Signature element * lasso/xml/tools.c: in SAML message signatures are usually envelopped signatures, so just lookup for the first direct child which is a Signature node.
* fix: handle non-LHS argument for lasso_extract_node_or_fail()Benjamin Dauvergne2009-04-271-5/+8
| | | | | | * lasso/utils.h: create a temporary varaible to store result of second argument evaluation to prevent spurious side effects.
* lasso_saml20_profile_init_artifact_resolve(): check http_methodBenjamin Dauvergne2009-04-271-1/+3
| | | | | | | * lasso/saml-2.0/profile.c: check the given http_method it must one in - LASSO_HTTP_METHOD_ARTIFACT_POST, - LASSO_HTTP_METHOD_ARTIFACT_GET.
* lasso_login_init_request(): change error code for invalid artifactsBenjamin Dauvergne2009-04-271-2/+2
| | | | | | * lasso/id-ff/login.c: if artifact is invalid return LASSO_PROFILE_ERROR_INVALID_ARTIFACT as in lasso_saml20_profile_init_artifact_resolve().
* Complete documentation of lasso_login_init_requestBenjamin Dauvergne2009-04-271-2/+18
| | | | | * lasso/id-ff/login.c: add precision on usage. add all possible return codes with meanings.
* lasso_login_init_authn_request: complete docBenjamin Dauvergne2009-04-271-1/+10
| | | | | * lasso/id-ff/login.c: add all possible return codes and their meaning.
* lasso_login_init_authn_request: change error code for missing remote provider IDBenjamin Dauvergne2009-04-271-1/+1
| | | | | | | | * lasso/id-ff/login.c: change the return code for when no remote provider ID could be defined (because the argument is NULL and the server object contains no providers) so that we can distingish the case where the given provider is unknown or if there is no providers configured.
* Add a deprecated tag to lasso_login_destroy docBenjamin Dauvergne2009-04-271-0/+2
| | | | | | * lasso/id-ff/login.c: all destroy functions are deprecated, g_object_unref() should be used instead.
* Complete documentation of lasso_login_byuld_response_msgBenjamin Dauvergne2009-04-271-0/+5
| | | | | * lasso/id-ff/login.c: add all possible return codes with meaning.
* Complete documentation of lasso_login_build_request_msgBenjamin Dauvergne2009-04-271-3/+11
| | | | | * lasso/id-ff/login.c: add all possible return codes with meaning.
* Complet documentation for lasso_login_build_authn_response_msgBenjamin Dauvergne2009-04-271-1/+9
| | | | | * lasso/id-ff/login.c: add all possible return codes with meaning.
* Complete documentation of lasso_login_build_authn_requestBenjamin Dauvergne2009-04-271-6/+18
| | | | | * lasso/id-ff/login.c: add all possible return codes with meaning.
* Complete documentation for lasso_login_build_artifact_msgBenjamin Dauvergne2009-04-271-1/+11
| | | | | * lasso/id-ff/login.c: add all possible return codes with meaning.
* Complet documentation of lasso_login_accept_ssoBenjamin Dauvergne2009-04-271-1/+9
| | | | | * lasso/id-ff/login.c: add all possible return codes.
* Complete doc for static function lasso_login_musk_ask_for_consentBenjamin Dauvergne2009-04-271-1/+1
| | | | | * lasso/id-ff/login.c: precise return value meaning.
* Complete document of lasso_login_build_assertionBenjamin Dauvergne2009-04-271-1/+5
| | | | | * lasso/id-ff/login.c: add possible return codes.
* Complete doc of lasso_logout_validate_requestBenjamin Dauvergne2009-04-271-1/+15
| | | | | * lasso/id-ff/logout.c: add description of all possible return codes.
* Rework cleanup handlingBenjamin Dauvergne2009-04-2210-116/+162
| | | | | | | | | | | | | | | | | | | | | | * lasso/utils.h: change 'goto exit' for 'goto cleanup'. rename all goto_exit macros to goto_cleanup_. rename goto_cleanup_if_fail to goto_cleanup_if_fail_with_rc and add a goto_cleanup_if_fail for function which do not return an integer value. add documentation for goto_cleanup macro family. * lasso/id-ff/login.c: * lasso/id-ff/provider.c: * lasso/id-ff/server.c: * lasso/id-ff/session.c: * lasso/id-wsf/discovery.c: * lasso/id-wsf/wsf_profile.c: * lasso/saml-2.0/profile.c: * lasso/utils.h: * lasso/xml/lib_logout_request.c: * lasso/xml/tools.c: * lasso/xml/xml.c: update name of goto_exit_if_fail macros. rename 'exit' labels to 'cleanup'.
* XML: Fix prefix clobbering by xsi:type handlingBenjamin Dauvergne2009-04-221-4/+7
| | | | | | | * lasso/xml/xml.c: if xsi:type is not able to find a GObject typename for the current node, then do not erase the actual prefix value. change prefix type to const char.
* SAML 2.0: Use new API lasso_url_add_parameterBenjamin Dauvergne2009-04-222-20/+17
| | | | | | * lasso/saml-2.0/profile.c: use new API lasso_url_add_parameter to handle RelayState parameter creation.
* SAML 2.0: Check http_method in build_artifact_msgBenjamin Dauvergne2009-04-221-0/+4
| | | | | | * lasso/saml-2.0/login.c: if http_method is not among ARTIFACT_GET and ARTIFACT_POST, return an INVALID_HTTP_METHOD error.
* Add a new internal API for parameters buildingBenjamin Dauvergne2009-04-222-0/+65
| | | | | | | | * xml/tools.c: add lasso_url_add_parameter that concat the string &key=value to an existing URL where key and value are url-encoded. * xml/private.h: declare lasso_url_add_parameter.
* If no typename could be determined, stop parsing.Benjamin Dauvergne2009-04-211-2/+3
| | | | | | * lasso/xml/xml.c: in lasso_node_new_from_xmlNode if no typename is found for the given xmlNode, return NULL.
* Core: Add cast to first argument of isalnumBenjamin Dauvergne2009-04-142-2/+2
| | | | | | * lasso/xml/xml.c: * lasso/xml/tools.c: isalnum takes a int as first arg.
* Core: add an header file for backward compatibilityBenjamin Dauvergne2009-04-143-22/+49
| | | | | | | | | | | * lasso/backward_comp.h: this header will contain substitue function, defines or types for compatibility with older versions of dependencies. * lasso/utils.h: remove declaration of g_strcmp0 * lasso.c: * tests/login_tests.c: use backward_comp.h
* Fix build issues on amd64 / gcc 4.3Jerome Schneider2009-04-091-2/+2
| | | | | | | | | * bindings/java/lang.py: fix cast issue * bindings/python/wrapper_top.c fix type issue * lasso/registry.c fix cast issue
* Tests&Core: add g_strcmp0 if glib is oldBenjamin Dauvergne2009-04-021-0/+7
| | | | | | | | * lasso/utils.h: if glib is older than 2.16, export g_strcmp0 as part of internal headers, in order to use it in login_tests.c * tests/login_tests.c: include utils.h