Commit Graph

118 Commits

Author SHA1 Message Date
Benjamin Dauvergne 462c9a1cd0 [Core] replace all use of g_strcmp0 by lasso_strisequal and lasso_strisnotequal
Too much human errors with strcmp kind of functions. Also change name os
lasso_is_empty_string to lasso_strisempty.
2010-10-01 15:29:38 +02:00
Benjamin Dauvergne cd7b3e92c5 [Core] fix break of lasso_profile_get_request_type_from_soap_msg from commit b9d535625
ManageNameIDRequest is not an ID-WSF kind of request.
2010-09-29 00:10:09 +02:00
Benjamin Dauvergne b9d5356259 [ID-WSFv1&ID-WSFv2] separate better strings for ID-WSF from other strings
Code in core source file which depend upon ID-WSF symbols have been
conditionalized, and each id-wsf source file now include directly its
need string header.
2010-09-09 01:09:28 +02:00
Benjamin Dauvergne 5ba5b4634e Add a lasso_profile_get_signature_status method 2010-05-01 05:40:31 +00:00
Benjamin Dauvergne 81c35bbe2e Ameliorate support for lasso_profile_set_signature_verify_hint
* lasso/id-ff/profile.h:
   - add end symbol for enum LassoProfileSignatureVerifyHint
 * lasso/id-ff/profile.c:
   - fix documentation of lasso_profile_set_signature_verify_hint
   - do not allow to set or return invalid value for the
     signature_verify_hint attribute.
 * lasso/saml-2.0/login.c:
   - handle new enum value
 * lasso/saml-2.0/profile.c:
   - handle new enum value
   - fix missing catch of signature error reporting when
     signature_verify_hint is IGNORE.
 * docs/reference/lasso/lasso-sections.txt:
   - export enums LassoProfileSignatureHint and
     LassoProfileSignatureVerifyHint
 * tests/metadata_tests.c:
   - fix test of all Role enumerations
2010-04-16 15:37:17 +00:00
Benjamin Dauvergne 9150b008cf Core: add method to check whether we are IdP or SP of another provider
* lasso/id-ff/profile.{c,h}:
   the method lasso_profile_sso_role_with, evaluate using the current
   LassoIdentity content if we are in a relation of IdP or SP toward
   another provider. This is based on the existence of a federation with
   this provider.
2010-03-27 16:51:47 +00:00
Benjamin Dauvergne d5994b2bae Add signature_verify_hint accessor methods to LassoProfile
* lasso/id-ff/profile.{c,h}:
   add a LassoProfileSignatureVerifyHint enumeration and two accessor
   methods:
    - lasso_profile_get_signature_verify_hint
    - lasso_profile_set_signature_verify_hint
 * lasso/id-ff/profileprivate.h:
   add private field signature_verify_hint.
2010-03-27 16:51:34 +00:00
Benjamin Dauvergne 32794e6c89 Core: add an helper method to build a SOAP response in a LassoProfile object
* lasso/id-ff/profile.{c,h}:
   add lasso_profile_add_soap_fault_response(char* code, char *string,
   GList *details).
 * lasso/id-wsf-2.0/profile.{c,h}:
   change signature of lasso_idwsf2_profile_init_soap_fault_response.
 * lasso/id-wsf-2.0/data_service.c:
   use new function instead of manually intializing soap faults
 * lasso/id-wsf-2.0/discovery.c:
   init a soap fault when parsed request is of an unknown type, return
   proper error.
2010-03-02 11:57:53 +00:00
Benjamin Dauvergne 95f5d99be6 Core: add missing return value owner semantic annotations to getters
* lasso/id-ff/provider.c:
   fix lasso_provider_get_base64_succinct_id, it returned a libxml
   string, copy it with g_strdup before releasing it to stay with GLib
   allocated string in return values.
2010-02-17 10:14:59 +00:00
Benjamin Dauvergne 58fa7178e4 Core: add annotation to getter function about return value owner semantic
* lasso/id-ff/identity.c lasso/id-ff/profile.c:
   precise owner semantic of lasso_profile_get_identity,
   lasso_profile_get_session, lasso_profile_get_server
 * lasso/id-wsf-2.0/saml2_login.c tests/login_tests_saml2.c:
   in the same vein add missing release of assertion returned by
   lasso_login_get_assertion which return a caller owned object.
2010-02-17 10:14:56 +00:00
Benjamin Dauvergne 685a82b7af ID-WSF 2.0: add strings for Discovery service Actions 2010-02-17 10:14:39 +00:00
Benjamin Dauvergne 3bf8b2a44f Core: in lasso_profile_get_request_type_from_soap_msg use lasso_xml_parse_memory_with_error
* lasso/id-ff/profile.c: (lasso_profile_get_request_type_from_soap_msg)
   use lasso_xml_parse_memory_with_error instead of xmlParseMemory, use
   error code output argument to log error reports.
