Commit Graph

73 Commits

Author SHA1 Message Date
Benjamin Dauvergne 7231771856 All: Rework include files handling, separated ID-WSF code from SAML2/ID-FF code
* nearly all C files: change includes for relative paths.
 * lasso/id-wsf/id_wsf.h, lasso/id-wsf-2.0/id_wsf_2.h: add top level
   public include files for ID-WSF 1.0 and ID-WSF 2.0.
 * lasso/id-ff/server.*, lasso/id-ff/session.*, lasso/id-ff/identity.*:
   remove most of the code related to ID-WSF and push into
   lasso/id-wsf/id_ff_extensions.* and lasso/id-wsf-2.0/identity.c,
   lasso/id-wsf-2.0/server.c, lasso/id-wsf-2.0/session.c.
 * lasso/id-wsf-2.0/saml2_login.c,
   lasso/id-wsf-2.0/saml2_login_private.h: same change but for ID-WSF
   2.0 support in SAML2 SSO profile.
2009-08-26 15:14:32 +00:00
Benjamin Dauvergne 55f2051534 ID-WSF: Lots of modifications
Migrate lots of code to use new utility macros. Try to simplify most
 code paths or to factorize with LassoWsfProfile.

 * lasso/id-wsf/wsf_profile.c:
   Add API:
    - lasso_wsf_profile_build_soap_response_msg to build SOAP fault for
      Lasso errors,
    - lasso_wsf_profile_set_msg_url_from_description, to set the
      destination URL using the chosen LassoDiscoDescription (with
      respect to the security mechanism),
    - lasso_wsf_profile_init_soap_response to initialize a response to
      the current request, to use in sub classes,
    - lasso_wsf_profile_get_remote_provider_id, retrieve the SOAP
      binding corresponding information,
    - lasso_wsf_profile_get_remote_provider, simplification of
      lasso_wsf_profile_get_remote_provider_id,
    - lasso_wsf_profile_get_soap_fault, retrieve the last setted SOAP
      fault, used by sub classes,
    - lasso_wsf_profile_set_soap_fault, set a SOAP fault, to be returned
      by the next call by lasso_wsf_profile_build_soap_response_msg, to
      use in sub classes,
    - lasso_wsf_profile_set/get_status_code, set/get the stored status
      code, to use in the next lasso_xxx_build_response_message, to use
      in sub classes.
   Change name lasso_wsf_profile_get_description_autos to
   lasso_wsf_profile_get_description_auto.
   Do not access directly the session is_dirty field (it has been
   sealed).

 * lasso/id-wsf/wsf_profile.h:
   Add helper macro lasso_wsf_profile_helper_set_status to set status
   code of an ID-WSF response message containing a Status element using
   the stored status code.
 * lasso/id-wsf/wsf_profile_private.h:
   Add new fields (moved public fields).
   Add lasso_wsf_profile_set_msg_url_from_description,
   lasso_wsf_profile_build_soap_fault_response_msg.
 * lasso/id-wsf/data_service_private.h:
   Remove file.
 * lasso/id-wsf/data_service.h: Remove all public fields.
 * lasso/id-wsf/data_service.c:
   Remove private structure. Use the equivalents LassoWsfProfile private
   fields. Update documentation. Use LassoWsfProfile generic functions
   for initializing requests. Add API lasso_data_service_get_query_item,
   lasso_data_service_get_answers, lasso_data_service_get_answer,
   lasso_data_service_get_answers_by_select,
   lasso_data_service_get_answer_for_item_id,
   lasso_data_service_add_modification.
   Remove lasso_data_service_need_redirect_user use equivalent function
   lasso_interaction_profile_service_build_redirect_response_msg. Remove
   lasso_data_service_get_resource_offering,
   lasso_data_service_set_offering.
 * lasso/id-wsf/discovery.c:
   Add documentation. Change some signatures. Remove
   lasso_discovery_get_description_auto. Change name of
   lasso_discovery_init_insert to lasso_discovery_init_modify. Add a
   generic lasso_discovery_process_request_msg.
   Add internal function lasso_discovery_init_offering, to get
   automatically an offering if possible. Remove useless init_from_xml.
   Rework lasso_discovery_build_credential implementation.
   overloading. Remove lasso_discovery_destroy.
 * lasso/id-wsf/discovery.h:
   Remove lasso_discovery_destroy.
 * lasso/id-wsf/interaction_profile_service.c:
   Add lasso_interaction_profile_service_build_redirect_response_msg.
 * lasso/id-wsf/personal_profile_service.c:
   Update lasso_personal_profile_service_get_email to use
   lasso_data_service_get_answers_by_select.
 * lasso/xml/dst_modify.c:
   make modification parameter optional to the constructor.
