Commit Graph

40 Commits

Author SHA1 Message Date
Benjamin Dauvergne 466b6f3746 [tests] add test cases for the LassoKey class 2012-03-17 15:26:57 +01:00
Benjamin Dauvergne 727f07b1ae Simplify useless complexity in include paths 2011-12-16 14:17:31 +01:00
Benjamin Dauvergne e2c6b92f3f [tests] fix tests to comply with new implementation of parsing
The test around parsing of EncryptedAssertion was wrong since it was
missing the XMLEnc namespace declaration.
2011-12-16 11:39:24 +01:00
Benjamin Dauvergne 65b94cc1f5 [tests] improve checking for log output
- now any non expected log output is considered an error, by setting a
  g_log default   handler.
- block_lasso_logs()/unblock_lasso_logs() will block logging output at
  the DEBUG level
- begin_check_do_log(level, message, endswith)/end_check_do_log() with
  check that the only message emitted between the two macros is one
  equals to "message" at the level "level", or ending (to work around
  variable parts in a log message) with "message" if "endswith" is True.
2011-12-16 11:39:18 +01:00
Benjamin Dauvergne f4fc26bb39 [core] move XMLDsig related nodes in their own sub-library, add X509Data node implementation
The goal is to use the KeyInfo structure as a transport format for our cryptographic keys
2011-12-16 11:39:18 +01:00
Benjamin Dauvergne 9836f4a40b [core] add a new class LassoKey
LassoKey currenly store a LassoSignatureContext inside a
reference-counted and bindable object. It will be used to export API
around key management to bindings.
2011-12-05 12:03:14 +01:00
Benjamin Dauvergne 26d6b35a49 [leakcheck] fix leaks seen by the unit tests
This commit also improved valgrind suppression file to hide static
allocations done by the GLib type system.
2011-11-22 17:45:52 +01:00
Benjamin Dauvergne 94a9fe4f02 [xml saml-2.0] add a class to handle the KeyInfoConfirmationData type
* use a direct mapping to map this class to SubjectConfirmationData
   node having the xsi:type attribute.
 * overload get_xmlNode method to add the xsi:type attribute on output.
2011-10-13 01:12:04 +02:00
Benjamin Dauvergne ed44ea81a8 Disable metadata loading test with the UK federation files 2011-05-27 16:01:44 +02:00
Benjamin Dauvergne f455be4387 [tests] fix broken renater metadata file
A modification was introduced which broke the signature, updating to the
last version.
2011-05-17 14:48:27 +02:00
Benjamin Dauvergne ce93f37992 [tests] move renater metadata files into the metadata/ subdirectory 2011-05-16 09:37:04 +02:00
Benjamin Dauvergne 8be7b0414d [core] add flags parameter to lasso_server_load_metadata to tune signature checking on metadata files
The flags parameter allows to control the checking of digital signature
upon EntityDescriptor and EntitiesDescriptor nodes in SAML 2.0 metadata
files.

The default behaviour is to check all found signatures and to inherit
signature from EntitiesDescriptor to their children.

By only enabling checking of EntityDescrtiptor node signatures it's also
possible to only check signature at the EntityDescriptor level and so
only trust individual entities and not the aggregating provider.
2011-04-14 16:45:43 +02:00
Benjamin Dauvergne 345c3b50f8 [core] rename lasso_server_load_federation to lasso_server_load_metadata
The aim of this function is now to load any metadata file, and to
replace completely the use of lasso_server_add_provider.
The metadata content argument is replaced by a metadata file path to
more closely match other APIs.
2011-04-04 15:57:07 +02:00
Benjamin Dauvergne a9f9b3d9a2 [core] add a loaded_entity_ids output parameter to lasso_server_load_federation
It allows to know which entity has been loaded from the metadata file.
It must be freed by the caller.
2011-03-30 14:20:45 +02:00
Benjamin Dauvergne a0aba29273 [core] add a blacklisted_entity_ids parameter to lasso_server_load_federation
The goal is to prevent loading of provider known to have problems.
2011-03-30 11:15:39 +02:00
Benjamin Dauvergne fbb3e962ad [tests] continue improving the lasso_server_load_federation test cases 2011-03-29 18:46:32 +02:00
Benjamin Dauvergne 77c6c49bad [tests] test lasso_server_load_federation
The test operates on the metadata file of the french university network
Renater.
2011-03-29 18:46:02 +02:00
Benjamin Dauvergne 9cc0ff6d43 Test: only test custom namespace if ID-WSF is enabled 2010-04-30 09:22:49 +00:00
Benjamin Dauvergne d10f2982ae Tests: add tests for custom namespace functions 2010-04-06 13:11:38 +00:00
Benjamin Dauvergne c74224c5c9 Propagate change of name for LASSO_PP_ defines 2010-02-10 00:33:40 +00:00
Benjamin Dauvergne 6de95fe91f Tests: in basic_tests.c, re-enable parsing of LassoWsuTimestamp objects 2010-02-04 00:02:13 +00:00
Benjamin Dauvergne b780bd2376 Fix leaks
* lasso/id-wsf-2.0/profile.c: release private data object.
 * lasso/saml-2.0/login.c: free NameID content after construction.
 * lasso/xml/tools.c: free algorithm attribute content in
   lasso_node_decrypt_xmlnode.
 * lasso/xml/xml.c: release cutom_element->nodename in destructor.
   remove useless finalize method.
 * tests/basic_tests.c: release xmldoc after use.
 * tests/random_tests.c: free resut of lasso_node_dump.
