Commit Graph

45 Commits

Author SHA1 Message Date
Benjamin Dauvergne 72b778e47e Fix all cast-function-type warnings (#71400) 2022-11-21 13:28:08 +01:00
Benjamin Dauvergne e5ad4b1702 misc: clear warnings about class_init signature using coccinelle
$ spatch --in-place --sp-file add-second-arg-to-class-init.cocci `git grep -l -C1 ^class_init \*.c`
	$ sed -i 's/\*unused\>/*unused G_GNUC_UNUSED/' `git grep -l 'void \*unused'`
2020-03-26 22:52:49 +01:00
Simo Sorce 3a6b2fdee7 Fix license boilerplates
Instad of referring to an old FSF address, point the reader to the FSF
website where the latest licenses and addresses are published.

Signed-off-by: Simo Sorce <simo@redhat.com>
2013-12-03 21:55:06 +01:00
Benjamin Dauvergne ed9c981989 [xml] complete missing namespace declarations for child nodes
To allow lasso_node_impl_init_from_xmlnode to do proper namespace
checking, child node which are not of the same namespace as their parent
in their XSD schema must have an explicit namespace declared in the
XmlSnippet.
2011-12-16 11:39:19 +01:00
Benjamin Dauvergne 9d9cf60aca [Core] extract signature adding into base class method lasso_node_get_xmlNode
In order to permit subclass to modify the base xmlNode created by
lasso_node_impl_get_xmlNode we must defer the concrete to the virtual
method wrapper, lasso_node_get_xmlNode.

To do that it whas needed to make id_attribute another virtual field of
LassoNode subclasses (it can be accessed through an offset registered in
the class object).

This commit solves signature validation error since the patch for
managing more than one SessionIndex element in samlp2:LogoutRequest.

It also factorize the creation of signatures in one place.
2010-07-12 14:09:17 +00:00
Benjamin Dauvergne 01dad5fd05 XML: fill node_data->{certificate,private_key}_file_offset for nodes with signatures 2010-01-12 15:39:40 +00:00
Benjamin Dauvergne b63bc73b93 XML: remove all useless instance_init functions
* Use Coccinelle semantic patch tool (http://coccinelle.lip6.fr/) to
   remove useless instance_init functions, the first patch applied was:
@@
type T,V;
identifier I, J;
parameter list P;
expression E1;
@@

V instance_init(T node)
{
<...
(
-  E1 = 0;
|
-  E1 = NULL;
|
-  E1 = FALSE;
)
...>
}
   It removes useless initialization to 0 (GObject already zeroes
   allocated objects).
   The second one is:
@ rule1 @
type T;
identifier node,fn;
@@

- static void fn(T *node) { }

@ rule2 extends rule1 @
typedef GType, GInstanceInitFunc;
identifier type_constructor;
@@
GType type_constructor()
{
<...
- (GInstanceInitFunc)fn
+ NULL
...>
}
   It removes empty instance_init functions.
2009-08-26 15:14:48 +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 93dc7ca545 XML ID-FF 1.2 & SAML 2.0: Handle signature failure
* lasso/xml/saml_assertion.c:
 * lasso/xml/samlp_response_abstract.c:
 * lasso/xml/samlp_request_abstract.c:
 * lasso/xml/saml-2.0/samlp2_request_abstract.c:
 * lasso/xml/saml-2.0/saml2_assertion.c:
 * lasso/xml/saml-2.0/samlp2_status_response.c:
   if a failure occur in the signing process, free the xmlnode, return
   NULL and print a warning.
2009-03-27 15:06:13 +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 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +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
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Emmanuel Raviart 7a03e99b09 Updated Copyright and authors. 2005-01-22 15:57:56 +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
Frédéric Péters 1ecf9e1123 Moved signature template stuff into xml.c and use XmlSnippet for them; this
should insure proper validation against Liberty XML schemas and should help
adding missing signature support to <Assertion>
2004-12-19 15:24:19 +00:00
Frédéric Péters 9f80e37517 Done with the new query snippets system (everything but the IDPEntries in
<lib:AuthnRequest>).  It has nested <samlp:StatusCode> support but ID-FF layer
must still be updated to produce them.
2004-12-17 12:32:48 +00:00
Frédéric Péters db9b04a96d another round on snippets; no longer multiply types for content transformation
(CONTENT_BOOLEAN, ATTRIBUTE_BOOLEAN, CONTENT_INTEGER, ATTRIBUTE_INTEGER...),
instead does something like this: SNIPPET_ATTRIBUTE | SNIPPET_INTEGER (other
combinations allowed)
2004-12-07 16:23:50 +00:00
Frédéric Péters eeb34add2a removed obsolete doc args 2004-12-06 17:25:50 +00:00
Frédéric Péters 05577f5672 last(?) iteration on XmlSnippet; now attached to classes, get_xmlNode and
init_from_xml are no longer necessary in many cases.  Previous XmlSnippet
renamed to XmlSnippetObsolete to keep compatibility (id-wsf classes have not
yet been converted).
2004-12-02 14:54:43 +00:00
Frédéric Péters cd4f3ea1fc indentation work 2004-11-25 22:51:39 +00:00
Frédéric Péters 476ec0350c added error checking on query strings; python tests should now pass 2004-11-22 13:13:16 +00:00
Frédéric Péters da2c18c599 removed unnecessary lasso_node_impl_init_from_query 2004-11-18 10:09:58 +00:00
Frédéric Péters 07e1b7c04f return value on init_from_xml; and minor tweaks to code style 2004-11-09 09:08:47 +00:00
Frédéric Péters a28349c9c7 Fixed 2 bugs in lasso_node_add_signature_tmpl()
* the transform method "exclusive C14N" was missing in Transforms element
* removed useless KeyInfo element in Signatures without X509 data

[from lasso-orig revision 1.95]
2004-11-03 14:20:50 +00:00
Frédéric Péters 4bbe46d337 xmlsec for logout requests and responses 2004-10-30 08:59:10 +00:00
Frédéric Péters 7b4f71c992 lasso_samlp_response_abstract_fill to initialize responses with id, time and
versions.
2004-10-29 12:29:18 +00:00
Frédéric Péters 6d6fbbeaff cleaning up 2004-10-27 15:41:28 +00:00
Frédéric Péters f13772d62d Done with the move to structures and the removal of protocols/ (lasso branched
on October 2nd; occasional merges since then).

- Compatible with current souk test suites.
- Missing memory management for everything in xml/
- Missing xmlsec support for SOAP messages.
2004-10-27 09:49:13 +00:00
Frédéric Péters cc5bffb4bd removed remaining parenthesis on return statements 2004-09-17 15:19:18 +00:00
Frédéric Péters 2bde0c2ddb removed extra parentheses after return statements; 2004-09-01 09:59:53 +00:00
Emmanuel Raviart 2ca1008182 SWIG now produces high-level bindings.
(python/Makefile.am needs some cleaning IMHO, but I don't understant it).
2004-08-28 21:37:18 +00:00
Nicolas Clapies 4fb5358591 added support of URI identifier in signature 2004-08-23 14:05:20 +00:00
Valery Febvre 73113ee6bd Added 2 methods:
lasso_samlp_response_abstract_set_signature_tmpl(),
	lasso_samlp_response_abstract_sign_signature_tmpl()

Removed err param in lasso_samlp_response_abstract_set_signature()
2004-08-19 12:45:05 +00:00
Frédéric Péters da4e23d09c declarations first (and s/lenght/length/) 2004-08-13 15:16:13 +00:00
Valery Febvre df5394132c Fixed GError* bugs 2004-08-11 21:22:27 +00:00
Valery Febvre e13598de34 Replaced a lot of wrong issueInstance words by issueInstant
Renamed 3 methods:
	lasso_saml_assertion_set_issueInstant(),
	lasso_samlp_request_abstract_set_issueInstant(),
	lasso_samlp_response_abstract_set_issueInstant()
2004-08-05 15:56:30 +00:00
Valery Febvre b9db3340dd Added a new argument 'err' (GError *) in 5 methods:
lasso_ds_signature_sign,
	lasso_node_add_signature,
	lasso_node_verify_signature,
	lasso_saml_assertion_set_signature,
	lasso_samlp_request_abstract_set_signature,
	lasso_samlp_response_abstract_set_signature
for reporting always more errors.
2004-08-01 03:29:43 +00:00
Emmanuel Raviart 255f09ed98 Added Nicolas to authors. 2004-07-22 06:59:03 +00:00
Emmanuel Raviart b71373edae Renamed attribut to attribute. 2004-07-13 09:51:13 +00:00
Valery Febvre 5c9c919917 *** empty log message *** 2004-06-24 00:00:35 +00:00
Valery Febvre a672abf9cc Used new method set_ns() instead of new_ns() (in *_instance_init() methods) 2004-04-17 02:07:23 +00:00
Valery Febvre caa62ddc7a Files moved. Initialy located in lasso/schema/ directory 2004-04-05 22:25:48 +00:00