Commit Graph

96 Commits

Author SHA1 Message Date
Benjamin Dauvergne fd256b2269 Docs: change the doc production and lot of other fixes
* lasso/Makefile.am:
   distribute extract_sections.py
 * docs/references/lasso/lasso.types.in: add missing class (mainly SAML2
   and ID-WSF 1.0/2.0) from docs/references/lasso.types.in

 * lasso/xml/strings.h:
   add lots of documentation, or at least documentation template to
   strings constants.
 * id-ff/login.h:
 * saml-2.0/assertion_query.h:
 * xml/xml.h:
   document undocumented enumerations.
 * lasso/errors.h:
   add proper documentation about error codes.
 * lasso/errors.c:
   new version of the lasso_strerror function
 * lasso/build_strerror.py:
   update the script that generater lasso_strerror from the
   documentation comments.

   Remove usage of OFTYPE

 * lasso/id-ff/session.c:
 * lasso/id-ff/session.h:
   remove usage of oftype, prefer gtk-introspection annotations instead.
 * lasso/id-wsf/data_service.h:
 * lasso/id-wsf/data_service.c:
   do the same.

   Add a script to build lasso-sections.txt

 * lasso/extract_sections.py:
   this script parses header files and generated lasso-sections.txt
   content for GObject class descriptions.

   Add a template file for the lasso-section.txt file

 * docs/references/lasso-sections.txt.in:
   this file serves as a base for the generation of lasso-sections.txt

   Update docs/references/Makefile.am for generating lasso-sections.txt

 * docs/references/Makefile.am:
   always rebuild template, using out of source build directory is too
   weird without it.
   call new script extract_sections.py to regenerate lasso-sections.txt
   if header files changed.

   Update lasso.sgml file with all missing sections

 * docs/reference/lasso.sgml:
   add all missing sections, mainly objects from XML schemas.

 * docs/reference/lasso-sections.txt: update it

 * *.c: add section documentation to some files.
 * lasso/xml/strings.h: fix bad usage or docbook markup
2009-08-26 15:15:07 +00:00
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 fbfbe5553d ID-FF&Core: Seal public field of LassoSession
* id-ff/session.h: seal public fields.

 * id-ff/session.c, id-ff/sessionprivate.h: add accessors for reading
   the is_dirty flag and counting store assertions.

 * id-ff/logout.c, id-ff/login.c, saml-2.0/login.c, saml-2.0/logout.c,
   saml-2.0/profile.c: use the new accessors.

 * id-ff/profile.c: include the private header file, use the new
   accessors, and remove unnecessary setting of is_dirty to FALSE (it
   should be false at instanciation).

 * utils.h: add a macro to access private content, prepare for using
   G_TYPE_INSTANCE_GET_PRIVATE and the GObject infrastructure for
   private structures eventually.
2009-08-26 15:13:55 +00:00
Benjamin Dauvergne b7d4e1b3e9 ID-WSF 2.0: use new macros
* lasso/id-wsf-2.0/data_service.c (lasso_idwsf2_data_service_init_query,
   lasso_idwsf2_data_service_parse_query_items,
   lasso_idwsf2_data_service_init_modify,
   lasso_idwsf2_data_service_parse_one_modify_item,
   lasso_idwsf2_data_service_parse_modify_items):
   add cast, change macros for stealing version, fix name of macro
 * lasso/id-wsf-2.0/profile.c: (lasso_idwsf2_profile_init_soap_request)
   use list handling macro, add missing casts
 * lasso/id-wsf-2.0/discovery.c:
   (lasso_idwsf2_discovery_process_metadata_association_add_msg,
    lasso_idwsf2_discovery_init_query) add missing casts
2009-08-26 15:12:58 +00:00
Benjamin Dauvergne 52e60ecb09 Rework cleanup handling
* 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'.
2009-04-22 23:49:29 +00:00
Benjamin Dauvergne 3caee2835d ID-FF 1.2: fix some real and potential memory leaks
* 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.
2009-03-27 15:06:27 +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
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
Damien Laniel a18ddb94e0 fixed various bugs with new compilation flags 2008-09-16 16:31:05 +00:00
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Benjamin Dauvergne ae1f6a297c * Remove warnings:
- remove unused parameter from private function signatures
 - remove unused variable
 - initialize variable potentially accessed uninitialized
 - add G_GNUC_UNUSED if function is public or adhering to an interface, and a
   parameter is unused.
 - if ID-WSF is not compiled in, define stubs with G_GNUC_UNUSED on parameters.
 The goal is to compile with -Werror.
2008-09-12 13:57:22 +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 fd1294504f change g_assign_* to lasso_assgin_* and g_release_* to lasso_release_* 2008-08-05 14:52:20 +00:00
Benjamin Dauvergne 4a8ba28e2b do not use normal add_assertion method when reconstructing a session, no need to add Advice to assertion_by_id container 2008-08-01 14:11:46 +00:00
Benjamin Dauvergne a978d26323 copy node instead of stealing it to xmlDoc object, when parsing session dump if
no children is present try to get a base64 encoded assertion.
2008-08-01 14:11:32 +00:00
Benjamin Dauvergne fd092b101c * lasso/id-ff/session.c: fix compilation errors. 2008-08-01 14:11:28 +00:00
Benjamin Dauvergne 6e5b696dfa * lasso/id-ff/session.c: store ID-WSF assertion in base64 to fix problem of
formatting of session dumps.
2008-08-01 14:11:25 +00:00
Benjamin Dauvergne 593a21e91b * lasso/id-ff/login.c: comment the generation of Advice when ResourceOffering for
the DiscoService support a security mechanism needing one. Anyway the
  generation of Credentials is broken.
