| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
- add new return code LASSO_MESSAGE_FORMAT_XSCHEMA_ERROR
- fix SOAP_FORMAT bizarre if conditional
- remove old comments
|
|
|
|
|
| |
- use new memory macros
- copying nodes instead of stealing nodes
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
- lasso/id-ff/login.c:
- the lasso_login_process_response_msg is used to process SOAP response
to artifact resolution requests. The answer contains an samlp:Response
that can be signed, and each contained assertion MUST be individually
signed.
- lasso/xml/samlp_response.c:
- set keep_xmlnode flag on the class metadatas to help in signature
validations.
|
|
|
|
|
|
|
|
| |
- lasso/id-ff/login.c:
- lasso_login_process_response_status_and_assertion:
- if signature_status is not 0 and an assertion is present, we
validate the signature on this assertion using the
internal API lasso_provider_verify_saml_signature.
|
|
|
|
|
|
|
|
| |
* lasso/errors.h, lasso/errors.c:
- LASSO_LOGIN_ERROR_REFER_TO_UNKNOWN_REQUEST is raised when a
samlp:Response contains an attribute inResponseTo when when no
previous request can be found inside the LassoLogin object or if the
given ID is not the as the one fome the previous request.
|
|
|
|
|
|
| |
* lasso/id-ff/login.c:
when signature validation fails on a message, then return the
signature status as return code. There is a security fix.
|
|
|
|
|
|
|
| |
* lasso/id-ff/provider.c, lasso/id-ff/providerprivate.h:
- (lasso_provider_verify_saml_signature) validate a signed
saml Request, Response or Assertion, using the public key
of the given provider.
|
|
|
|
|
|
|
| |
* lasso/xml/saml_assertion.c: set the keep_original flag of class
LassoSamlAssertion to true, to keep a copy of the original libxml tree
used to initialize eache instance of this object. We will use it to
validate signature on assertions.
|
|
|
|
|
|
|
|
|
|
| |
* lasso/xml/tools.c:
- lasso_saml_constrain_dsigctxt() add constraints following SAML
specifications on XMLDsig signatures to an libxmlsec DSig context.
- lasso_verify_signature() this function given an xmlNode and a key or
a keys manager (for a set of AC or AC chains) validate the
envelopped signature set upon this node. It can be instructed to
follow constraints of the SAML 1.0 specification.
|
|
|
|
|
|
|
|
|
|
|
| |
* lasso/errors.h: add error codes for,
- out of memory situation,
- excess of references during validation of signature on SAML
protocols message or assertions,
- an invalid reference during validation of signatures on SAML
protocols message or assertions,
- an mismatch between requested assertion issuer and received
assertion issuer.
|
|
|
|
|
|
| |
* 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/utils.h: added new macros, renamed others:
- macros handling xmlNode are renamed from _node to _xml_node,
- new macros for assign GList* of specific objects:
- lasso_assign_list_of_gobjects,
- lasso_assign_list_of_strings,
- lasso_assign_new_list_of_gobjects,
- macros for assigning xmlChar string (we need a specific macros
because, we must use xmlFree to release the destination string),
- macros to add string without duping: lasso_list_add_xml_string,
- macros to add anything non-null (no type cast):
lasso_list_add_non_null.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lasso/utils.h:
- add macro lasso_transfer_string and lasso_transfer_gobject,
to transfer ownership of such objects without copying or
their changing reference count. The old containing variable is
NULLed.
- lasso_list_add_gobject,lasso_list_add_new_gobject: test if the added
object is a GObject, if not do not add it and print a warning.
- lasso_check_type_equality: this macro use special builtin functions
only with GCC (typeof and __builtin_types_compatible_p) and do
metaprogramming using anonymous enumeration type to make compile
time assertions. It is used
- add macros to release XPathObject XPathContext, macro constructor to
make reference transfert macros (free dest, nullify dest, copy src
to dest without increasing refcount, nullify src), add a macro to
transfert xpath objects.
|
|
|
|
|
| |
* lasso/utils.h:
similar macro to goto_exit_if_fail but also produce a printed warning.
|
|
|
|
|
| |
* lasso/utils.h:
- lasso_list_add_string, add a copy of a string to a GList
|
|
|
|
|
| |
* lasso/utils.h: remove macros lasso_warn_deprecated, use GCC
attributes and gtkdoc markers instead.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
response
|
|
|
|
|
|
| |
* lasso/id-wsf-2.0/data_service.c, lasso/id-wsf-2.0/discovery.c,
lasso/id-wsf-2.0/profile.c: use assignment macros to maintain proper
reference counting and ownership of object field values.
|
|
|
|
| |
* lasso/Makefile.am: errors.h.in must be distributed.
|
|
|
|
|
| |
- lasso/xml/soap_envelope.c (lasso_soap_envelope_new): fix forgotten
reference count increase when assigning the body.
|
|
|
|
|
| |
- lasso/xml/tools.c: use BIO_new_mem_buf instead of BIO_new_file
if private_key is not an existing file.
|
|
|
|
|
| |
- lasso/id-ff/provider.c,lasso/id-ff/server.c: add missing initialization
of return code variable.
|
| |
|
|
|
|
|
| |
- lasso/id-ff/provider.c, lasso/saml-2.0/provider.c: add critical log
message in each failed loading of metadatas branch cases.
|
|
|
|
|
|
|
| |
- lasso/utils.c, lasso/utils.h:
New internal api lasso_safe_prefix_string that can show any string
taking care of escaping newlines,tabs and non-graphical ou non-ASCII
characters.
|
|
|
|
| |
Thanks Emmanuel Dreyfus
|
|
|
|
|
|
|
|
|
|
| |
- 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/id-ff/provider.c:
- in lasso_provider_verify_signature use standardised memory and
error handling macros, and also standard return code variable name
and exit label.
- in lasso_providerl_load_metadata_from_buffer and
lasso_provider_load_metadata use the standardised macros, exit
labels and return code variable.
- lasso/id-ff/server.c:
- in lasso_server_load_affiliation use standardised allocation and
error handling macros.
- lasso/id-wsf/wsf_profile.c:
- use standardised memory and error handling macros in
lasso_wsf_profile_build_soap_request_msg.
|
|
|
|
|
|
| |
- lasso/xml/xml.c:
- in lasso_node_new_from_soap release xmlDoc (and the contained
nodes) after the XPath objects that can reference them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
| |
- lasso/utils.h:
- add goto_exit_with_rc a standardized macro that suppose having an
'int rc' variable and an exit label in the current function.
- add lasso_release_output_buffer macro
|
|
|
|
|
|
|
| |
* lasso/utils.h:
- (lasso_assign_node) This macro wrongly assumes that the destroy
function for xmlNode is xmlFreeNodeList but it's xmlFreeNode.
xmlFreeNodeList is for xmlNode list of children.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* lasso/xml/private.h: add a boolean flag named keep_xmlnode to
base class structure LassoNodeClassData.
|
|
|
|
|
|
| |
* lasso/id-ff/server.c: (init_from_xml) if load_metadata fail
try load_metadata_from_buffer instead using the content of the dumped
nodes.
|
|
|
|
|
|
|
| |
* lasso/id-ff/server.c, lasso/id-ff/server.h: add new function to build
a LassoServer object holding content of certificate and private key
files intead of loading them everytime signing is needed. You must
instead load them yourself the first time.
|
|
|
|
|
| |
* lasso/id-ff/providerprivate.h: add declaration for private function
lasso_provider_load_metadata_from_buffer
|
|
|
|
|
|
|
|
| |
* lasso/id-ff/provider.c: (lasso_provider_load_metadata) libxml emit warning
when trying to parse non-existing or non-accessible file, so verify
that the file is accessible before calling libxml. (the corner
case of having warning when the file become inaccessible between
the two calls is non-interesting)
|
|
|
|
|
|
|
| |
* lasso/xml/tools.c: (lasso_sign_node) instead of waiting
for the xmlsec key loading function to fail before trying to load
the key directly from the private_key buffer, test it using
POSIX function.
|
|
|
|
|
|
| |
* lasso/xml/tools.c:
- (lasso_sign_node) if loading of the private_key or the certificate
file we try to use the filename directly as a key in the PEM format.
|