Commit Graph

5206 Commits

Author SHA1 Message Date
Benjamin Dauvergne 18a10593fc [provider] fix doc comment 2011-12-08 18:11:46 +01:00
Benjamin Dauvergne 4eb0ae483e [id-ff] move LassoLogout to use LassoSignatureContext 2011-12-08 17:56:31 +01:00
Benjamin Dauvergne ba5746c39f [logging] add an error() macro 2011-12-08 17:56:31 +01:00
Benjamin Dauvergne 641702b346 [id-ff] move LassoLogin to use LassoSignatureContext 2011-12-08 17:56:31 +01:00
Benjamin Dauvergne 5e5c38b451 [core] rename lasso_provider_set_specific_signing_key to lasso_provider_set_server_signing_key 2011-12-05 14:25:34 +01:00
Benjamin Dauvergne a571c7517f [perfs] add command line options, add option to use shared secret key cryptography
Performance with HMAC-SHA1 is 100x the one with 2048 bits RSA.
2011-12-05 13:11:53 +01:00
Benjamin Dauvergne 5ba292521b [core] add the HMAC-SHA1 shared secret signature method 2011-12-05 13:11:53 +01:00
Benjamin Dauvergne 6c7114d5ce [core] refactor lasso_query_verify_signature and lasso_saml2_query_verify_signature
This commit introduces lasso_query_verify_helper which factorize
cryptographic operations.
2011-12-05 13:09:44 +01:00
Benjamin Dauvergne 42ca33315d [tests] use helper macros in id-ff test case 2011-12-05 12:03:31 +01:00
Benjamin Dauvergne 57241e3e86 [core] add lasso_provider_add_key to add other key for signature validation
The added key can be appended or prepended, depending on the need for the key:
 - rollover
 - improving performances (using simpler cryptographic algorithmss using shared secret keys)
2011-12-05 12:03:31 +01:00
Benjamin Dauvergne 109c562260 [core] add method lasso_provider_set_specific_signing_key
Using this method you can specify a signing which will be used for
communication with the specified provider instead of the one configured
on the LassoServer object. The main objective is to allow shared secret
cryptography instead of public key cryptography.
2011-12-05 12:03:14 +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 2a63167627 [core] set the xmlSec log handler globally
The log handler is not set in lasso_init().
2011-12-05 12:03:13 +01:00
Benjamin Dauvergne 0c45b252dc [saml2] introduce a lasso_saml2_assertion_get_audirence_restrictions to factorize some code 2011-12-05 12:03:13 +01:00
Benjamin Dauvergne cd017964d0 [core] introduce the LassoSignatureContext context, to pass around signature parameters
This structure is used to pass around the signature algorithm
and the signature key.
2011-12-05 12:03:13 +01:00
Benjamin Dauvergne 71721b370c [core] add a lasso_base64_decode function 2011-12-05 12:03:13 +01:00
Benjamin Dauvergne dfacafb3b0 [core] replace explicit allocation of LassoProviderPrivate by use of g_type_class_add_private
The private part is allocated contiguously to the public structure data.
2011-12-05 12:03:13 +01:00
Benjamin Dauvergne dd5afa9522 [configure.ac] fix compilation on Mac Os X 2011-12-05 12:03:13 +01:00
Benjamin Dauvergne 490cc01bf2 [xml] use lasso_node_export_to_query_with_password to implement lasso_node_export_to_query 2011-12-05 12:03:13 +01:00
Benjamin Dauvergne e9212301d3 [tools] fix lasso_sha1 to return a glib allocated string 2011-12-05 12:03:13 +01:00
Benjamin Dauvergne 5c2fc3b5dc [id-ff/saml2] add a lasso_server_add_provider2
It allows to add LassoProvider objects directly to a LassoServer object,
without using the metadata loading methods.
2011-12-05 12:03:12 +01:00
Benjamin Dauvergne 10edf69bfc [utils] add lasso_crypto_memequal function
This method compare byte strings in constant time.
2011-12-05 12:03:12 +01:00
Benjamin Dauvergne 9de6450f4c [tools] add a LassoSignatureContext structure to pass signature parameters around
Signature parameters are mainly a LassoSignatureMethod and a xmlSecKey.
2011-12-05 12:03:12 +01:00
Benjamin Dauvergne 5a9a447bad [xml] add an inline function to validate LassoSignatureMethod values
- add also a LASSO_SIGNATURE_METHOD_NONE value
2011-12-05 12:03:12 +01:00
Benjamin Dauvergne 4ba067b828 [utils] add lasso_transfer_xml_node macros 2011-12-05 12:03:12 +01:00
Benjamin Dauvergne ad51948373 [core] simplify lasso_provider_load_public_key 2011-12-05 12:03:12 +01:00
Benjamin Dauvergne 654f9523c2 [web] fix link on the download page 2011-11-29 13:01:32 +01:00
Benjamin Dauvergne 29800377a3 Merge branch 'multi-certificates' 2011-11-29 12:36:47 +01:00
Benjamin Dauvergne 92ebef91f5 Merge branch 'excl-c14n-fix' 2011-11-29 11:05:29 +01:00
Benjamin Dauvergne 70aeff17d2 [web] add release news for release 2.3.6 2011-11-29 10:58:42 +01:00
Benjamin Dauvergne 5f25443c14 [release] 2.3.6 2011-11-29 10:42:16 +01:00
Benjamin Dauvergne b785881e53 [integration tests] does not use full leak report 2011-11-22 18:51:49 +01:00
Benjamin Dauvergne d72cc31347 [integration tests] show more callers when using valgrind memcheck looking for leaks in authentic and lcs 2011-11-22 18:51:49 +01:00
Benjamin Dauvergne 95137b1ad1 [tests] add test for rollover on the SP side, i.e. rollover of encryption keys
This test case is the first to abstract the workflow between two
LassoLogin object (for the idp and sp side). This part of the code could
be used to simplify the code of other tests in the future.
2011-11-22 18:51:49 +01:00
Benjamin Dauvergne fd7af65e91 [core] do not emit a warning for expected decryption errors
The only expected decryption error is on decryption of the symetric key
used to crypt the data. All other errors are critical and must be
logged.