* lasso/id-ff/session.c: add treatment of saml:Advice on newly added
  Assertions, keep the transmitted assertions inside the session indexed by their
  AssertionID.

* lasso/xml/saml_advice.{c,h}: change content to SNIPPET_LIST_XMLNODES.
2008-08-01 14:11:20 +00:00
Benjamin Dauvergne 558bdb7074 move session storage of assertion for SAML ID-WSF authentication of request to xmlNode instead of LassoNode; add error handling when no description has been found in comply_with_saml_authentication 2008-08-01 14:09:49 +00:00
Benjamin Dauvergne 76d9fce5d5 forked lasso branch for adeline 2008-08-01 14:08:54 +00:00
Benjamin Dauvergne 0546219300 Add an index of assertions by ID and two new function
lasso_session_add_assertion_with_id(session, id, assertion)
and
lasso_session_get_assertion_by_id(session, id)
Add to lasso_session_add_assertion a call to add_assertion_with_id,
to index all assertions into the index by id.
2008-08-01 14:08:14 +00:00
Damien Laniel a6ed1b1c11 added some more missing unreference 2008-05-21 17:28:44 +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 587c5e8390 fixed assertion refcounting in lasso_login_build_assertion, changed
lasso_session_add_assertion to refcount the assertion it gets
2008-02-18 13:03:05 +00:00
Frédéric Péters 6204c8be9c adds all classes from ID-WSF 2 required schemas; with appropriate changes to
other files.
2007-07-10 08:50:56 +00:00
Damien Laniel b92d470646 get the identity token from the current epr 2007-06-11 16:06:20 +00:00
Damien Laniel 3923e640cc check all function arguments in session and identity 2007-06-07 14:31:20 +00:00
Damien Laniel 36dbe4155e check session existence 2007-06-07 13:32:09 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Damien Laniel 9e62b87be4 don't use g_return_if_fail here 2007-05-09 15:24:58 +00:00
Damien Laniel e9ff67e610 moved session check to where it's really needed 2007-05-09 14:46:12 +00:00
Damien Laniel de142fe27f replaced svcMDs with svcMDIDs in identity and moved EPRs from identity to session 2007-05-08 23:29:00 +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 dcc31c6179 changed lasso_session_get_assertions not to g_object_ref assertions, so they
don't have to be freed.
2006-11-08 22:41:53 +00:00
Frédéric Péters 5c9de8fdcb fixing saml2 sso error cases (on ispassive) 2006-11-06 20:26:31 +00:00
Frédéric Péters 71dae9811f check session is not NULL even in functions where it shouldn't happen; since
developer may always call functions out of order.
2006-09-29 12:51:48 +00:00
Frédéric Péters 853f46fd93 starting SAML 2 logout 2005-11-21 18:51:52 +00:00
Frédéric Péters ebb9f7dffc SAML 2.0 support (only web-sso for the moment) 2005-11-20 15:38:19 +00:00
Frédéric Péters a2cf9a8c66 reinitialize assertion provider id list only on reset_provider_id_index 2005-08-14 12:00:16 +00:00
Frédéric Péters f05a03a102 correctly reset list before rebuilding it 2005-08-14 10:38:41 +00:00
Frédéric Péters f27e97a236 get_assertions() called with NULL will return every assertions 2005-08-08 15:18:38 +00:00
Frédéric Péters 453c810fb8 char signedness for gcc 4 (id-wsf part has not been done) 2005-07-30 22:36:54 +00:00
Nicolas Clapies f244dea5bd Fixed mistake about prototype of lasso_session_dump(). 2005-06-27 14:14:25 +00:00
Nicolas Clapies 9406df0c32 Now lasso_identity_new_from_dump() and lasso_session_new_from_dump() return NULL if the root element name is wrong. 2005-06-27 13:30:15 +00:00
Frédéric Péters 0869680575 added tests to fix bug #407 and avoir similar ones 2005-02-04 15:12:25 +00:00
Frédéric Péters e537d4ecf8 new lasso_session_get_assertions, returns GList* of (incref'd) assertions 2005-01-26 10:05:45 +00:00
Emmanuel Raviart 7a03e99b09 Updated Copyright and authors. 2005-01-22 15:57:56 +00:00
Frédéric Péters fe3928ad82 removed individual debug() statements in dispose() and finalize(); replaced by
a single statement in xml/xml.c; surrouded that one by LASSO_DEBUG so
--enable-debugging prints those memory-management debugging data.
2005-01-04 12:21:30 +00:00
Frédéric Péters ac3eab37a6 completely handle memory management for sessions 2005-01-04 12:13:09 +00:00