2009-08-26 15:13:46 +00:00
Benjamin Dauvergne dfb0b91ed6 ID-WSF 2.0: make it work with --enabe-debugging
* lasso/id-wsf-2.0/data_service.c:
 * lasso/id-wsf-2.0/discovery.c:
 * lasso/id-wsf-2.0/profile.c:
 * lasso/id-wsf/data_service.c:
 * lasso/id-wsf/discovery.c:
 * lasso/id-wsf/wsf_profile.c:
   when --enable-debugging is activated much more type checking is done
   by internal macros, and code do not pass compile anymore.
 * bindings/python/tests/idwsf2_tests.py: nameIdentifier packing in SOAP
   ID-WSF calls headers is no longer supported, do not test it.
2009-03-27 15:05:04 +00:00
Benjamin Dauvergne b09ef2e015 Core: do not mix public and private headers
* lots of files:
   explicitely load the internal header xml/private.h where needed.
2009-03-27 15:04:26 +00:00
Damien Laniel fad3fa581b added documentation for id-wsf 2.0 functions 2009-01-26 16:10:24 +00:00
Benjamin Dauvergne 33bbf7a7de All: Fix missing field initializer problems
* lots of files: Explicitely set all field of initialized structures,
  in order to remove -Wno-missing-field-initilizers from needed
  compiler options when using -Wall -Wextra.
2009-01-24 09:33:40 +00:00
Benjamin Dauvergne 0d66367f28 Remove use of xmlFreeDoc for lasso_release_doc
- bindings/java/wrapper_top.c, bindings/php4/lasso_php4_helper.c,
    bindings/php5/wrapper_source_top.c, bindings/python/wrapper_top.c,
    lasso/id-ff/identity.c, lasso/id-ff/lecp.c, lasso/id-ff/login.c,
    lasso/id-ff/logout.c, lasso/id-ff/name_registration.c,
    lasso/id-ff/profile.c, lasso/id-ff/provider.c, lasso/id-ff/server.c,
    lasso/id-ff/session.c, lasso/id-wsf-2.0/data_service.c,
    lasso/id-wsf/data_service.c, lasso/id-wsf/discovery.c,
    lasso/id-wsf/wsf_profile.c, lasso/saml-2.0/ecp.c,
    lasso/saml-2.0/login.c, lasso/saml-2.0/name_id_management.c,
    lasso/utils.h, lasso/xml/tools.c, lasso/xml/xml.c, swig/Lasso.i:
    Remove use of xmlFreeDoc. Use lasso_release_doc instead.
2008-11-04 01:58:49 +00:00
Benjamin Dauvergne ec1e294616 Add missing initializations. 2008-10-22 03:28:47 +00:00
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Benjamin Dauvergne 207891ff29 * Fix blanks mismatch (space in *.c and *h files or tabs in *.py files) and formatting 2008-08-05 14:53:29 +00:00
Benjamin Dauvergne b9b65ed9fc * change g_list_add* to lasso_list_add* 2008-08-05 14:52:23 +00:00
Benjamin Dauvergne fd1294504f change g_assign_* to lasso_assgin_* and g_release_* to lasso_release_* 2008-08-05 14:52:20 +00:00
Benjamin Dauvergne 15cc9d1e3b * lasso/id-wsf/data_service.c: fix my own memleak inside build_modify_response_msg 2008-08-05 14:52:09 +00:00
Benjamin Dauvergne 3755e5e5ca fix issue #15
"In lasso_data_service_build_modify_response_msg we free a shared xmlNode"
2008-08-01 14:09:55 +00:00
Benjamin Dauvergne 76d9fce5d5 forked lasso branch for adeline 2008-08-01 14:08:54 +00:00
Damien Laniel 14f7d3fc2a fixed too long lines and remove some blank lines 2008-05-30 12:08:24 +00:00
Damien Laniel 7860262cf6 some cleanups in id-wsf 1.1 code 2008-05-20 13:14:06 +00:00
Frédéric Péters e5ba6151ba moved gtk-doc inline as is better on so many points; also added schema
fragments to published doc
2008-05-15 21:17:44 +00:00
Frédéric Péters 4c68cbeaea fixed data service macros to refer to data service, not to profile service; and
added some parameter checking in init_modify
2008-03-20 19:13:39 +00:00
Benjamin Dauvergne afbacadc7d * fix typo in the last commit :) 2008-03-18 17:36:19 +00:00
Benjamin Dauvergne 1ab5cdf752 * id-wsd/data_service.c: (lasso_data_service_process_modify_response_msg)
return an error code if return value from lasso_node_new_from_dump is
   NULL or invalid.