2010-02-04 00:02:24 +00:00
Benjamin Dauvergne 7aa18e07b1 Fix leaks, change signature of lasso_provider_get_sp_name_qualifier, make it return a const char* 2010-02-04 00:02:05 +00:00
Benjamin Dauvergne 003916b452 Core Profile: remove need for identity in lasso_profile_get_nameIdentifier 2010-01-12 15:40:06 +00:00
Benjamin Dauvergne 2ff13e5414 SAML 2.0: overhaul for ubuquitous binding support, still need work for HTTP-Artefact 2010-01-12 15:39:48 +00:00
Benjamin Dauvergne 0988cc2ec8 Core: in profile.c, profile.h, profileprivate.h, add a new attribute to express signature needs 2010-01-12 15:39:45 +00:00
Benjamin Dauvergne 896d9abd3f Restore ancient semantic of lasso_profile_is_session_dirty
* lasso/id-ff/profile.c:
   lasso_is_session_dirty must return FALSE if session is NULL.
2009-11-30 22:58:59 +00:00
Benjamin Dauvergne 3c9e4965dd Core: factorize code to obtain a SPNameQualifier
* lasso/id-ff/provider.c lasso/id-ff/provider.h:
   add a method giving the SPNameQualifier for a provider (its entity id
   or its affiliation id).

 * lasso/id-ff/profile.c:
 * lasso/saml-2.0/login.c:
   update use sites.
2009-10-30 14:47:36 +00:00
Benjamin Dauvergne cee61af74f Core: in profile, use lasso_server_get_provider
- lasso/id-ff/profile.c:
   replace direct access to server->provider by
   lasso_server_get_provider.
2009-10-30 14:47:19 +00:00
Benjamin Dauvergne c462bc3b2a Do not use g_new, use g_new0
* lasso/id-ff/federation.c:
 * lasso/id-ff/logout.c:
 * lasso/id-ff/profile.c:
 * lasso/id-ff/provider.c:
 * lasso/id-ff/server.c:
 * lasso/id-ff/session.c:
 * lasso/id-wsf/authentication.c:
 * lasso/saml-2.0/ecp.c:
 * lasso/xml/xml.c:
   even for private datas, use g_new0, it is safer.
2009-09-29 13:20:36 +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 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 962a5d2403 new function lasso_profile_get_server()
* 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.
2009-04-27 08:19:30 +00:00
Benjamin Dauvergne 4463c2ccc2 ID-FF 1.2: Add trace in dispose for LassoProfile
* 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.
2009-03-27 15:06:37 +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
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Frédéric Péters 6f1adef11c fixed order of freeing calls
(stolen from ec76ae4f7e40e99443ad421a85ec4d3fb7359bf3)
2008-07-22 12:09:06 +00:00
Damien Laniel da28448769 added some more missing unreference 2008-05-22 07:54:46 +00:00
Damien Laniel b3d861afa2 useless variables detroyer; they're already freed by snippets 2008-05-21 09:22:08 +00:00
Damien Laniel eb2fbc8fc0 fixed some reference counting and memory management 2008-05-20 18:34:09 +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 20f61fd653 formatting fix in docstring 2007-11-22 12:30:02 +00:00
Frédéric Péters d816d74c1a fixed class hierarchy, with ID-WSF 2 specific stuffs going into
LassoIdWsf2Profile (which now inherits from LassoProfile).
2007-06-19 11:16:17 +00:00
Damien Laniel eefdf3b586 moved soap_envelope_request and soap_envelope_response to ProfilePrivate to avoid ABI breackage 2007-06-18 09:43:47 +00:00
Damien Laniel fdf3feef49 initialise and destroy new attributes 2007-06-13 15:43:32 +00:00
Frédéric Péters 32aff7ef14 differentiate between id-wsf 1 & 2 since this is what is expected in other
places (won't work as easily for DST)
2007-06-08 18:16:42 +00:00
Frédéric Péters 6ef47339f7 recognize ID-WSF 2 disco query messages 2007-06-08 18:10:13 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Damien Laniel 6f43a7ef6f added id-wsf 2.0 request types + added a missing include 2007-04-25 14:15:25 +00:00
Frédéric Péters 540e2ebabc removing white space lost in a tab 2007-01-06 22:55:44 +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 17df2984aa replaced LASSO_ERROR_UNDEFINED by appropriate error codes in all of xml/ and
id-ff/
2006-12-28 10:19:46 +00:00
Frédéric Péters c5572210da SAMLv2 compliance fix (mostly RelayState and affiliations related) 2006-12-07 15:19:30 +00:00
Frédéric Péters e51ab22b76 include header file for lasso_saml20_profile_set_session_from_dump 2006-11-27 20:12:21 +00:00
Damien Laniel 0a391478be Added an original node to encrypted elements, only in dumps, for the dump to be readable 2006-11-23 17:44:26 +00:00
Frédéric Péters 011bc44569 random fixage of warning displayed with -Wall 2006-11-14 17:07:31 +00:00
Frédéric Péters 5bcb4d9035 also dump private data; necessary for saml2 artifact support 2006-11-13 11:12:59 +00:00