Commit Graph

244 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 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 e3bdadf8f7 ID-FF 1.2: Fix leaks, reduce code
* 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.
2009-04-30 14:58:20 +00:00
Benjamin Dauvergne 913f159697 Complete doc of lasso_logout_validate_request
* lasso/id-ff/logout.c:
   add description of all possible return codes.
2009-04-27 08:18:57 +00:00
Benjamin Dauvergne a68c89f902 ID-FF 1.2: fix style fault
* 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".
2009-03-27 15:06:29 +00:00
Benjamin Dauvergne c89c77c924 ID-FF 1.2: Add handling of relaystate for logout requests
* lasso/id-ff/logout.c (lasso_logout_process_request_msg,
 lasso_logout_validate_request): transfer relaystate from request
 message to profile field.
2009-03-27 15:06:23 +00:00
Benjamin Dauvergne 854df3b651 ID-FF 1.2: Use new macros in logout, defederation and lecp
* 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
2009-03-27 15:06:21 +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 a27ee6c5da ID-FF 1.2: review of logout validate request
* lasso/id-ff/logout.c (lasso_logout_validate_request): use new macros.
2009-01-24 09:34:26 +00:00
Benjamin Dauvergne cd9c25c0f2 ID-FF 1.2: review logout_process_request_msg
* lasso/id-ff/logout.c (lasso_logout_process_request_msg): use the
   new allocation macros, add checking of the parsed object type, add
   validation of some schema constraints before processing, like
   presence of the name identifier.
2009-01-24 09:34:24 +00:00
Benjamin Dauvergne d38057f858 ID-FF 1.2: review logout_validate_request
* lasso/id-ff/logout.c (lasso_logout_validate_request):
  - when signature verification failed in process_request_msg,
    do not continue validation of the request, stop immediately and
    return the signature status code.
  - use utils.h macro for memory allocation handling. Fix potential leak
    of the profile->response object.
2009-01-24 09:34:04 +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 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
Damien Laniel b90ab6d783 fixed too long lines and remove some blank lines 2008-05-30 12:27:01 +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
Damien Laniel e10559a915 fixes SLO from IdP with Encrypted NameID in ID-FF 2008-04-09 10:21:37 +00:00
Benjamin Dauvergne 537db7e9e2 * id-ff/logout.c: (lasso_logout_init_request) free remote_provider_id before setting it. free profile->request
before setting it if LASSO_IS_NODE(request), not just LASSO_IS_LIB_LOGOUT_REQUEST(request). Fix memory leaks.
2008-02-29 17:15:08 +00:00
Frédéric Péters b1fe5d552f format list in docstring with paragraphs, as this form is known by the new
binding generator
2007-11-22 15:40:42 +00:00
Frédéric Péters bc56d07345 removed direct usage of g_object_unref from lasso_*_destroy methods 2007-11-22 12:42:47 +00:00
Frédéric Péters dc93184bb4 don't shout a critical error when there is no session and logout
get_next_providerId is called.
2007-11-22 12:29:46 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Frédéric Péters a18bef21a9 un-idff'ied docstrings (and fixed a few comments) 2007-01-08 13:13:49 +00:00
Frédéric Péters e636bd0680 new lasso_profile_clean_msg_info function used to clean msg_url and msg_body
(free()ing and setting to NULL) in functions where those variables are later
set.
2007-01-05 13:40:07 +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 1e19373f58 make ID-FF SLO works even when there are SAMLv2 assertions in the session 2007-01-03 21:01:51 +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 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 be476b2af6 replaced all usage of UNDEFINED error code in logout profiles (both ID-FF
and SAMLv2) by appropriate error codes
2006-12-27 23:41:14 +00:00
Frédéric Péters 807403d5a6 avoid segfaults when passing NULL to *_new_from_dump 2006-12-27 16:06:35 +00:00
Frédéric Péters 0f11bb2491 fixed up lasso_saml20_logout_process_response_msg function name; and remove
assertion on SP when initiated on SP.
2006-11-15 16:41:55 +00:00
Frédéric Péters 67d514c1c1 include http request method in profile dumps 2006-11-10 15:12:18 +00:00
Frédéric Péters aec4544976 fixed url/query construction for endpoints with query part (zxid) 2006-11-07 12:44:32 +00:00
Frédéric Péters 64ebae839c already set remote_provider_id in process_request 2006-11-02 11:52:34 +00:00
Frédéric Péters 68cedae6c5 don't automatically fallback to redirect, this breaks some cases.... 2006-10-26 07:48:15 +00:00
Frédéric Péters b08ae207c0 better error handling in slo 2006-09-28 16:09:54 +00:00
Frédéric Péters 194ea564b5 don't segfault when lasso_logout_build_request_msg is erroneously called without lasso_logout_init_request before 2006-01-23 14:05:59 +00:00
Frédéric Péters d17bbf258d Completed first go of SAML 2.0 single logout and added some missing files 2005-11-22 21:24:12 +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 8925affa1f no session on idp -> requestdenied -> removing no longer valid session on sp. 2005-10-05 11:48:20 +00:00
Frédéric Péters d876cf4cc7 returns LASSO_LOGOUT_ERROR_REQUEST_DENIED if appropriate. 2005-10-04 08:06:36 +00:00
Frédéric Péters b7b6579eb0 don't check for remote provider id before checking for possible empty answer. 2005-08-24 15:19:31 +00:00
Frédéric Péters fb30438992 build_response_msg called while there was no connection will build a failure
message.
2005-08-16 14:03:19 +00:00
Frédéric Péters 8cb5e69577 check for remote_provider_id 2005-08-16 13:51:16 +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 93d5911a37 counter providers that do not support any single logout; they are now skipped
and a correct response is nevertheless sent to the originating provider
2005-08-14 10:39:34 +00:00
Frédéric Péters 639951fe8a fixed comment 2005-08-13 17:36:36 +00:00