2008-03-18 17:31:25 +00:00
Frédéric Péters 9755fdd108 register all known prefixes to xpath context 2008-02-01 11:20:37 +00:00
Damien Laniel 007c089162 fixed modifyng root node 2007-10-11 07:28:31 +00:00
Damien Laniel 68f6b2356c removed an usused variable 2007-10-10 09:17:30 +00:00
Frédéric Péters 6d7495d6ae added lasso_data_service_get_resource_offering method to get
LassoDiscoResourceOffering of a DataService
2007-10-04 11:02:54 +00:00
Frédéric Péters 4775254fc8 returns SOAP fault with approriate value when need_redirect_user is called
inbetween dataservice modify stuff.
2007-10-03 19:13:03 +00:00
Frédéric Péters 9ef91300b9 indentation fixes 2007-09-21 17:02:17 +00:00
Damien Laniel 4399d993fd fixed tabs 2007-09-21 16:56:07 +00:00
Damien Laniel ea85ed6cfc fixed id-wsf 1 data service modify 2007-09-21 16:37:18 +00:00
Damien Laniel 2be0a784ba fixed service_type in lasso_data_service_process_modify_msg 2007-09-21 16:10:02 +00:00
Damien Laniel 34c2bbd70b fixed service_type in lasso_data_service_process_modify_msg 2007-09-21 15:13:25 +00:00
Damien Laniel 232294bbaf some error checks and some coding style 2007-09-21 15:12:18 +00:00
Damien Laniel 338925ef0c reordered methods so it's easier to read 2007-09-20 16:22:31 +00:00
Damien Laniel 168358ef83 fixed data_service_init_modify method 2007-09-20 16:15:55 +00:00
Damien Laniel f70eab2459 check if (Encrypted)ResourceID is null 2007-09-18 17:54:01 +00:00
Damien Laniel 928a079a16 fixed setting of resource offering datas into a data service 2007-09-18 17:08:11 +00:00
Frédéric Péters a7c3eed730 adds support for text as answer to dst queries (instead of forcing answers to
be full nodes)
2007-09-12 15:33:35 +00:00
Frédéric Péters 3fc428016f added a wrapper around xmlParseMemory to avoid network and DTD 2007-08-12 22:19:32 +00:00
Damien Laniel 0456a5fa1c removed useless line 2007-06-06 09:39:08 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Frédéric Péters 41d6f7df68 memory management, avoid leaking xmlDoc* 2007-01-05 11:40:10 +00:00
Frédéric Péters 78b83a37b1 misc fixes for 1) memory leaks around XPath usage and 2) potential segfaults
from untested pointers
2007-01-03 23:35:17 +00:00
Frédéric Péters 58477d96d8 harmonized LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ and
LASSO_PARAM_ERROR_INVALID_VALUE usage
2006-12-28 17:46:32 +00:00
Frédéric Péters 7a78af3361 replaced remaining LASSO_ERROR_UNDEFINED by appropriate error codes 2006-12-28 10:45:39 +00:00
Frédéric Péters 0808887548 fixed all occurences of returning a negative number unspecified in errors.h 2006-12-27 23:50:15 +00:00
Frédéric Péters 0b9d49d4cf typo fix 2006-12-27 16:18:54 +00:00
Frédéric Péters 9b9166d797 fixing a bunch of possible segfaults (NULL passed to strlen) 2006-12-27 16:00:53 +00:00
Frédéric Péters 8d8f3288a8 fixing a bunch of undeclared functions and possible segfaults; also removed
some debugging printf.  (ID-WSF is now warning-free (but char signedness))
2006-12-27 15:57:07 +00:00
Frédéric Péters 011bc44569 random fixage of warning displayed with -Wall 2006-11-14 17:07:31 +00:00
Damien Laniel a3f603c8bd Added some error cases 2006-11-02 10:50:43 +00:00