* lasso/xml/xml.c: use standardized assignment macros (it takes care of
releasing previous valuesm and other peculiarities associated with
safe pointer usage).
* lasso/xml/xml.c: (lasso_node_init_from_saml2_query_fields) Since parsing
of the relayState is now done inside each "_process_*msg" method of
each SAML2 profile, it is not needed anymore in this function.
* lasso/xml/lib_authn_request.c, lasso/xml/lib_logout_request.c,
lasso/xml/lib_register_name_identifier_request.c,
lasso/xml/lib_status_resposne.c:
- build_query: remove build_query overloaded virtual method, use
LassoNode new generic implementation.
- init_from_query:
- change direct call to lasso_node_init_from_query_fields to use of
base implementation from LassoNode.
- make use of utils.h memory handling macros like
lasso_release_gobject and lasso_assign_string.
* lasso/xml/lib_federation_termination_notification.c:
- init_from_query: remove parsing of RelayState parameter
* lasso/xml/xml.c:
In lasso_node_init_from_message_with_format remove direct use of
xmlSecSoap* functions because they emit too much warning by lasso
reimplementations.
* lasso/xml/private.h:
* lasso/xml/xml.c:
lasso_node_init_from_message_with_format permit to initialize a node
and to keep the corresponding xml document, in order for example to
validate a signature.
* lasso/xml/tools.c:
lasso_xml_parse_message is able to parse a message of any type, or of
a given type. If a message of another than the one specified is
found, the call fails, and a LASSO_MESSAGE_FORMAT_ERROR is returned.
* 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.
* private.h:
add the new constant to the enum type
* xml.c:
fix lasso_node_traversal, add support for the new contanst in
lasso_node_imp_init_from_xmlNode.
* lasso/xml/xml.c:
In lasso_node_impl_init_from_xml if xmlnode is null, return an error
but if no node_data specification is present, do not fail but print a
warning. It is not an error for a class to not have a node_data
private field.
add a comment to fix return code later.
* lasso/xml/xml.c:
xsi:type handling is broken since commit 3982, restore it.
move prefix/nodename matching in static helper functions, and reuse
them inside xsi:type code path.
* 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.
- lasso/xml/xml.c:
- In lasso_node_impl_init_from_xml fix really old bug seen when
running ID-WSF 2 python tests, when looking for snippet_any
field in the GObject we should not take the any attribute field,
otherwise the field value is gonna be overwritten with new GList
nodes. The problem ca be seen only with classes using the two kind
of snippets (ANY nodes and ANY attributs).
* 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
* 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.
* lasso/xml/xml.c:
- (lasso_node_impl_init_from_xml) When the keep_xmlnode flag is true
for the currently parsed Node class, we copy the parsed xmlNode
and keep inside the LassoNode.
- (lasso_node_dispose) if an original_xmlNode is present, we disallocate
it.
This code permit to set flags, separated by commas, space,
tabulations, or colons. This flags activates debug functions like,
suppressing validations of signatures or print debugging message about
deallocations.
The new flags are defined in /lasso/debug.h they can be set using an
environment variable named LASSO_FLAG or a function named
lasso_set_flag.
There are two flags currently:
- verify-signature:
To deactivate it, pass 'no-verify-signature' inside LASSO_DEBUG.
It desactivate signature verification, inside two functions:
lasso_query_verify_signature and lasso_provider_verify_signature.
- memory-debug:
It enabled reporting of memory deallocation inside generic memory
dellaocator for LassoNode objects and also in bindings.
- lasso/xml/xml.c: do not free a null hash table pointer.
remove valgrind errors through python tests.
1. Rename lasso_wsf_profile_new_full for java bindings (cannot subclass
in overrides of static methods).
2. Add const modifiers to many functon signatures in
bindings/python/wrapper_top.c.
3. add initialisation of private_data->encryption_sym_key_type (to
please valgrind) in instance_init of LassoProvider.
4. Add new macro to assign xmlNode, we consider xmlNode to be an
immutable value, and always use xmlCopyNode for assignment. The
macros is called named lasso_assign_node.
5. Fix segfault, when using xmlSec to encrypt the newly created
encrypted node replace the original node inside the xmlDoc structure,
and the original node is freed automatically. So you cannot borrow
the encrypted if you do not remove it from xmlDoc first.
- 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.
* 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.