Client of lasso_node_decrypt_xmlnode can then log the decryption failure
of the symetric if they tried with all possible keys (key rollover
case).
2011-11-22 18:51:49 +01:00
Benjamin Dauvergne 5957f3e230 [core] add a new class of errors for xml encryption errors
add LASSO_XMLENC_ERROR_INVALID_ENCRYPTED_DATA for generic unrecoverable
xml decryption errors.
2011-11-22 18:51:12 +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 9d13fb1933 [core] fix wrong XML canonicalization when assertion is extracted without its namespace context 2011-11-22 00:18:33 +01:00
Benjamin Dauvergne 699f0e42d5 [misc] apply changes to remove warning blocking compilation with gcc 4.5.2 and php 5.3.5
- gcc now warns when you compate a typedef to the anonymous enum which
   define it.
 - some inline function in the zend.h header do compare between signed
   and unsigned char.
2011-11-21 22:10:12 +01:00
Benjamin Dauvergne 5192cdf7a0 [core] multiple decryption keys support
This commit complements the support for multiple signing certificate
support in the metadata files. The use-case is still key roll-over.

The structure LassoServerPrivateData was changed to accomodate multiple
decryption keys, and so:

 xmlSecKey *encryption_private_key

became:

 GList *encryption_private_keys

All uses of this key were replaced by a loop over this list, terminating
with the first key to be able to decrypt the content.

The private key passed to lasso_server_new() or
lasso_server_new_from_buffers() is first added to the list of decryption
keys. Any other call to
lasso_server_set_encryption_private_key_with_password() or
lasso_server_set_encryption_private_key() will add a new key to the
list.
2011-11-21 10:25:03 +01:00
Benjamin Dauvergne 055b405387 Merge branch 'extension-abi-respecting' 2011-11-18 15:36:57 +01:00
Benjamin Dauvergne f286c7cb5c [saml2] add missing extension point for LassoSaml2SubjectConfirmationData
- it can support any content and any attribute without validation
   xs:any with processContents="lax"
2011-11-18 15:36:41 +01:00
Benjamin Dauvergne 3ec4a2f294 [xml] allow to store XSchema data into a private stucture
- added new macros SNIPPET_STRUCT_MEMBER and SNIPPET_STRUCT_MEMBER_P
   replaces use of G_STRUCT_MEMBER/_P macros.
 - we use the GType of the class containing a given XmlSnippet to find
   the proper private structure.
 - added flag SNIPPET_PRIVATE to state XmlSnippet whose value
   should be extracted from the private structure and not the public
   one.
2011-11-18 15:36:41 +01:00
Benjamin Dauvergne 0e0511c686 [binding python] prevent warning in wrapper_top.c under hardy with gcc 4.2.4 2011-11-18 15:36:41 +01:00
Benjamin Dauvergne 773cdab883 [core] add missing break to switch/case 2011-11-18 15:36:40 +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 4552f30293 [misc] apply changes to remove warning blocking compilation with gcc 4.5.2 and php 5.3.5
- gcc now warns when you compate a typedef to the anonymous enum which
   define it.
 - some inline function in the zend.h header do compare between signed
   and unsigned char.
2011-10-18 17:33:43 +02:00
Benjamin Dauvergne b8cf183c37 [xml saml-2.0] add missing annotation for binding generation to header for LassoKeyInformationDataType 2011-10-18 17:32:56 +02: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