Commit Graph

58 Commits

Author SHA1 Message Date
Benjamin Dauvergne 81fad67ad2 saml-2.0: improve support for free content inside samlp2:Extensions (fixes #18581)
Four new accesors:

	lasso_samlp2_extensions_get_any
	lasso_samlp2_extensions_set_any
	lasso_samlp2_extensions_get_attributes
	lasso_samlp2_extensions_set_attributes

The two new pseudo field are fully supported in the python binding.

	node = lasso.Samlp2Extensions()
	node.any = '<test>ok</test>'
	node.attributes = {'{http://entrouvert.org/}attribute1': 'value'}
	print node.dump()
2017-09-11 15:14:41 +02:00
John Dennis 9629925c1e Add LassoNode objects for ECP and PAOS
The SAMLv2 protocol defines 5 XML types which we need to map to
LassoNode objectes so thay can be serialized from XML and back into
XML.

ecp:RelayState
ecp:Request
ecp:Response
paos:Request
paso:Response

This patch addes these 5 new LassoNode's and updates the build
configuration to include them.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
Houzéfa Abbasbhay 4c79280ed8 Python 3: Fix Python 2 support (use six.print_) 2015-02-12 19:21:12 +01:00
Houzéfa Abbasbhay e5d5acf9df Python 3:
- file(...) -> open(...)
- print ... -> print(...)
- print >> fd, ... -> print(..., file=fd)
- basestring -> str
- map(...) -> list(map(...))
2015-02-12 19:21:11 +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 591a47002d [xml] change saml_advice.h to declarer the real node type
It also needed a change to bindings.py to parse struct as well as
typedef node classes.
2011-12-16 11:39:19 +01:00
Benjamin Dauvergne 8002502152 [bindings] fix bug introduced in last commit 2011-11-08 01:10:22 +01:00
Benjamin Dauvergne 3c6970e047 [bindings] fix tree traversal on windows
- The file path separator is not / on all platforms, so do not use it
   when matching filenames.
2011-10-18 17:35:55 +02:00
Benjamin Dauvergne c02711bf79 [Bindings] change prefix for ignoring soap_binding related files 2010-09-30 11:21:09 +02:00
Benjamin Dauvergne 5f7a08acb3 [Bindings] restore presence of SOAP nodes
The node to exclude when ID-WSF is disactivated was soap_binding_ ones.
2010-09-29 15:56:59 +02:00
Benjamin Dauvergne 5927c51f9e SAML 2.0 XML: add header listing strings from XML schema 2010-03-27 16:51:16 +00:00
Benjamin Dauvergne 0ff8c53f44 Bindings: parse defines refering to other defines
* bindings/bindings.py:
   Allow to build constants using other constants (prefix string), the
   constant type is retrieved from the prefix existing record.
2010-02-17 10:14:45 +00:00
Benjamin Dauvergne fd3f9f2277 fix bad operation in bindings.py 2010-02-05 00:44:52 +00:00
Benjamin Dauvergne 7808c4cffa Bindings: restore ID-WSF constants, improve python getters,
* bindings/bindings.py:
   parse idwsf_strings.h to get ID-WSF constants.
 * bindings/utils.py:
   add an is_rc check function, to check for 'error code' return type.
 * bindings/perl/lang.py:
   only raise errors for 'int' or 'gint' return type
 * bindings/python/lang.py:
   - always create a normal function binding.
   - for functions starting with 'get' try to create a corresponding
     property, but if a corresponding member already exists, fails, and
     print a warning about getter function/member field clash.
   - make type dispatching on return_type more explicite.
2010-02-04 22:24:06 +00:00
Benjamin Dauvergne f0bb6f81ba Bindings: os.path.relpath is only present since python 2.6, add a local implementation for older python versions 2010-02-01 01:18:03 +00:00
Benjamin Dauvergne 65c56d121e Bindings: use 'absolute' header paths to produces bindings
* bindings/bindings.py:
   if files from bindings are using absolute instead of relatives header
   paths they can be independant of the lasso source.
2010-01-29 16:42:37 +00:00
Benjamin Dauvergne 91c6efceaa in bindings.py, change header paths 2010-01-29 16:42:32 +00:00
Benjamin Dauvergne b2f07a0640 Bindings: in bindings.py, fix regexp and annotation parsing for optional arguments and their default values 2010-01-29 00:43:51 +00:00
Benjamin Dauvergne a1ae48d2ef Bindings: better parse oftype annotation for hashtable, allow to skip structures
* bindings/bindings.py:
   add possibility to skip generating bindings for structures to
   overrides.xml.
   parse element-type annotation /* of XXX */ for hashtable objects.
   output to stderr warning about skipped objects.
   parse idwsf_strings.h
 * bindings/overrides.xml:
   skip more ID-WSF 1.0 functions in java and perl.
   skip structure LassoAuthentication.
2010-01-28 15:31:46 +00:00
Benjamin Dauvergne c312a6f91a Bindings: add a new perl binding using the new binding infrastructure
* XS files is autogenerated using bindings/binding.py model of the
   Lasso API. All constants are in the Lasso::Constants package, the
   LASSO_ prefix is removed.
   All classes are now Lasso::ClassName, field accessor also serves as
   setters, i.e you can do this:
   $name_id = Lasso::Saml2NameID::new();
   $name_id->content('coin');
   print $name_id->content;

   Is still missing:
    - a lot of test files,
    - support for hashtables,
    - and throwing exceptions when return code is non-zero.
2010-01-25 23:47:56 +00:00
Benjamin Dauvergne 9f57d30ebc Tools: add script to generate a listing of Lasso ABI
* tools/api.py:
   use parser from the binding generator to output a list of symbols
 * bindings/bindings.py;
   add private flags to not clobber 'private' fields of structures or
   methods not exported in bindings like _get_type.
2010-01-14 16:18:42 +00:00
Benjamin Dauvergne fcd8739f49 Bindings: simplify GList handling 2010-01-04 09:16:00 +00:00
Benjamin Dauvergne f61c178bec Bindings: in bindings.py, parse '(in)' gobject-introspection annotation, in utils.py, use it to reverse default annotation for pointer of pointers
Bindings: in bindings.py, improve regular expression for declarations

Bindings: parse gobject-introspection annotation in return value
documentation, add cast to C calls when parameter type is const in java
binding, problem arise with const char ** arrays
2010-01-04 09:13:43 +00:00
Benjamin Dauvergne 003b2511ab Bindings: do not stop on failing to parse a declaration, but skip the function and print a warning 2010-01-04 09:13:41 +00:00
Benjamin Dauvergne 5224c7cf67 Bindings: make the binding infrastructure understand GObject-introspections annotations
* bindings/bindings.py
 * bindings/utils.py:
   add convenience function to treat arguments tuple:
   (type,name,{annotations}).
   introduce new argument options, fix that arguments are 3-tuple of the
   form (type,name,annotations), where annotations is a dictionary.
   Key of this dictionnary can be:
    - optional, wheter the argument is necessary, it means it has a
      default value.
    - out, means that the pointer is a pointer of pointer, for bindings
      that can return exceptions, it will be returned instead of the
      integer error code, the only way to access error codes will be
      exceptions.
    - element-type, contained type of a list or an array,
    - key-type, value-type, type of respectively the key and value of a
      GHashTable.
    - transfer, wheter a the callee(for arguments)/caller(for return
      values) owns the values passed, it can be none,container(if the
      callee/caller only owns the container not the contained value) or
      full.
    doc.parameters is now a 3-tuple of (attribute-name,
    attribute-description, attribute-annotations) where
    attribute-annotations is a string of the form '(option1)(option2
    option-arguments) etc.'.
   - add predicates for xml, list and time_t values. improve predicates
     for cstring and const modifier.

