summaryrefslogtreecommitdiffstats
path: root/lasso
Commit message (Collapse)AuthorAgeFilesLines
...
* Makefile: change dependencies to pass distcheckBenjamin Dauvergne2009-03-271-2/+2
| | | | | | | * lasso/Makefile.am: source dependencies must refer to $(srcdir) in order to pass distcheck, I forgot to do it in types.c and symbols.sym target changes.
* ID-FF 1.2: if logout request parsing fails, take a shortcutBenjamin Dauvergne2009-03-271-1/+3
| | | | | | * lasso/xml/lib_logout_request.c: immediately return from init_from_query if overloaded parent method fails.
* SAML 2.0: Update generic relaystate handlingBenjamin Dauvergne2009-03-271-27/+10
| | | | | | | * lasso/saml-2.0/profile.c: in lasso_saml20_profile_build_redirect_request_msg and lasso_saml20_profile_build_redirect_response, use new function lasso_saml20_profile_build_http_redirect.
* Core: add a add-signature flagBenjamin Dauvergne2009-03-272-0/+7
| | | | | | | | * lasso/debug.h: * lasso/lasso.c: add a lasso_flag_add_signature flag variable (default to TRUE), and parsing code to change it from LASSO_FLAG environment variable. ("env LASSO_FLAG=no-add-signature test").
* ID-FF 1.2: Only verify InResponseTo if strict checking is onBenjamin Dauvergne2009-03-271-0/+21
| | | | | | | * lasso/id-ff/login.c: add condition upon checking of the InResponseTo field: checks only if strict checking is activated as it could stop old code using Lasso from working.
* Core: Add a flag for enabling more strict checkingBenjamin Dauvergne2009-03-272-0/+7
| | | | | | | | * lasso/debug.h: declare lasso_flag_strict_checking global boolean variable. * lasso/lasso.c: add parsing for new option called 'strict-checking'.
* XML: use macro for assignmentBenjamin Dauvergne2009-03-271-1/+1
| | | | | | * lasso/xml/xml.c: use standardized assignment macros (it takes care of releasing previous valuesm and other peculiarities associated with safe pointer usage).
* ID-FF 1.2: Add trace in dispose for LassoProfileBenjamin Dauvergne2009-03-271-0/+5
| | | | | | | * lasso/id-ff/profile.c: add tracing code activaged by LASSO_FLAG=memory-debug to print release of field values. Complement the existing code in generic deallocation procedure in LassoNode.
* Core: debug.h need export.hBenjamin Dauvergne2009-03-271-0/+1
| | | | | * lasso/debug.h: export.h is needed for the LASSO_EXPORT macro.
* Core: Macros to print deallocation messagesBenjamin Dauvergne2009-03-271-0/+7
| | | | | | * lasso/utils.h: lasso_mem_debug print deallocation message with respect to class and field.
* Core: remove type check equality on gobject macrosBenjamin Dauvergne2009-03-271-2/+0
| | | | | | * lasso/utils.h: assignment to the temporary variable allow to check for the typing, do not use lasso_check_type_equality.
* Core: add macros to handle xmlSecKeyBenjamin Dauvergne2009-03-271-0/+20
| | | | | * lasso/utils.h: macros to assign and release xmlSecKey(s).
* XML: fix memory leaksBenjamin Dauvergne2009-03-272-8/+7
| | | | | | * lasso/xml/tools.c: * lasso/xml/xml.c: release xmlDoc, properly steal nodes by using xmlSetTreeDoc(xmlnode, NULL);
* ID-FF 1.2: fix style faultBenjamin Dauvergne2009-03-274-20/+21
| | | | | | | | | | | | * lasso/id-ff/defederation.c: * lasso/id-ff/logout.c: * lasso/id-ff/profile.c: * lasso/id-ff/provider.c: * lasso/id-ff/server.c: add missings casts, remove useless wrappers * lasso/id-ff/logout.c: In lasso_logout_process_request_msg change sequence of "if" for a "switch".
* ID-FF 1.2: fix some real and potential memory leaksBenjamin Dauvergne2009-03-273-10/+16
| | | | | | | | | | | * lasso/id-ff/provider.c: * lasso/id-ff/server.c: * lasso/id-ff/session.c: use macros to release previous value when necessary, release object used as parameters to constructors, free the encryption key associated with a provider, release the key manager created for a saml signature verification.
* ID-FF 1.2: Add handling of relaystate for logout requestsBenjamin Dauvergne2009-03-272-12/+16
| | | | | | * lasso/id-ff/logout.c (lasso_logout_process_request_msg, lasso_logout_validate_request): transfer relaystate from request message to profile field.
* ID-FF 1.2: Use new macros in logout, defederation and lecpBenjamin Dauvergne2009-03-273-129/+115
| | | | | | | | | | | | | | | | | | | | | | * lasso/id-ff/logout.c: - (lasso_logout_build_response_msg, lasso_logout_init_request, lasso_logout_process_request_msg, lasso_logout_process_response_msg, lasso_logout_validate_request) use lasso_assign_new_object, lasso_assign_string, lasso_release and lasso_assign_new_string when possible. - (lasso_logout_process_response_msg) move the tranfer of the relaystate from XML object to profile object. * lasso/id-ff/defederation.c: - (lasso_defederation_build_notification_msg, lasso_defederation_init_notification, lasso_defederation_process_notification_msg, lasso_defederation_validate_notification): idem * lasso/id-ff/lecp.c: - (lasso_lecp_build_authn_request_envelope_msg, lasso_lecp_build_authn_request_msg,lasso_lecp_build_authn_response_msg, lasso_lecp_build_authn_response_envelope_msg) idem
* ID-FF 1.2 Login: Use allocation macrosBenjamin Dauvergne2009-03-271-2/+3
| | | | | | * lasso/id-ff/login.c: (lasso_login_init_authn_request) again a passing by correction, use lasso_assign_string for copying information from the request to the profile object.
* ID-FF 1.2: Handle RelayState inside LassoLoginBenjamin Dauvergne2009-03-271-5/+8
| | | | | | | | * lasso/id-ff/login.c: - (lasso_login_init_request) catch RelayState in the query_fields and copy it to msg_relayState - (lasso_login_process_authn_request_msg) copy RelayState from the request object to the profile object.
* XML ID-FF 1.2 & SAML 2.0: Handle signature failureBenjamin Dauvergne2009-03-276-32/+79
| | | | | | | | | | | * lasso/xml/saml_assertion.c: * lasso/xml/samlp_response_abstract.c: * lasso/xml/samlp_request_abstract.c: * lasso/xml/saml-2.0/samlp2_request_abstract.c: * lasso/xml/saml-2.0/saml2_assertion.c: * lasso/xml/saml-2.0/samlp2_status_response.c: if a failure occur in the signing process, free the xmlnode, return NULL and print a warning.
* XML SAML 2.0: Delete parent_class static variableBenjamin Dauvergne2009-03-275-10/+0
| | | | | | | | | | * lasso/xml/saml-2.0/samlp2_manage_name_id_request.c, lasso/xml/saml-2.0/samlp2_manage_name_id_response.c, lasso/xml/saml-2.0/samlp2_name_id_mapping_request.c, lasso/xml/saml-2.0/samlp2_name_id_mapping_response.c. lasso/xml/saml-2.0/samlp2_subject_query_abstract.c: - remove static variable parent_class - (class_init) remove intialization of parent_class
* XML SAML 2.0: Mark RelayState field from SAML 2.0 deprecatedBenjamin Dauvergne2009-03-276-34/+11
| | | | | | | | | | | | | | | | | * lasso/xml/saml-2.0/samlp2_authn_request.c, lasso/xml/saml-2.0/samlp2_logout_request.c, - (instance_init) remove initialization of relayState field * lasso/xml/saml-2.0/samlp2_logout_response.c: - (instance_init) remove empty function, since it only initialized relayState. - (lasso_samlp2_logout_reponse_get_type) remove instance_init from the type initialization structure. * lasso/xml/saml-2.0/samlp2_authn_request.h, lasso/xml/saml-2.0/samlp2_logout_request.h, lasso/xml/saml-2.0/samlp2_logout_response.h: - (struct _LassoSamlp2*) mark relaystate field as deprecated.
* XML SAML 2.0: Clean query string parsing/buildingBenjamin Dauvergne2009-03-2712-155/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lasso/xml/saml-2.0/samlp2_status_response.c: - (init_from_query) remove useless stub code for parsing RelayState * lasso/xml/saml-2.0/samlp2_response.c, lasso/xml/saml-2.0/samlp2_name_id_mapping_response.c, lasso/xml/saml-2.0/samlp2_logout_response.c, lasso/xml/saml-2.0/samlp2_manage_name_id_response.c, : - (class_init) remove overloading of init_from_query, use version from samlp2_status_response instead. - (init_from_query) Useless so deleted. * lasso/xml/saml-2.0/samlp2_request_abstract.c: - (class_init) add overloaded method for init_from_query virtual method. - (init_from_query) generic implementation for SAML 2.0 requests * lasso/xml/saml-2.0/samlp2_subject_query_abstract.c, lasso/xml/saml-2.0/samlp2_authn_request.c, lasso/xml/saml-2.0/samlp2_logout_request.c, lasso/xml/saml-2.0/samlp2_manage_name_id_request.c, lasso/xml/saml-2.0/samlp2_name_id_mapping_request.c, lasso/xml/saml-2.0/samlp2_assertion_id_request.c: - (class_init) remove overloading of init_from_query, use version from samlp2_request_abstract instead. - (init_from_query) Useless so deleted.
* XML: Remove useless parsing of RelayState in ↵Benjamin Dauvergne2009-03-271-5/+1
| | | | | | | | lasso_node_init_from_saml2_query_fields * lasso/xml/xml.c: (lasso_node_init_from_saml2_query_fields) Since parsing of the relayState is now done inside each "_process_*msg" method of each SAML2 profile, it is not needed anymore in this function.
* XML: Use memory macros inside lasso_node_export_to_queryBenjamin Dauvergne2009-03-271-3/+3
| | | | | * lasso/xml/xml.c (lasso_node_export_to_query): use lasso own memory handling macros.
* ID-FF 1.2: review HTTP-Redirect binding parsing/buildingBenjamin Dauvergne2009-03-276-70/+36
| | | | | | | | | | | | | | | | * lasso/xml/lib_authn_request.c, lasso/xml/lib_logout_request.c, lasso/xml/lib_register_name_identifier_request.c, lasso/xml/lib_status_resposne.c: - build_query: remove build_query overloaded virtual method, use LassoNode new generic implementation. - init_from_query: - change direct call to lasso_node_init_from_query_fields to use of base implementation from LassoNode. - make use of utils.h memory handling macros like lasso_release_gobject and lasso_assign_string. * lasso/xml/lib_federation_termination_notification.c: - init_from_query: remove parsing of RelayState parameter
* ID-FF 1.2: Defederation, changes includes for relative pathsBenjamin Dauvergne2009-03-271-0/+2
| | | | | * lasso/id-ff/defederation.c: header path should be relative to the implementation, I will try to do it to most files.
* ID-FF 1.2: Defederatopm HTTP-Redirect binding, handle relaystateBenjamin Dauvergne2009-03-271-0/+5
| | | | | * lasso/id-ff/defederation.c: get relaystate directly from the query string using lasso_get_relaystate_from_query.
* SAML 2.0: In login change includes for relative pathsBenjamin Dauvergne2009-03-271-8/+7
| | | | * lasso/id-ff/login.c: changes headers for relatives paths
* Core: Remove ending blanks from erros.c.inBenjamin Dauvergne2009-03-272-8/+8
| | | | * lasso/errors.c.in: errors.c template contains blanks at end of lines.
* SAML 2.0: add direct treatment of relaystate for HTTP-Redirect bindingBenjamin Dauvergne2009-03-272-3/+5
| | | | | | | | | | | | | | | | | | * lasso/saml-2.0/login.c: In lasso_saml20_login_process_authn_request_msg change handling of relayState do not rely upon parsing by the node object, but extract directly from the query string. Use new function lasso_get_relaystate_from_query. * lasso/saml-2.0/logout.c: In lasso_saml20_logout_process_request_msg change handling of relayState do not rely upon parsing by the node object, but extract directly from the query string. * lasso/saml-2.0/profile.c: In lasso_saml20_profile_init_artifact_resolve, add handling of the relayState transmitted to the assertion consumer URL. * lasso/saml-2.0/name_id_management.c: In lasso_name_id_management_process_request_msg change handling of relayState do not rely upon parsing by the node object, but extract directly from the query string.
* SAML 2.0: simplify redirect binding code pathBenjamin Dauvergne2009-03-272-102/+14
| | | | | | | | * lasso/saml-2.0/login.c, lasso/saml-2.0/logout.c, lasso/saml-2.0/name_id_management.c: simplify code path associated with generation of the url for the HTTP-Redirect binding using the rencently introduced function lasso_saml20_profile_build_http_redirect.
* SAML 2.0: remove TODO comment about RelayStateBenjamin Dauvergne2009-03-271-1/+0
| | | | * lasso/xml/saml-2.0/samlp2_status_response.c: do it:)
* XML SAML2: Remove unnecessary overloading of build_query in request/respons ↵Benjamin Dauvergne2009-03-2710-191/+0
| | | | | | | | | | | | | | | | | objects * lasso/xml/saml-2.0/samlp2_assertion_id_request.c, lasso/xml/saml-2.0/samlp2_authn_request.c, lasso/xml/saml-2.0/samlp2_logout_request.c, lasso/xml/saml-2.0/samlp2_logout_response.c, lasso/xml/saml-2.0/samlp2_manage_name_id_request.c, lasso/xml/saml-2.0/samlp2_manage_name_id_response.c, lasso/xml/saml-2.0/samlp2_name_id_mapping_request.c, lasso/xml/saml-2.0/samlp2_name_id_mapping_response.c, lasso/xml/saml-2.0/samlp2_response.c, lasso/xml/saml-2.0/samlp2_subject_query_abstract.c: remove useless overloading of build_query virtual method, revert to implementations in LassoSamlp2RequestAbstract and LassoSamlp2StatusResponse.
* XML SAML 2.0: add a build query to request base classBenjamin Dauvergne2009-03-271-0/+13
| | | | | | * lasso/xml/saml-2.0/samlp2_request_abstract.c: add a build query overloaded function to LassoSamlp2RequestAbstract class, the base class of all saml 2.0 request nodes.
* SAML 2.0: Add helper function to implement the HTTP-Redirect bindingBenjamin Dauvergne2009-03-272-1/+153
| | | | | | | | | | | | * lasso/saml-2.0/profile.c, lasso/saml-2.0/profileprivate.h: - remove_all_signature traverse a tree of LassoNode objects to unset all signature_type field in on nodes supporting signature generation. - lasso_saml20_profile_export_to_query does the job of generateing the url containing the message content and the relaystate, then sign it using lasso_query_sign. - lasso_saml20_profile_build_http_redirect use those two functions and the metadatas to build the signed redirect url.
* XML: Add const modifiers to lasso_concat_url_query argumentsBenjamin Dauvergne2009-03-272-2/+2
| | | | | * lasso/xml/private.h, lasso/xml/tools.c: add const modifier to lasso_concat_url_query arguments.
* XML: Remove static modifier on lasso_node_build_queryBenjamin Dauvergne2009-03-272-7/+13
| | | | | * lasso/xml/private.h, lasso/xml/xml.c: remove static modifier to lasso_node_build_query and export it for use in id-ff profiles.
* XML: Tool function to extract relaystate from queryBenjamin Dauvergne2009-03-272-0/+32
| | | | | * lasso/xml/tools.c, lasso/xml/private.h: new function lasso_get_relaystate_from_query to help in relaystate handling.
* Core: rename lasso_release_xmlchar to lasso_release_xml_stringBenjamin Dauvergne2009-03-273-7/+7
| | | | | * lasso/id-wsf/wsf_profile.c, lasso/utils.h, lasso/xml/xml.c: rename lasso_release_xmlchar to lasso_release_xml_string.
* Core: Fix double instantiation of macro parametersBenjamin Dauvergne2009-03-271-11/+14
| | | | | | | | * lasso/utils.h: - (lasso_assign_new_string,lasso_assign_gobject) if source parameter is a function call it could be called two times and have unexpected side effects. Copy the returned value to a temp variable and use it instead.
* Core: Fix corner case in deallocation macrosBenjamin Dauvergne2009-03-271-2/+3
| | | | | | * lasso/utils.h: When setting strings using lasso_assing_string or lasso_assign_new_string, verify that new string is different than the target value string before deallocating the target.
* Add missing intializationsBenjamin Dauvergne2009-03-271-2/+2
| | | | * initialize local variables.
* Core: replace direct use of xmlSecSoap function by wrapperBenjamin Dauvergne2009-03-271-16/+4
| | | | | | | * lasso/xml/xml.c: In lasso_node_init_from_message_with_format remove direct use of xmlSecSoap* functions because they emit too much warning by lasso reimplementations.
* Core: remove use of XPathBenjamin Dauvergne2009-03-271-15/+7
| | | | | | * lasso/xml/xml.c: in lasso_node_new_from_soap, instead of using XPath use function lasso_xml_get_soap_content.
* Core: fix comment for lasso_node_init_from_messageBenjamin Dauvergne2009-03-271-1/+1
| | | | | * lasso/xml/xml.c: state the return code type.
* Core: remove lasso_node_decrypt implementationBenjamin Dauvergne2009-03-271-148/+0
| | | | | * lasso/xml/xml.c: remove code for lasso_node_decrypt.
* Core: make comment agree with the codeBenjamin Dauvergne2009-03-271-1/+1
| | | | | | * lasso/xml/xml.c: change comment about xsi:type handling, we try to honor every xsi:type.
* Core: remove commented codeBenjamin Dauvergne2009-03-271-4/+0
| | | | | * lasso/xml/xml.c: remove commented code to handle a specific lasso extension.
* Core: use lasso_xml_parse_memory instead of xmlParseDocBenjamin Dauvergne2009-03-273-6/+6
| | | | | * lasso/id-ff/provider.c: use internal wrapper instead of direct call to libxml for parsing.