diff options
Diffstat (limited to 'lasso/Attic/protocols')
-rw-r--r-- | lasso/Attic/protocols/authn_request.c | 11 | ||||
-rw-r--r-- | lasso/Attic/protocols/authn_request_envelope.h | 4 | ||||
-rw-r--r-- | lasso/Attic/protocols/authn_response.c | 2 | ||||
-rw-r--r-- | lasso/Attic/protocols/authn_response.h | 12 | ||||
-rw-r--r-- | lasso/Attic/protocols/authn_response_envelope.h | 6 | ||||
-rw-r--r-- | lasso/Attic/protocols/federation.c | 4 | ||||
-rw-r--r-- | lasso/Attic/protocols/federation.h | 4 | ||||
-rw-r--r-- | lasso/Attic/protocols/federation_termination_notification.c | 6 | ||||
-rw-r--r-- | lasso/Attic/protocols/federation_termination_notification.h | 2 | ||||
-rw-r--r-- | lasso/Attic/protocols/name_identifier_mapping_request.c | 4 | ||||
-rw-r--r-- | lasso/Attic/protocols/name_identifier_mapping_request.h | 4 | ||||
-rw-r--r-- | lasso/Attic/protocols/name_identifier_mapping_response.c | 10 | ||||
-rw-r--r-- | lasso/Attic/protocols/name_identifier_mapping_response.h | 15 | ||||
-rw-r--r-- | lasso/Attic/protocols/request.c | 4 | ||||
-rw-r--r-- | lasso/Attic/protocols/response.c | 6 | ||||
-rw-r--r-- | lasso/Attic/protocols/response.h | 2 |
16 files changed, 53 insertions, 43 deletions
diff --git a/lasso/Attic/protocols/authn_request.c b/lasso/Attic/protocols/authn_request.c index c9fa935b..cf78c0c5 100644 --- a/lasso/Attic/protocols/authn_request.c +++ b/lasso/Attic/protocols/authn_request.c @@ -185,10 +185,11 @@ LassoNode* lasso_authn_request_new_from_export(gchar *buffer, lassoNodeExportType export_type) { - LassoNode *request=NULL, *authn_context=NULL, *scoping; + LassoNode *request = NULL, *authn_context = NULL, *scoping; LassoNode *request_node, *soap_node; GData *gd; - xmlChar *str, *export; + xmlChar *str, *buffer_decoded; + gchar *export; GPtrArray *array; gint i; @@ -345,6 +346,10 @@ lasso_authn_request_new_from_export(gchar *buffer, g_datalist_clear(&gd); break; case lassoNodeExportTypeBase64: + buffer_decoded = xmlMalloc(strlen(buffer)); + xmlSecBase64Decode(buffer, buffer_decoded, strlen(buffer)); + lasso_node_import(request, buffer_decoded); + xmlFree(buffer_decoded); break; case lassoNodeExportTypeSoap: soap_node = lasso_node_new_from_dump(buffer); @@ -352,7 +357,7 @@ lasso_authn_request_new_from_export(gchar *buffer, lassoLibHRef, NULL); export = lasso_node_export(request_node); lasso_node_import(request, export); - xmlFree(export); + g_free(export); lasso_node_destroy(request_node); lasso_node_destroy(soap_node); break; diff --git a/lasso/Attic/protocols/authn_request_envelope.h b/lasso/Attic/protocols/authn_request_envelope.h index 7e722d89..d48410cc 100644 --- a/lasso/Attic/protocols/authn_request_envelope.h +++ b/lasso/Attic/protocols/authn_request_envelope.h @@ -60,11 +60,11 @@ LASSO_EXPORT LassoNode* lasso_authn_request_envelope_new (LassoAuth xmlChar *providerID, xmlChar *assertionConsumerServiceURL); -LASSO_EXPORT LassoNode* lasso_authn_request_envelope_get_authnRequest (LassoAuthnRequestEnvelope *request); - LASSO_EXPORT LassoNode* lasso_authn_request_envelope_new_from_export (gchar *buffer, lassoNodeExportType export_type); +LASSO_EXPORT LassoNode* lasso_authn_request_envelope_get_authnRequest (LassoAuthnRequestEnvelope *request); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/lasso/Attic/protocols/authn_response.c b/lasso/Attic/protocols/authn_response.c index da644687..b3e4d893 100644 --- a/lasso/Attic/protocols/authn_response.c +++ b/lasso/Attic/protocols/authn_response.c @@ -165,7 +165,7 @@ lasso_authn_response_new(char *providerID, } LassoNode* -lasso_authn_response_new_from_export(xmlChar *buffer, +lasso_authn_response_new_from_export(gchar *buffer, lassoNodeExportType export_type) { xmlChar *buffer_decoded; diff --git a/lasso/Attic/protocols/authn_response.h b/lasso/Attic/protocols/authn_response.h index 8c547c5e..90eb9144 100644 --- a/lasso/Attic/protocols/authn_response.h +++ b/lasso/Attic/protocols/authn_response.h @@ -53,15 +53,15 @@ struct _LassoAuthnResponseClass { LassoLibAuthnResponseClass parent; }; -LASSO_EXPORT GType lasso_authn_response_get_type (void); +LASSO_EXPORT GType lasso_authn_response_get_type (void); -LASSO_EXPORT LassoNode* lasso_authn_response_new (char *providerID, - LassoNode *request); +LASSO_EXPORT LassoNode* lasso_authn_response_new (char *providerID, + LassoNode *request); -LASSO_EXPORT LassoNode* lasso_authn_response_new_from_export (xmlChar *buffer, - lassoNodeExportType type); +LASSO_EXPORT LassoNode* lasso_authn_response_new_from_export (gchar *buffer, + lassoNodeExportType type); -LASSO_EXPORT xmlChar* lasso_authn_response_get_status (LassoAuthnResponse *response); +LASSO_EXPORT xmlChar* lasso_authn_response_get_status (LassoAuthnResponse *response); #ifdef __cplusplus } diff --git a/lasso/Attic/protocols/authn_response_envelope.h b/lasso/Attic/protocols/authn_response_envelope.h index 7445a0b6..7c7ab43f 100644 --- a/lasso/Attic/protocols/authn_response_envelope.h +++ b/lasso/Attic/protocols/authn_response_envelope.h @@ -58,13 +58,13 @@ LASSO_EXPORT GType lasso_authn_response_envelope_get_type LASSO_EXPORT LassoNode* lasso_authn_response_envelope_new (LassoAuthnResponse *authnResponse, xmlChar *assertionConsumerServiceURL); +LASSO_EXPORT LassoNode* lasso_authn_response_envelope_new_from_export (gchar *buffer, + lassoNodeExportType export_type); + LASSO_EXPORT xmlChar* lasso_authn_response_envelope_get_assertionConsumerServiceURL (LassoAuthnResponseEnvelope *response); LASSO_EXPORT LassoNode* lasso_authn_response_envelope_get_authnResponse (LassoAuthnResponseEnvelope *response); -LASSO_EXPORT LassoNode* lasso_authn_response_envelope_new_from_export (gchar *buffer, - lassoNodeExportType export_type); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/lasso/Attic/protocols/federation.c b/lasso/Attic/protocols/federation.c index 194fbb54..bcdb6cde 100644 --- a/lasso/Attic/protocols/federation.c +++ b/lasso/Attic/protocols/federation.c @@ -61,7 +61,7 @@ lasso_federation_destroy(LassoFederation *federation) g_object_unref(G_OBJECT(federation)); } -xmlChar * +gchar * lasso_federation_dump(LassoFederation *federation) { LassoNode *federation_node, *nameIdentifier; @@ -276,7 +276,7 @@ lasso_federation_new(gchar *remote_providerID) } LassoFederation* -lasso_federation_new_from_dump(xmlChar *dump) +lasso_federation_new_from_dump(gchar *dump) { LassoFederation *federation; diff --git a/lasso/Attic/protocols/federation.h b/lasso/Attic/protocols/federation.h index 387863c8..ff0f5b74 100644 --- a/lasso/Attic/protocols/federation.h +++ b/lasso/Attic/protocols/federation.h @@ -69,13 +69,13 @@ LASSO_EXPORT GType lasso_federation_get_type (voi LASSO_EXPORT LassoFederation* lasso_federation_new (gchar *remote_providerID); -LASSO_EXPORT LassoFederation* lasso_federation_new_from_dump (xmlChar *dump); +LASSO_EXPORT LassoFederation* lasso_federation_new_from_dump (gchar *dump); LASSO_EXPORT LassoFederation* lasso_federation_copy (LassoFederation *federation); LASSO_EXPORT void lasso_federation_destroy (LassoFederation *federation); -LASSO_EXPORT xmlChar* lasso_federation_dump (LassoFederation *federation); +LASSO_EXPORT gchar* lasso_federation_dump (LassoFederation *federation); LASSO_EXPORT LassoNode* lasso_federation_get_remote_nameIdentifier (LassoFederation *federation); diff --git a/lasso/Attic/protocols/federation_termination_notification.c b/lasso/Attic/protocols/federation_termination_notification.c index fba882de..77168979 100644 --- a/lasso/Attic/protocols/federation_termination_notification.c +++ b/lasso/Attic/protocols/federation_termination_notification.c @@ -111,7 +111,7 @@ lasso_federation_termination_notification_new(const xmlChar *providerID, } LassoNode * -lasso_federation_termination_notification_new_from_query(const xmlChar *query) +lasso_federation_termination_notification_new_from_query(const gchar *query) { LassoNode *notification, *identifier; xmlChar *str; @@ -157,7 +157,7 @@ lasso_federation_termination_notification_new_from_query(const xmlChar *query) } LassoNode * -lasso_federation_termination_notification_new_from_soap(const xmlChar *buffer) +lasso_federation_termination_notification_new_from_soap(const gchar *buffer) { LassoNode *notification; LassoNode *envelope, *lassoNode_notification; @@ -183,7 +183,7 @@ lasso_federation_termination_notification_new_from_soap(const xmlChar *buffer) LassoNode* -lasso_federation_termination_notification_new_from_export(const xmlChar *buffer, +lasso_federation_termination_notification_new_from_export(const gchar *buffer, lassoNodeExportType export_type) { LassoNode *notification; diff --git a/lasso/Attic/protocols/federation_termination_notification.h b/lasso/Attic/protocols/federation_termination_notification.h index 1fdaf011..1882b4fa 100644 --- a/lasso/Attic/protocols/federation_termination_notification.h +++ b/lasso/Attic/protocols/federation_termination_notification.h @@ -59,7 +59,7 @@ LASSO_EXPORT LassoNode* lasso_federation_termination_notification_new const xmlChar *nameQualifier, const xmlChar *format); -LASSO_EXPORT LassoNode* lasso_federation_termination_notification_new_from_export (const xmlChar *export, +LASSO_EXPORT LassoNode* lasso_federation_termination_notification_new_from_export (const gchar *export, lassoNodeExportType export_type); #ifdef __cplusplus diff --git a/lasso/Attic/protocols/name_identifier_mapping_request.c b/lasso/Attic/protocols/name_identifier_mapping_request.c index 46a81632..7821afcb 100644 --- a/lasso/Attic/protocols/name_identifier_mapping_request.c +++ b/lasso/Attic/protocols/name_identifier_mapping_request.c @@ -118,7 +118,7 @@ lasso_name_identifier_mapping_request_new(const xmlChar *providerID, } LassoNode * -lasso_name_identifier_mapping_request_new_from_query(const xmlChar *query) +lasso_name_identifier_mapping_request_new_from_query(const gchar *query) { LassoNode *request, *identifier; xmlChar *str; @@ -171,7 +171,7 @@ lasso_name_identifier_mapping_request_new_from_query(const xmlChar *query) } LassoNode * -lasso_name_identifier_mapping_request_new_from_soap(const xmlChar *buffer) +lasso_name_identifier_mapping_request_new_from_soap(const gchar *buffer) { LassoNode *request; LassoNode *envelope, *lassoNode_request; diff --git a/lasso/Attic/protocols/name_identifier_mapping_request.h b/lasso/Attic/protocols/name_identifier_mapping_request.h index bd40d5e1..86733447 100644 --- a/lasso/Attic/protocols/name_identifier_mapping_request.h +++ b/lasso/Attic/protocols/name_identifier_mapping_request.h @@ -59,8 +59,8 @@ LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_request_new const xmlChar *format); -LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_request_new_from_query (const xmlChar *query); -LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_request_new_from_soap (const xmlChar *buffer); +LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_request_new_from_query (const gchar *query); +LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_request_new_from_soap (const gchar *buffer); #ifdef __cplusplus } diff --git a/lasso/Attic/protocols/name_identifier_mapping_response.c b/lasso/Attic/protocols/name_identifier_mapping_response.c index ed14fe4c..7a36115d 100644 --- a/lasso/Attic/protocols/name_identifier_mapping_response.c +++ b/lasso/Attic/protocols/name_identifier_mapping_response.c @@ -125,7 +125,7 @@ lasso_name_identifier_mapping_response_new(const xmlChar *providerID, } LassoNode * -lasso_name_identifier_mapping_response_new_from_dump(const xmlChar *buffer) +lasso_name_identifier_mapping_response_new_from_dump(const gchar *buffer) { LassoNode *response; @@ -137,7 +137,7 @@ lasso_name_identifier_mapping_response_new_from_dump(const xmlChar *buffer) /* build a NameIdentifierMappingResponse from a query form NameIdentifierMappingResponse */ LassoNode * -lasso_name_identifier_mapping_response_new_from_query(const xmlChar *query) +lasso_name_identifier_mapping_response_new_from_query(const gchar *query) { LassoNode *response; GData *gd; @@ -182,7 +182,7 @@ lasso_name_identifier_mapping_response_new_from_query(const xmlChar *query) /* build a NameIdentifierMappingRespose from a soap form NameIdentifierMappingRequest */ LassoNode * -lasso_name_identifier_mapping_response_new_from_request_soap(const xmlChar *buffer, +lasso_name_identifier_mapping_response_new_from_request_soap(const gchar *buffer, const xmlChar *providerID, const xmlChar *statusCodeValue) { @@ -199,7 +199,7 @@ lasso_name_identifier_mapping_response_new_from_request_soap(const xmlChar *buff } LassoNode * -lasso_name_identifier_mapping_response_new_from_soap(const xmlChar *buffer) +lasso_name_identifier_mapping_response_new_from_soap(const gchar *buffer) { LassoNode *response; LassoNode *envelope, *lassoNode_response; @@ -225,7 +225,7 @@ lasso_name_identifier_mapping_response_new_from_soap(const xmlChar *buffer) /* build a NameIdentifierMappingResponse from a query form NameIdentifierMappingRequest */ LassoNode * -lasso_name_identifier_mapping_response_new_from_request_query(const xmlChar *query, +lasso_name_identifier_mapping_response_new_from_request_query(const gchar *query, const xmlChar *providerID, const xmlChar *statusCodeValue) { diff --git a/lasso/Attic/protocols/name_identifier_mapping_response.h b/lasso/Attic/protocols/name_identifier_mapping_response.h index 3cb3ee74..4d848509 100644 --- a/lasso/Attic/protocols/name_identifier_mapping_response.h +++ b/lasso/Attic/protocols/name_identifier_mapping_response.h @@ -54,17 +54,22 @@ struct _LassoNameIdentifierMappingResponseClass { }; LASSO_EXPORT GType lasso_name_identifier_mapping_response_get_type (void); + LASSO_EXPORT LassoNode* lasso_name_identifier_mapping_response_new (const xmlChar *providerID, const xmlChar *statusCodeValue, LassoNode *request); -LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_response_new_from_dump (const xmlChar *buffer); -LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_response_new_from_query (const xmlChar *query); -LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_response_new_from_request_soap (const xmlChar *buffer, +LASSO_EXPORT LassoNode* lasso_name_identifier_mapping_response_new_from_dump (const gchar *buffer); + +LASSO_EXPORT LassoNode* lasso_name_identifier_mapping_response_new_from_query (const gchar *query); + +LASSO_EXPORT LassoNode* lasso_name_identifier_mapping_response_new_from_request_soap (const gchar *buffer, const xmlChar *providerID, const xmlChar *statusCodeValue); -LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_response_new_from_soap (const xmlChar *buffer); -LASSO_EXPORT LassoNode *lasso_name_identifier_mapping_response_new_from_request_query (const xmlChar *query, + +LASSO_EXPORT LassoNode* lasso_name_identifier_mapping_response_new_from_soap (const gchar *buffer); + +LASSO_EXPORT LassoNode* lasso_name_identifier_mapping_response_new_from_request_query (const gchar *query, const xmlChar *providerID, const xmlChar *statusCodeValue); diff --git a/lasso/Attic/protocols/request.c b/lasso/Attic/protocols/request.c index dd9b195c..1776045c 100644 --- a/lasso/Attic/protocols/request.c +++ b/lasso/Attic/protocols/request.c @@ -109,7 +109,7 @@ lasso_request_new_from_export(gchar *buffer, lassoNodeExportType export_type) { LassoNode *request=NULL, *soap_node, *request_node; - xmlChar *export; + gchar *export; g_return_val_if_fail(buffer != NULL, NULL); @@ -128,7 +128,7 @@ lasso_request_new_from_export(gchar *buffer, lassoSamlProtocolHRef, NULL); export = lasso_node_export(request_node); lasso_node_import(request, export); - xmlFree(export); + g_free(export); lasso_node_destroy(request_node); lasso_node_destroy(soap_node); break; diff --git a/lasso/Attic/protocols/response.c b/lasso/Attic/protocols/response.c index e26cffb8..1491c60f 100644 --- a/lasso/Attic/protocols/response.c +++ b/lasso/Attic/protocols/response.c @@ -110,11 +110,11 @@ lasso_response_new() } LassoNode* -lasso_response_new_from_export(xmlChar *buffer, +lasso_response_new_from_export(gchar *buffer, lassoNodeExportType export_type) { LassoNode *response = NULL, *soap_node, *response_node; - xmlChar *export; + gchar *export; g_return_val_if_fail(buffer != NULL, NULL); @@ -133,7 +133,7 @@ lasso_response_new_from_export(xmlChar *buffer, lassoSamlProtocolHRef, NULL); export = lasso_node_export(response_node); lasso_node_import(response, export); - xmlFree(export); + g_free(export); lasso_node_destroy(response_node); lasso_node_destroy(soap_node); break; diff --git a/lasso/Attic/protocols/response.h b/lasso/Attic/protocols/response.h index 0a5268cb..886e66f0 100644 --- a/lasso/Attic/protocols/response.h +++ b/lasso/Attic/protocols/response.h @@ -56,7 +56,7 @@ LASSO_EXPORT GType lasso_response_get_type (void); LASSO_EXPORT LassoNode* lasso_response_new (void); -LASSO_EXPORT LassoNode* lasso_response_new_from_export (xmlChar *buffer, +LASSO_EXPORT LassoNode* lasso_response_new_from_export (gchar *buffer, lassoNodeExportType export_type); #ifdef __cplusplus |