*  bindings/overrides.xml:
    'out' arguments are not well supported for java, so skip functions
    using them.

 *  bindings/java/lang.py bindings/php5/php_code.py
    bindings/php5/wrapper_source.py bindings/python/lang.py:
    - update language specifig binding generators for handling new
      annotations.
    - improve python method declaration, handle optional arguments with
      default values, factorize this chode in two methods,
      get_python_arg_decl and defval_to_python_value.

 *  bindings/python/tests/Makefile.am
    bindings/python/tests/idwsf1_tests.py
    bindings/python/tests/idwsf2_tests.py:
    make test work with out of source build dir.
2010-01-04 09:13:36 +00:00
Benjamin Dauvergne 4467bf8938 Remove beginning of a PHP4 binding 2009-12-08 10:14:59 +00:00
Benjamin Dauvergne 49eb8da269 XML: Add all including header fil for saml2, id-ff and id-wsf
* lasso/xml/xml_idff.h:
   this header file reference all id-ff 1.2 elements
 * lasso/xml/xml_idwsf.h:
   this header file reference all id-wsf 1.0 elements
 * lasso/xml/saml-2.0/xml_saml2.h:
   this header file reference all saml-2.0 elements
2009-08-26 15:15:18 +00:00
Benjamin Dauvergne a97feba422 Bindings: for functions that must be totally skiped do it during parsing
* bindings/bindings.py:
   parsing of argument type is still not advanced enough, so in order to
   remove spurious warnings, skip function directly during parsing just
   before the treatment of function signature.
2009-08-26 15:15:02 +00:00
Benjamin Dauvergne 84e5c3b66b Bindings: skip DEPRECATED variables
* bindings/bindings.py: when parsing headers, skipped deprecated struct
   fields.
