diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-03-27 15:04:49 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-03-27 15:04:49 +0000 |
| commit | 12744e44fe11810dcb1d0d83bbd6029b23111a57 (patch) | |
| tree | 6a481e917d4c8e6815e3fe478ab7782cc660bce1 | |
| parent | 3705a0f86d6588ffb48285892d19c6bb89b62c68 (diff) | |
SAML 2.0: API for Saml2EncryptedElement decrypt
* lasso/xml/xml_enc.h:
remove old functions
* lasso/xml/private.h:
remove lasso_node_(de/en)crypt from public headers API, they were not
exported anyway. move them to internal header.
* lasso/xml/saml-2.0/saml2_encrypted_element.{c,h}:
add a new decrypt function to convert a EncryptedElement to the
contained encrypted node objects.
* bindings/overrrides.xml:
do not export the new method, wait for implementation of output
arguments.
* lasso/id-ff/server.c:
remove lasso_decrypt_nameid from lasso/id-ff/server.c
| -rw-r--r-- | bindings/overrides.xml | 1 | ||||
| -rw-r--r-- | lasso/xml/private.h | 6 | ||||
| -rw-r--r-- | lasso/xml/saml-2.0/saml2_encrypted_element.c | 36 | ||||
| -rw-r--r-- | lasso/xml/saml-2.0/saml2_encrypted_element.h | 3 | ||||
| -rw-r--r-- | lasso/xml/xml_enc.h | 8 |
5 files changed, 44 insertions, 10 deletions
diff --git a/bindings/overrides.xml b/bindings/overrides.xml index 061541be..4e5018ba 100644 --- a/bindings/overrides.xml +++ b/bindings/overrides.xml @@ -17,6 +17,7 @@ <param name="subminor"/> <param name="mode" optional="true" default="c:LASSO_CHECK_VERSION_NUMERIC"/> </func> + <func name="lasso_saml2_encrypted_element_decrypt" skip="true"/> <func name="lasso_registry_default_add_direct_mapping" skip="true"/> <func name="lasso_registry_default_add_functional_mapping" skip="true"/> <func name="lasso_registry_default_get_mapping" skip="true"/> diff --git a/lasso/xml/private.h b/lasso/xml/private.h index 9bd87ac5..d8082e3b 100644 --- a/lasso/xml/private.h +++ b/lasso/xml/private.h @@ -146,6 +146,12 @@ gboolean lasso_node_init_from_deflated_query_part(LassoNode *node, char *deflate xmlNode* lasso_node_get_xmlnode_for_any_type(LassoNode *node, xmlNode *cur); +LassoSaml2EncryptedElement* lasso_node_encrypt(LassoNode *lasso_node, + xmlSecKey *encryption_public_key, LassoEncryptionSymKeyType encryption_sym_key_type); + +LassoNode* lasso_node_decrypt(LassoSaml2EncryptedElement* encrypted_element, + xmlSecKey *encryption_private_key); + char* lasso_concat_url_query(char *url, char *query); xmlDocPtr lasso_xml_parse_memory(const char *buffer, int size); diff --git a/lasso/xml/saml-2.0/saml2_encrypted_element.c b/lasso/xml/saml-2.0/saml2_encrypted_element.c index 030732a1..f1107522 100644 --- a/lasso/xml/saml-2.0/saml2_encrypted_element.c +++ b/lasso/xml/saml-2.0/saml2_encrypted_element.c @@ -24,11 +24,17 @@ #include "../private.h" #include "saml2_encrypted_element.h" +#include "../../utils.h" +#include "../../errors.h" +#include "../xml_enc.h" /** * SECTION:saml2_encrypted_element * @short_description: <saml2:EncryptedElement> * + * This element can contain an encrypted XML document fragment, use + * lasso_saml2_encrypted_element_decrypt() to retrieve it. + * * <figure><title>Schema fragment for saml2:EncryptedElement</title> * <programlisting><