Commit Graph

104 Commits

Author SHA1 Message Date
Benjamin Dauvergne c7cf89b387 Merge branch 'release-2.4.0' 2012-05-05 22:32:48 +02:00
Frédéric Péters 952c0f552c build: do not include multiple glib headers 2012-04-02 23:47:40 +02:00
Benjamin Dauvergne f42bef0836 [key] add methods to send message using SAML 2.0 redirect and post bindings 2012-03-17 15:26:21 +01:00
Benjamin Dauvergne 5ba292521b [core] add the HMAC-SHA1 shared secret signature method 2011-12-05 13:11:53 +01:00
Benjamin Dauvergne 5a9a447bad [xml] add an inline function to validate LassoSignatureMethod values
- add also a LASSO_SIGNATURE_METHOD_NONE value
2011-12-05 12:03:12 +01:00
Benjamin Dauvergne c3985f6f6d [Core] add LAST enum values to LassoSignatureMethod and LassoSignatureType enumerations
It helps making range checks.
2010-09-03 19:02:41 +02:00
Benjamin Dauvergne f8ce6b25e5 [Code] add a lasso_node_export_to_query_with_password method 2010-07-16 19:34:23 +00:00
Benjamin Dauvergne 2468e0a421 [Core] change return type of all error returning methods
The new return type is lasso_error_t, it should allow to pinpoint easily
methods returning an error code in bindings.
2010-07-12 14:09:07 +00:00
Benjamin Dauvergne c4ac4f652c Core: move lasso_strerror declaration to errors.h 2010-06-12 00:43:43 +00:00
Benjamin Dauvergne 05aad98ec3 Fix documentation problems 2010-04-19 11:30:35 +00:00
Benjamin Dauvergne 5098e33eb3 Core: add a level argument to lasso_node_debug 2010-03-02 11:58:02 +00:00
Benjamin Dauvergne 8598c1327a Core: add a level argument to lasso_xmlnode_to_string and _lasso_node_export_to_xml 2010-03-02 11:57:29 +00:00
Benjamin Dauvergne 7d786e27bf Core XML: make lasso_node_set_custom_namespace/nodename take const string
* lasso/xml/xml.c lasso/xml/xml.h:
   mark argument of lasso_node_set_custom_namespace and
   lasso_node_set_custom_nodename as const char* strings.
2010-01-26 20:59:24 +00:00
Benjamin Dauvergne ce42be1481 Core XML: add function to get the namespace of a LassoNode
* lasso/xml/xml.c lasso/xml/xml.h:
   if a custome namespace is set, return it, otherwise return the class
   namespace (klass->node_data->ns->href).
2010-01-26 20:59:22 +00:00
Benjamin Dauvergne 0279087029 Documentation: distribute stylesheet, fix documentation comments, compelte lasso-sections.txt 2010-01-18 10:03:54 +00:00
Benjamin Dauvergne 7e22acdd2c Core XML: in xml.{c,h}, add new function lasso_node_get_name to get the element name for an object 2010-01-04 09:13:59 +00:00
Benjamin Dauvergne 4a10bbf9c6 Core XML: in xml.c, keep original node names, handle xsi:type attribute better
* lasso/xml/xml.c lasso/xml/xml.h:
   - fix signature of lasso_node_set_original_xmlnode, fix signature in
     documentation of lasso_node_set_original_xmlnode;
   - add a new API lasso_node_set_custom_nodename to specify the exact
     element name to use when serializing a LassoNode to XML.
   - rename internal structure _CustomNamespace to _CustomElement, add a
     nodename field to it.
   - rework internal functions around _CustomElement to be aware of an
     existing attached _CustomElement and re-use if needed.
   - move application of _CustomElement hints after the serialization of
     the node, so that the normal behaviour of the serialization is kept
     -- i.e. do not play with the list of parent classes.

   - use the full xsi:type content to find a LassoNode subclass when
     de-serializaing XML content, factorize QName->GObject class mapping
     for the three executions paths inside
     _type_name_from_href_and_nodename:
      - element QName,
      - xsi:type QName,
      - element name with xsi:type namespace
   - add a long comment expliciting the way the mapping is done.
   - remove direct mapping of EncryptedAssertion element, the registry
     declaration on the class LassoSaml2EncryptedElement shoud be
     enough.