2009-03-27 15:06:24 +00:00
Benjamin Dauvergne 46643326fd Bindings: fix documentation parsing
* bindings/bindings.py:
   fix regex to match documentation (remove condition terminating on
   '**/')
   print error messages to stderr.
 * bindings/java/lang.py: remove commented debugging code
2009-03-27 15:04:46 +00:00
Damien Laniel 88f6faaf5d fixed parsing of OFTYPE 2009-02-05 16:56:29 +00:00
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Benjamin Dauvergne 99b303eab3 Lookup wrapper_{top,bottom}.c files in the src_dir, useful for VPATH build
(i.e. distcheck). Add top_srcdir/binings to python syspath.
2008-08-05 14:53:35 +00:00
Benjamin Dauvergne 207891ff29 * Fix blanks mismatch (space in *.c and *h files or tabs in *.py files) and formatting 2008-08-05 14:53:29 +00:00
Benjamin Dauvergne 1fc655ffc3 add TODOs for parsing OFTYPE in other positions 2008-08-05 14:53:07 +00:00
Benjamin Dauvergne 1fae093527 Move all python binding related files inside the python subdirectory 2008-08-05 14:52:52 +00:00
Benjamin Dauvergne b573de5a67 * bindings/bindings.py: support const modifier on this argument 2008-08-01 14:10:50 +00:00
Frédéric Péters 59af6e1056 look for ElementTree in yet another place 2008-04-29 21:07:28 +00:00
Frédéric Péters 3e00001408 [project @ fpeters@0d.be-20080416142729-kpuwdj5m75qe5vnc]
added php4 binding from benjamin but disabled it


Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-04-16 16:27:29.948000+02:00
2008-04-29 12:10:27 +00:00
Frédéric Péters 3121f2a114 [project @ fpeters@0d.be-20080407154605-x6j5u3k1t53vzary]
look for alternative ElementTree implementation

Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-04-07 17:46:05.507000+02:00
2008-04-29 12:10:03 +00:00
Frédéric Péters 2fbda41c8e [project @ fpeters@0d.be-20080406111623-pf8iq94lrfu2w2un]
extended the skip attribute to accept more values

Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-04-06 13:16:23.574000+02:00
2008-04-29 12:09:47 +00:00
Frédéric Péters 81ef2515ce [project @ fpeters@0d.be-20080326094754-cw66nuog62q06ekk]
merging benjamin branch

Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-03-26 10:47:54.384000+01:00
2008-04-29 12:08:43 +00:00
Frédéric Péters 1123dac682 [project @ fpeters@0d.be-20080326084502-krmekmh7mokemn18]
possibility to qualify GList* parameters

Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-03-26 09:45:02.789000+01:00
2008-04-29 12:08:35 +00:00
Frédéric Péters 33ae3080ea [project @ fpeters@0d.be-20080325181554-raqz9a721r2vjo5t]
return type qualifier to know what is the content of a GList*

Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-03-25 19:15:54.747000+01:00
2008-04-29 12:08:31 +00:00
Frédéric Péters 7b549d0ce3 [project @ fpeters@0d.be-20080325172346-eitu3onvzps4b30z]
merging benjamin stuff and adding --enable-id-wsf when id-wsf is asked


Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-03-25 18:23:46.535000+01:00
2008-04-29 12:08:27 +00:00
Frédéric Péters 1e3892f03a [project @ fpeters@0d.be-20080222101641-d32t8a8wtocet4qq]
more __repr__ like

Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-02-22 11:16:41.648000+01:00
2008-04-29 12:07:15 +00:00
Frédéric Péters b2c6027ad1 [project @ fpeters@0d.be-20080222093656-l6a09ccadxdz9qrs]
merging benjamin branch

Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-02-22 10:36:56.421000+01:00
2008-04-29 12:07:06 +00:00
Frédéric Péters 14003fc2c1 [project @ fpeters@0d.be-20080217144029-zleb5lw82iwcqqvj]
space after comma

Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-02-17 15:40:29.819000+01:00
2008-04-29 12:06:42 +00:00
Frédéric Péters 3b93e1b952 [project @ fpeters@0d.be-20080217115557-8qtcrc1vzb75f75c]
merged Benjamin branch


Original author: Frederic Peters <fpeters@0d.be>
Date: 2008-02-17 12:55:57.088000+01:00
2008-04-29 12:06:30 +00:00
Frédéric Péters 073b050438 [project @ fpeters@0d.be-20071122144503-m1ya6db2hzlijhmt]
parse docstrings (such as the parsed form is available to all languages) and
format them as epydoc in the python binding


Original author: Frederic Peters <fpeters@0d.be>
Date: 2007-11-22 15:45:03.610000+01:00
2008-04-29 12:06:21 +00:00