diff options
| author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-19 00:01:17 +0000 |
|---|---|---|
| committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-19 00:01:17 +0000 |
| commit | 6d021a17b29befff2011d92b49433fde279be056 (patch) | |
| tree | 6e53dc3c3b4655fbb08b64ca752298d73d47aefb | |
| parent | ba8b50b0e7feaaf2ac7fb5d9b2b6e1b4710aa400 (diff) | |
| download | lasso-6d021a17b29befff2011d92b49433fde279be056.tar.gz lasso-6d021a17b29befff2011d92b49433fde279be056.tar.xz lasso-6d021a17b29befff2011d92b49433fde279be056.zip | |
New export type supported (Xml) in _new_from_export() constructor
| -rw-r--r-- | lasso/Attic/protocols/authn_request.c | 3 | ||||
| -rw-r--r-- | lasso/Attic/protocols/authn_response.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lasso/Attic/protocols/authn_request.c b/lasso/Attic/protocols/authn_request.c index 84dca01b..16778a47 100644 --- a/lasso/Attic/protocols/authn_request.c +++ b/lasso/Attic/protocols/authn_request.c @@ -195,6 +195,9 @@ lasso_authn_request_new_from_export(gchar *buffer, request = LASSO_NODE(g_object_new(LASSO_TYPE_AUTHN_REQUEST, NULL)); switch (export_type) { + case lassoNodeExportTypeXml: + lasso_node_import(request, buffer); + break; case lassoNodeExportTypeQuery: gd = lasso_query_to_dict(buffer); diff --git a/lasso/Attic/protocols/authn_response.c b/lasso/Attic/protocols/authn_response.c index 2e2cf7e8..d67fb6c6 100644 --- a/lasso/Attic/protocols/authn_response.c +++ b/lasso/Attic/protocols/authn_response.c @@ -152,7 +152,7 @@ LassoNode* lasso_authn_response_new_from_export(xmlChar *buffer, lassoNodeExportTypes export_type) { - xmlChar *buffer_decoded = xmlMalloc(strlen(buffer)); + xmlChar *buffer_decoded; LassoNode *response = NULL; g_return_val_if_fail(buffer != NULL, NULL); @@ -160,7 +160,11 @@ lasso_authn_response_new_from_export(xmlChar *buffer, response = LASSO_NODE(g_object_new(LASSO_TYPE_AUTHN_RESPONSE, NULL)); switch (export_type) { + case lassoNodeExportTypeXml: + lasso_node_import(response, buffer); + break; case lassoNodeExportTypeBase64: + buffer_decoded = xmlMalloc(strlen(buffer)); xmlSecBase64Decode(buffer, buffer_decoded, strlen(buffer)); lasso_node_import(response, buffer_decoded); xmlFree(buffer_decoded); |