2010-02-04 00:02:07 +00:00
Benjamin Dauvergne d1ada7b833 Tests: add idwsf2_tests.c, call from tests.c, update Makefile.am 2010-01-04 09:15:32 +00:00
Benjamin Dauvergne 6d9cb01e01 Tests: in basic_tests.c, fix, do not overwrite known elements mappings
* tests/basic_tests.c:
   when testing functionality of lasso registries which map namespace
   elements to lasso objects, do not use liberty namespace because it
   interacts with other tests -- deserialization of lib:Assertion node
   was broken by this test -- when running them in CK_FORK=no mode.
   Changed namespace LASSO_LIB_HREF, for "coin" which is less dangerous.
2010-01-04 09:14:35 +00:00
Benjamin Dauvergne c1bd6a8f50 Tests: in basic_tests.c, check LassoSaml2EncryptedElement handling 2010-01-04 09:14:15 +00:00
Benjamin Dauvergne 6f1ecfeda6 Tests: add a test of NameIDFormat extraction
- tests/basic_test.c:
   add test11_get_default_name_id_format which parse a metadata file and
   try to extract the default name id format.
 - tests/data/sp5-saml2/metadata.xml:
   add NameIDFormat node for testing.
2009-09-29 13:20:42 +00:00
Benjamin Dauvergne 1f78831973 XML: Fix seg-fault bug introduced in commit 4108
* lasso/xml/xml.c:
   lasso_node_get_xmlnode_for_any_type is broken, if no original_xmlnode
   is present, return just cur. Also add all missing cases for the state
   of the pair (cur, orignal_xmlnode).
 * tests/basic_tests.c:
   add a non-regression test, testing all dump/restore functions.
2009-09-11 15:51:53 +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 7e6dfb7683 Fix leaks in tests
* basic_tests.c:
 * login_tests.c:
 * login_tests_saml2.c:
 * random_tests.c:
   free replaced string, unref used nodes, initialize local variables
   when necessary, free newly allocated strings.
2009-04-30 14:58:16 +00:00
Benjamin Dauvergne 35eb8da379 Tests: Add test parsing a Ping Federate assertion.
* tests/basic_tests.c:
   load data/response-1 and try to parse it.
2009-04-22 23:49:20 +00:00
Benjamin Dauvergne 70299b52ab Test: add missing release of objects and memory
* tests/basic_tests.c:
 * tests/login_tests.c:
 * tests/metadata_tests.c:
 * tests/random_tests.c:
 * tests/tests.c:
   add missing g_free and g_object_unref calls.
2009-03-27 15:06:25 +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 09daafe00f * Add support of lasso_registry to lasso_node_new_from_xmlNode.
* Add full support for xsi:type, with lookup of the QName namespace, will only
  work if lib: namespace is correctly declared in the dumped XML fragment.
* Add a test for the new functionnality in lasso_node_new_from_xmlNode.
2008-09-12 10:17:26 +00:00
Benjamin Dauvergne 6edfa7935f Add a new error code, with the REGISTRY prefix and use it in registry function
returning an error code.
Fix a typo when retrieving a quark string in the registry modulke.
Improve tests for functional mapping.
2008-09-04 11:41:39 +00:00
Benjamin Dauvergne bcf3b56daf Add functional mappings and test code that goest with it. 2008-08-26 12:49:09 +00:00
Benjamin Dauvergne 0fc48f120e Add test of the two public registry functions,
lasso_registry_default_add_mapping, lasso_registry_default_get_mapping.
2008-08-26 12:49:04 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Frédéric Péters cef5e8352e added testcase for bug #407 2005-02-04 15:11:50 +00:00
Emmanuel Raviart 7a03e99b09 Updated Copyright and authors. 2005-01-22 15:57:56 +00:00
Frédéric Péters 8db0c98e16 added stupid tests to annoy developers. 2004-07-29 09:14:37 +00:00