2010-01-04 09:13:53 +00:00
Benjamin Dauvergne 8a7c0cbaa3 XML: add an API to set namespace on a single instance of a LassoNode
* lasso/xml/xml.h lasso/xml/xml.c:
   add a new public API lasso_node_set_custom_namespace(node, prefix,
   href). It allows to set the precise namespace of a single object, all
   other instance of the same class continue to use the default
   namespace for the class.
   It should be used for difficult consumer of certain nodes (like
   wsse:Security) which only know certain namespace or do not use the
   namespace going with the specified version of a specification (like
   MSP not following ID-WSF 1.0 specification and using
   http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
   instead of
   http://schemas.xmlsoap.org/ws/2003/06/secext.
   It also allows to share implementation of schema objects common to
   many version of the same specification (wsse:Security between ID-WSF
   1.0 and ID-WSF 2.0), without creating too many child classes.
2009-09-11 15:51:32 +00:00
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 7f09fe60de Fix bug #94: permit any content for AttributeValue
* lasso/xml/private.h:
 * lasso/xml/xml.h
 * lassoi/xml/xml.c:
   add an implementation helper for the AttributeValue objects
   implementation of get_xmlNode.
   make lasso_node_set_original_xmlnode public API.
 * lasso/xml/saml-2.0/samlp2_extensions.c:
 * lasso/xml/saml-2.0/saml2_attribute_value.c:
 * lasso/xml/saml_attribute_value.c:
   implement get_xmlNode for the AttributeValue and Extensions objects.
   If the any field is empty, use the original_xmlnode value.  In order
   to support free-style content, you must use the method
   lasso_node_set_original_xmlnode, properties and children are
   extracted from the given node and added to the node created by the
   generic get_xmlNode virtual method.
2009-03-27 15:04:41 +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 71e43cfd1f Core: add a new messsage format error for XSchema constraint failure 2009-01-24 09:34:07 +00:00
Benjamin Dauvergne 12afeac716 Restore ABI compatibility wrt original_xmlNode
* lasso/xml/xml.c:
  - use set/get_qdata to store the original xmlnode, modify
    init_from_xml and dispose function to cope with this new storage
    place.
 * lasso/xml/xml.h:
  - remove field original_xmlNode from structure LassoNode to keep ABI
    compatibility with previous versions.
  - declare new API lasso_node_get_original_xmlnode
2008-11-03 15:01:33 +00:00
Benjamin Dauvergne a8adf797fe API to cleanup LassoNode tree of keeped xmlNode
* lasso/xml/xml.c:
  - add a new function lasso_node_cleanup_original_xmlnodes to
    disallocate all keeped xmlNode inside a tree of LassoNodes.
  - add internal function lasso_node_traversal to iterate across a
    LassoNode tree (could be used to reimplement lasso_node_destroy)
    It is a preorder traversal.
2008-11-03 14:15:44 +00:00
Benjamin Dauvergne 10156acfa8 Add original_xmlNode pointer to LassoNode
* lasso/xml/xml.h: add an xmlNode field to base class LassoNode,
   to permit retrieving the xmlNode originally parsed when the structure
   is the result of parsing. Will be used by signature checking code.
2008-11-03 14:15:41 +00:00
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Damien Laniel d10770c933 moved xmlenc.h include where it is really needed 2007-06-12 14:05:38 +00:00
Damien Laniel 1b43fbd59d added dst profile registration 2007-06-05 13:05:42 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Damien Laniel 995323d234 added LASSO_EXPORT for a function in a public header 2007-05-03 16:47:31 +00:00
Damien Laniel 9aeb062629 don't use lasso_node_dump to create xml soap messages 2007-05-03 13:14:00 +00:00
Damien Laniel 92e8799a56 - Moved the EncryptedKey to the same level as EncryptedData in xml
- Changed the prototype for lasso_node_encrypt and lasso_node_encrypt
- Moved lasso_node_encrypt and lasso_node_encrypt declaration to xml_enc.h
- Added a GList for EncryptedKey in EncryptedElement
2006-11-16 14:34:57 +00:00
Damien Laniel 8a331ac747 Decryption of EncryptedID in Assertion 2006-11-15 18:56:34 +00:00
Nicolas Clapies 85d8ea7d4b Fixed big mistake about PAOS naming. Added more strict check when trying to process PAOS response in login.c. 2006-11-14 15:09:29 +00:00
Nicolas Clapies 608cfa1fee Added functions to export to PAOS request and ECP response. 2006-11-14 13:57:40 +00:00
Damien Laniel bbe9347390 Header for lasso_node_encrypt 2006-11-13 11:54:47 +00:00
Frédéric Péters 930965e7f4 possibility to register new dst services. 2005-09-11 09:08:31 +00:00
Frédéric Péters 01d516e3d4 typo fix and longer description 2005-02-21 14:28:52 +00:00
Frédéric Péters c5d7126222 documented enums 2005-02-21 14:21:52 +00:00
Emmanuel Raviart 7a03e99b09 Updated Copyright and authors. 2005-01-22 15:57:56 +00:00
Frédéric Péters 142e64189f moved errors.[ch] up; as requested. 2005-01-12 17:42:01 +00:00
Frédéric Péters 9b444f7796 Removed second and third parameters of lasso_node_dump since @encoding is
always UTF-8 and @format is always to indent XML in lasso dumps.
2005-01-01 18:53:30 +00:00
Frédéric Péters ac3e5574fc moved remaining lasso[A-Z].* enums to Lasso[A-Z].* 2004-12-31 18:33:23 +00:00
Frédéric Péters 815595a4d5 moved lasso_strerror to public interface 2004-12-31 15:37:21 +00:00
Frédéric Péters aed3f5693a removed obsolete (since move to structure) lasso_node_verify_signature (but
lasso is still lacking signature check for assertion)
2004-12-31 14:32:48 +00:00
Frédéric Péters ed279fc6a3 moved lasso_node_build_query to private functions 2004-12-30 14:51:14 +00:00
Frédéric Péters 98435cf8d8 merged tools.h and internals.h in new private.h, excluded from API reference. 2004-12-30 13:58:55 +00:00
Frédéric Péters 07fcdf0c4e generate xmlsec signatures in get_xmlNode; this should allow envelopes (in
LECP) to work properly.
2004-12-28 12:44:22 +00:00
Frédéric Péters bccdbae127 Removed _new functions for abstract classes; added _new functions for classes
that only had _new_full functions.  Documented a little bit; marked public
members in structures as such.
2004-12-23 13:10:31 +00:00