summaryrefslogtreecommitdiffstats
path: root/lasso/Attic
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-07-31 20:34:46 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-07-31 20:34:46 +0000
commit0ecf1691ba1f1590b480ee53a6af0c0dbb66424a (patch)
treeb8bee0ef463e7bdb376789c19f5d0d77f2fcb3e9 /lasso/Attic
parented561ce190fb10c4dc35e8c23c39c7292f14e5bc (diff)
downloadlasso-0ecf1691ba1f1590b480ee53a6af0c0dbb66424a.tar.gz
lasso-0ecf1691ba1f1590b480ee53a6af0c0dbb66424a.tar.xz
lasso-0ecf1691ba1f1590b480ee53a6af0c0dbb66424a.zip
Added a new argument 'err' in 4 methods of the LassoNode class:
lasso_node_get_attr lasso_node_get_child lasso_node_get_child_content lasso_node_get_content for reporting errors.
Diffstat (limited to 'lasso/Attic')
-rw-r--r--lasso/Attic/protocols/artifact.c11
-rw-r--r--lasso/Attic/protocols/authn_request_envelope.c17
-rw-r--r--lasso/Attic/protocols/authn_response.c5
-rw-r--r--lasso/Attic/protocols/authn_response_envelope.c6
-rw-r--r--lasso/Attic/protocols/elements/authentication_statement.c4
-rw-r--r--lasso/Attic/protocols/federation.c8
-rw-r--r--lasso/Attic/protocols/federation_termination_notification.c2
-rw-r--r--lasso/Attic/protocols/logout_request.c5
-rw-r--r--lasso/Attic/protocols/logout_response.c33
-rw-r--r--lasso/Attic/protocols/name_identifier_mapping_request.c2
-rw-r--r--lasso/Attic/protocols/name_identifier_mapping_response.c17
-rw-r--r--lasso/Attic/protocols/provider.c28
-rw-r--r--lasso/Attic/protocols/register_name_identifier_request.c11
-rw-r--r--lasso/Attic/protocols/register_name_identifier_response.c23
-rw-r--r--lasso/Attic/protocols/request.c3
-rw-r--r--lasso/Attic/protocols/response.c3
16 files changed, 95 insertions, 83 deletions
diff --git a/lasso/Attic/protocols/artifact.c b/lasso/Attic/protocols/artifact.c
index f954913d..26b6baac 100644
--- a/lasso/Attic/protocols/artifact.c
+++ b/lasso/Attic/protocols/artifact.c
@@ -71,7 +71,7 @@ xmlChar*
lasso_artifact_get_assertionHandle(LassoArtifact *artifact)
{
return (lasso_node_get_child_content(LASSO_NODE(artifact),
- "AssertionHandle", NULL));
+ "AssertionHandle", NULL, NULL));
}
gint
@@ -80,7 +80,7 @@ lasso_artifact_get_byteCode(LassoArtifact *artifact)
xmlChar *byteCode;
byteCode = lasso_node_get_child_content(LASSO_NODE(artifact),
- "ByteCode", NULL);
+ "ByteCode", NULL, NULL);
return ((gint)g_strtod(byteCode, NULL));
}
@@ -88,20 +88,21 @@ xmlChar*
lasso_artifact_get_identityProviderSuccinctID(LassoArtifact *artifact)
{
return (lasso_node_get_child_content(LASSO_NODE(artifact),
- "IdentityProviderSuccinctID", NULL));
+ "IdentityProviderSuccinctID", NULL, NULL));
}
xmlChar*
lasso_artifact_get_relayState(LassoArtifact *artifact)
{
return (lasso_node_get_child_content(LASSO_NODE(artifact),
- "RelayState", NULL));
+ "RelayState", NULL, NULL));
}
xmlChar*
lasso_artifact_get_samlArt(LassoArtifact *artifact)
{
- return (lasso_node_get_child_content(LASSO_NODE(artifact), "SAMLArt", NULL));
+ return (lasso_node_get_child_content(LASSO_NODE(artifact),
+ "SAMLArt", NULL, NULL));
}
/*****************************************************************************/
diff --git a/lasso/Attic/protocols/authn_request_envelope.c b/lasso/Attic/protocols/authn_request_envelope.c
index 0058637f..261b5488 100644
--- a/lasso/Attic/protocols/authn_request_envelope.c
+++ b/lasso/Attic/protocols/authn_request_envelope.c
@@ -24,6 +24,9 @@
*/
#include <string.h>
+
+#include <xmlsec/base64.h>
+
#include <lasso/protocols/authn_request_envelope.h>
/*****************************************************************************/
@@ -38,7 +41,7 @@ LassoNode *lasso_authn_request_envelope_get_authnRequest(LassoAuthnRequestEnvelo
{
g_return_val_if_fail(LASSO_IS_AUTHN_REQUEST_ENVELOPE(request), NULL);
- return(lasso_node_get_child(LASSO_NODE(request), "AuthnRequest", NULL));
+ return(lasso_node_get_child(LASSO_NODE(request), "AuthnRequest", NULL, NULL));
}
/*****************************************************************************/
@@ -86,13 +89,15 @@ lasso_authn_request_envelope_new(LassoAuthnRequest *authnRequest,
LassoNode *request;
g_return_val_if_fail(LASSO_IS_AUTHN_REQUEST(authnRequest), NULL);
- g_return_val_if_fail(providerID!=NULL, NULL);
- g_return_val_if_fail(assertionConsumerServiceURL!=NULL, NULL);
+ g_return_val_if_fail(providerID != NULL, NULL);
+ g_return_val_if_fail(assertionConsumerServiceURL != NULL, NULL);
request = LASSO_NODE(g_object_new(LASSO_TYPE_AUTHN_REQUEST_ENVELOPE, NULL));
- lasso_lib_authn_request_envelope_set_authnRequest(LASSO_LIB_AUTHN_REQUEST_ENVELOPE(request), LASSO_LIB_AUTHN_REQUEST(authnRequest));
- lasso_lib_authn_request_envelope_set_providerID(LASSO_LIB_AUTHN_REQUEST_ENVELOPE(request), providerID);
+ lasso_lib_authn_request_envelope_set_authnRequest(LASSO_LIB_AUTHN_REQUEST_ENVELOPE(request),
+ LASSO_LIB_AUTHN_REQUEST(authnRequest));
+ lasso_lib_authn_request_envelope_set_providerID(LASSO_LIB_AUTHN_REQUEST_ENVELOPE(request),
+ providerID);
lasso_lib_authn_request_envelope_set_assertionConsumerServiceURL(LASSO_LIB_AUTHN_REQUEST_ENVELOPE(request),
assertionConsumerServiceURL);
@@ -110,7 +115,7 @@ lasso_authn_request_envelope_new_from_export(gchar *buffer,
request = LASSO_NODE(g_object_new(LASSO_TYPE_AUTHN_REQUEST_ENVELOPE, NULL));
- switch(export_type){
+ switch(export_type) {
case lassoNodeExportTypeBase64:
buffer_decoded = xmlMalloc(strlen(buffer));
xmlSecBase64Decode(buffer, buffer_decoded, strlen(buffer));
diff --git a/lasso/Attic/protocols/authn_response.c b/lasso/Attic/protocols/authn_response.c
index c56091c8..78fe628d 100644
--- a/lasso/Attic/protocols/authn_response.c
+++ b/lasso/Attic/protocols/authn_response.c
@@ -58,7 +58,8 @@ lasso_authn_response_get_status(LassoAuthnResponse *response) {
xmlChar *value;
GError *err = NULL;
- status_code = lasso_node_get_child(LASSO_NODE(response), "StatusCode", NULL);
+ status_code = lasso_node_get_child(LASSO_NODE(response), "StatusCode",
+ NULL, NULL);
if (status_code != NULL) {
value = lasso_node_get_attr_value(status_code, "Value", &err);
lasso_node_destroy(status_code);
@@ -150,7 +151,7 @@ lasso_authn_response_new(char *providerID,
providerID);
/* RelayState */
- content = lasso_node_get_child_content(request, "RelayState", lassoLibHRef);
+ content = lasso_node_get_child_content(request, "RelayState", lassoLibHRef, NULL);
if (content != NULL) {
lasso_lib_authn_response_set_relayState(LASSO_LIB_AUTHN_RESPONSE(response),
content);
diff --git a/lasso/Attic/protocols/authn_response_envelope.c b/lasso/Attic/protocols/authn_response_envelope.c
index db4d3154..965ce29c 100644
--- a/lasso/Attic/protocols/authn_response_envelope.c
+++ b/lasso/Attic/protocols/authn_response_envelope.c
@@ -38,14 +38,14 @@ xmlChar *lasso_authn_response_envelope_get_assertionConsumerServiceURL(LassoAuth
{
g_return_val_if_fail(LASSO_IS_AUTHN_RESPONSE_ENVELOPE(response), NULL);
- return(lasso_node_get_child_content(LASSO_NODE(response), "AssertionConsumerServiceURL", NULL));
+ return(lasso_node_get_child_content(LASSO_NODE(response), "AssertionConsumerServiceURL", NULL, NULL));
}
LassoNode* lasso_authn_response_envelope_get_authnResponse(LassoAuthnResponseEnvelope *response)
{
g_return_val_if_fail(LASSO_IS_AUTHN_RESPONSE_ENVELOPE(response), NULL);
- return(lasso_node_get_child(LASSO_NODE(response), "AuthnResponse", NULL));
+ return(lasso_node_get_child(LASSO_NODE(response), "AuthnResponse", NULL, NULL));
}
/*****************************************************************************/
@@ -115,7 +115,7 @@ lasso_authn_response_envelope_new_from_soap(gchar *buffer)
response = LASSO_NODE(g_object_new(LASSO_TYPE_AUTHN_RESPONSE_ENVELOPE, NULL));
envelope = lasso_node_new_from_dump(buffer);
- lassoNode_response = lasso_node_get_child(envelope, "AuthnResponseEnvelope", NULL);
+ lassoNode_response = lasso_node_get_child(envelope, "AuthnResponseEnvelope", NULL, NULL);
class = LASSO_NODE_GET_CLASS(lassoNode_response);
xmlNode_response = xmlCopyNode(class->get_xmlNode(LASSO_NODE(lassoNode_response)), 1);
diff --git a/lasso/Attic/protocols/elements/authentication_statement.c b/lasso/Attic/protocols/elements/authentication_statement.c
index 70d150c9..110e8f6f 100644
--- a/lasso/Attic/protocols/elements/authentication_statement.c
+++ b/lasso/Attic/protocols/elements/authentication_statement.c
@@ -98,7 +98,7 @@ lasso_authentication_statement_new(const xmlChar *authenticationMethod
subject = lasso_lib_subject_new();
if (identifier == NULL) {
/* create a new NameIdentifier and use idp_identifier data to fill it */
- str = lasso_node_get_content(LASSO_NODE(idp_identifier));
+ str = lasso_node_get_content(LASSO_NODE(idp_identifier), NULL);
new_identifier = lasso_saml_name_identifier_new(str);
xmlFree(str);
str = lasso_node_get_attr_value(LASSO_NODE(idp_identifier), "NameQualifier", NULL);
@@ -120,7 +120,7 @@ lasso_authentication_statement_new(const xmlChar *authenticationMethod
lasso_node_destroy(new_identifier);
/* create a new IdpProvidedNameIdentifier and use idp_identifier data to fill it */
- str = lasso_node_get_content(LASSO_NODE(idp_identifier));
+ str = lasso_node_get_content(LASSO_NODE(idp_identifier), NULL);
new_idp_identifier = lasso_lib_idp_provided_name_identifier_new(str);
xmlFree(str);
str = lasso_node_get_attr_value(LASSO_NODE(idp_identifier), "NameQualifier", NULL);
diff --git a/lasso/Attic/protocols/federation.c b/lasso/Attic/protocols/federation.c
index ee19abc3..41834e79 100644
--- a/lasso/Attic/protocols/federation.c
+++ b/lasso/Attic/protocols/federation.c
@@ -155,9 +155,10 @@ lasso_federation_verify_nameIdentifier(LassoFederation *federation,
{
gchar *federation_content, *nameIdentifier_content;
- nameIdentifier_content = lasso_node_get_content(nameIdentifier);
+ nameIdentifier_content = lasso_node_get_content(nameIdentifier, NULL);
if(federation->local_nameIdentifier != NULL) {
- federation_content = lasso_node_get_content(federation->local_nameIdentifier);
+ federation_content = lasso_node_get_content(federation->local_nameIdentifier,
+ NULL);
if(xmlStrEqual(federation_content, nameIdentifier_content)) {
xmlFree(federation_content);
return(TRUE);
@@ -165,7 +166,8 @@ lasso_federation_verify_nameIdentifier(LassoFederation *federation,
xmlFree(federation_content);
}
if(federation->remote_nameIdentifier != NULL) {
- federation_content = lasso_node_get_content(federation->remote_nameIdentifier);
+ federation_content = lasso_node_get_content(federation->remote_nameIdentifier,
+ NULL);
if(xmlStrEqual(federation_content, nameIdentifier_content)) {
xmlFree(federation_content);
return(TRUE);
diff --git a/lasso/Attic/protocols/federation_termination_notification.c b/lasso/Attic/protocols/federation_termination_notification.c
index eeb4a82c..4a4c546c 100644
--- a/lasso/Attic/protocols/federation_termination_notification.c
+++ b/lasso/Attic/protocols/federation_termination_notification.c
@@ -168,7 +168,7 @@ lasso_federation_termination_notification_new_from_soap(const xmlChar *buffer)
envelope = lasso_node_new_from_dump(buffer);
lassoNode_notification = lasso_node_get_child(envelope, "FederationTerminationNotification",
- lassoLibHRef);
+ lassoLibHRef, NULL);
class = LASSO_NODE_GET_CLASS(lassoNode_notification);
xmlNode_notification = xmlCopyNode(class->get_xmlNode(LASSO_NODE(lassoNode_notification)), 1);
diff --git a/lasso/Attic/protocols/logout_request.c b/lasso/Attic/protocols/logout_request.c
index 59c1159d..e7722232 100644
--- a/lasso/Attic/protocols/logout_request.c
+++ b/lasso/Attic/protocols/logout_request.c
@@ -184,7 +184,8 @@ lasso_logout_request_new_from_soap(gchar *buffer)
request = LASSO_NODE(g_object_new(LASSO_TYPE_LOGOUT_REQUEST, NULL));
envelope = lasso_node_new_from_dump(buffer);
- lassoNode_request = lasso_node_get_child(envelope, "LogoutRequest", lassoLibHRef);
+ lassoNode_request = lasso_node_get_child(envelope, "LogoutRequest",
+ lassoLibHRef, NULL);
class = LASSO_NODE_GET_CLASS(lassoNode_request);
xmlNode_request = xmlCopyNode(class->get_xmlNode(LASSO_NODE(lassoNode_request)), 1);
@@ -202,7 +203,7 @@ LassoNode*
lasso_logout_request_new_from_export(gchar *buffer,
lassoNodeExportTypes export_type)
{
- LassoNode *request;
+ LassoNode *request = NULL;
g_return_val_if_fail(buffer != NULL, NULL);
diff --git a/lasso/Attic/protocols/logout_response.c b/lasso/Attic/protocols/logout_response.c
index 5eeacc69..26be9553 100644
--- a/lasso/Attic/protocols/logout_response.c
+++ b/lasso/Attic/protocols/logout_response.c
@@ -36,7 +36,8 @@ lasso_logout_response_get_status_code_value(LassoLogoutResponse *response)
xmlChar *value;
GError *err = NULL;
- status_code = lasso_node_get_child(LASSO_NODE(response), "StatusCode", NULL);
+ status_code = lasso_node_get_child(LASSO_NODE(response), "StatusCode",
+ NULL, NULL);
if (status_code != NULL) {
value = lasso_node_get_attr_value(status_code, "Value", &err);
lasso_node_destroy(status_code);
@@ -97,8 +98,8 @@ lasso_logout_response_new(gchar *providerID,
const gchar *statusCodeValue,
LassoNode *request)
{
- LassoNode *response, *ss, *ssc, *request_providerID, *request_relayState;
- xmlChar *inResponseTo, *recipient, *relayState;
+ LassoNode *response, *ss, *ssc;
+ xmlChar *inResponseTo, *request_providerID, *request_relayState;
xmlChar *id, *time;
response = LASSO_NODE(g_object_new(LASSO_TYPE_LOGOUT_RESPONSE, NULL));
@@ -124,24 +125,21 @@ lasso_logout_response_new(gchar *providerID,
lasso_lib_status_response_set_providerID(LASSO_LIB_STATUS_RESPONSE(response),
providerID);
- inResponseTo = xmlNodeGetContent((xmlNodePtr)lasso_node_get_attr(request, "RequestID"));
+ inResponseTo = lasso_node_get_attr_value(request, "RequestID", NULL);
lasso_samlp_response_abstract_set_inResponseTo(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
inResponseTo);
+ xmlFree(inResponseTo);
- request_providerID = lasso_node_get_child(request, "ProviderID", NULL);
- recipient = lasso_node_get_content(request_providerID);
+ request_providerID = lasso_node_get_child_content(request, "ProviderID", NULL, NULL);
lasso_samlp_response_abstract_set_recipient(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
- recipient);
- lasso_node_destroy(request_providerID);
- xmlFree(recipient);
+ request_providerID);
+ xmlFree(request_providerID);
- request_relayState = lasso_node_get_child(request, "RelayState", NULL);
+ request_relayState = lasso_node_get_child_content(request, "RelayState", NULL, NULL);
if (request_relayState != NULL) {
- relayState = lasso_node_get_content(request_relayState);
lasso_lib_status_response_set_relayState(LASSO_LIB_STATUS_RESPONSE(response),
- relayState);
- lasso_node_destroy(request_relayState);
- xmlFree(relayState);
+ request_relayState);
+ xmlFree(request_relayState);
}
ss = lasso_samlp_status_new();
@@ -258,13 +256,14 @@ lasso_logout_response_new_from_soap(gchar *buffer)
response = LASSO_NODE(g_object_new(LASSO_TYPE_LOGOUT_RESPONSE, NULL));
envelope = lasso_node_new_from_dump(buffer);
- if(envelope==NULL){
+ if(envelope == NULL) {
message(G_LOG_LEVEL_ERROR, "Error while parsing the soap msg\n");
return(NULL);
}
- lassoNode_response = lasso_node_get_child(envelope, "LogoutResponse", NULL);
- if(lassoNode_response==NULL){
+ lassoNode_response = lasso_node_get_child(envelope, "LogoutResponse",
+ NULL, NULL);
+ if(lassoNode_response == NULL) {
message(G_LOG_LEVEL_ERROR, "LogoutResponse node not found\n");
return(NULL);
}
diff --git a/lasso/Attic/protocols/name_identifier_mapping_request.c b/lasso/Attic/protocols/name_identifier_mapping_request.c
index 4dc40272..67f5dc37 100644
--- a/lasso/Attic/protocols/name_identifier_mapping_request.c
+++ b/lasso/Attic/protocols/name_identifier_mapping_request.c
@@ -182,7 +182,7 @@ lasso_name_identifier_mapping_request_new_from_soap(const xmlChar *buffer)
envelope = lasso_node_new_from_dump(buffer);
lassoNode_request = lasso_node_get_child(envelope, "NameIdentifierMappingRequest",
- lassoLibHRef);
+ lassoLibHRef, NULL);
class = LASSO_NODE_GET_CLASS(lassoNode_request);
xmlNode_request = xmlCopyNode(class->get_xmlNode(LASSO_NODE(lassoNode_request)), 1);
diff --git a/lasso/Attic/protocols/name_identifier_mapping_response.c b/lasso/Attic/protocols/name_identifier_mapping_response.c
index f99a6339..c37e635f 100644
--- a/lasso/Attic/protocols/name_identifier_mapping_response.c
+++ b/lasso/Attic/protocols/name_identifier_mapping_response.c
@@ -72,8 +72,8 @@ lasso_name_identifier_mapping_response_new(const xmlChar *providerID,
LassoNode *request)
{
/* FIXME : change request type */
- LassoNode *response, *ss, *ssc, *request_providerID;
- xmlChar *inResponseTo, *recipient;
+ LassoNode *response, *ss, *ssc;
+ xmlChar *inResponseTo, *request_providerID;
xmlChar *id, *time;
response = LASSO_NODE(g_object_new(LASSO_TYPE_NAME_IDENTIFIER_MAPPING_RESPONSE, NULL));
@@ -99,16 +99,15 @@ lasso_name_identifier_mapping_response_new(const xmlChar *providerID,
lasso_lib_name_identifier_mapping_response_set_providerID(LASSO_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE(response),
providerID);
- inResponseTo = xmlNodeGetContent((xmlNodePtr)lasso_node_get_attr(request, "RequestID"));
+ inResponseTo = lasso_node_get_attr_value(request, "RequestID", NULL);
lasso_samlp_response_abstract_set_inResponseTo(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
inResponseTo);
+ xmlFree(inResponseTo);
- request_providerID = lasso_node_get_child(request, "ProviderID", NULL);
- recipient = lasso_node_get_content(request_providerID);
+ request_providerID = lasso_node_get_child_content(request, "ProviderID", NULL, NULL);
lasso_samlp_response_abstract_set_recipient(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
- recipient);
- lasso_node_destroy(request_providerID);
- xmlFree(recipient);
+ request_providerID);
+ xmlFree(request_providerID);
ss = lasso_samlp_status_new();
ssc = lasso_samlp_status_code_new();
@@ -211,7 +210,7 @@ lasso_name_identifier_mapping_response_new_from_soap(const xmlChar *buffer)
envelope = lasso_node_new_from_dump(buffer);
lassoNode_response = lasso_node_get_child(envelope, "NameIdentifierMappingResponse",
- lassoLibHRef);
+ lassoLibHRef, NULL);
class = LASSO_NODE_GET_CLASS(lassoNode_response);
xmlNode_response = xmlCopyNode(class->get_xmlNode(LASSO_NODE(lassoNode_response)), 1);
diff --git a/lasso/Attic/protocols/provider.c b/lasso/Attic/protocols/provider.c
index 0cde6cb4..26a92f9f 100644
--- a/lasso/Attic/protocols/provider.c
+++ b/lasso/Attic/protocols/provider.c
@@ -89,25 +89,25 @@ lasso_provider_dump(LassoProvider *provider)
gchar *
lasso_provider_get_assertionConsumerServiceURL(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "AssertionConsumerServiceURL", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "AssertionConsumerServiceURL", NULL, NULL));
}
gchar *
lasso_provider_get_federationTerminationNotificationProtocolProfile(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "FederationTerminationNotificationProtocolProfile", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "FederationTerminationNotificationProtocolProfile", NULL, NULL));
}
gchar *
lasso_provider_get_federationTerminationReturnServiceURL(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "FederationTerminationReturnServiceURL", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "FederationTerminationReturnServiceURL", NULL, NULL));
}
gchar *
lasso_provider_get_federationTerminationServiceURL(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "FederationTerminationServiceURL", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "FederationTerminationServiceURL", NULL, NULL));
}
gchar *
@@ -188,46 +188,46 @@ lasso_provider_get_providerID(LassoProvider *provider,
gchar *
lasso_provider_get_registerNameIdentifierProtocolProfile(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "RegisterNameIdentifierProtocolProfile", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "RegisterNameIdentifierProtocolProfile", NULL, NULL));
}
gchar *
lasso_provider_get_registerNameIdentifierServiceURL(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "RegisterNameIdentifierServiceURL", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "RegisterNameIdentifierServiceURL", NULL, NULL));
}
gchar *
lasso_provider_get_singleSignOnProtocolProfile(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "SingleSignOnProtocolProfile", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "SingleSignOnProtocolProfile", NULL, NULL));
}
gchar *
lasso_provider_get_singleSignOnServiceURL(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "SingleSignOnServiceURL", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "SingleSignOnServiceURL", NULL, NULL));
}
gchar *lasso_provider_get_singleLogoutProtocolProfile(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "SingleLogoutProtocolProfile", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "SingleLogoutProtocolProfile", NULL, NULL));
}
gchar *lasso_provider_get_singleLogoutServiceURL(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "SingleLogoutServiceURL", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "SingleLogoutServiceURL", NULL, NULL));
}
gchar *lasso_provider_get_singleLogoutServiceReturnURL(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "SingleLogoutServiceReturnURL", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "SingleLogoutServiceReturnURL", NULL, NULL));
}
gchar *
lasso_provider_get_soapEndpoint(LassoProvider *provider)
{
- return(lasso_node_get_child_content(provider->metadata, "SoapEndpoint", NULL));
+ return(lasso_node_get_child_content(provider->metadata, "SoapEndpoint", NULL, NULL));
}
void
@@ -253,11 +253,11 @@ static gchar *lasso_provider_get_direct_child_content(LassoProvider *provider,
LassoNode *node;
xmlChar *content;
- node = lasso_node_get_child(LASSO_NODE(provider), name, NULL);
+ node = lasso_node_get_child(LASSO_NODE(provider), name, NULL, NULL);
if(node == NULL) {
return(NULL);
}
- content = lasso_node_get_content(node);
+ content = lasso_node_get_content(node, NULL);
lasso_node_destroy(node);
return(content);
diff --git a/lasso/Attic/protocols/register_name_identifier_request.c b/lasso/Attic/protocols/register_name_identifier_request.c
index 908e1e29..443f5b6d 100644
--- a/lasso/Attic/protocols/register_name_identifier_request.c
+++ b/lasso/Attic/protocols/register_name_identifier_request.c
@@ -37,17 +37,20 @@ lasso_register_name_identifier_request_rename_attributes_for_query(LassoRegister
g_return_if_fail (LASSO_IS_REGISTER_NAME_IDENTIFIER_REQUEST(request));
- idpidentifier = lasso_node_get_child(LASSO_NODE(request), "IDPProvidedNameIdentifier", NULL);
+ idpidentifier = lasso_node_get_child(LASSO_NODE(request), "IDPProvidedNameIdentifier",
+ NULL, NULL);
lasso_node_rename_prop(idpidentifier, "NameQualifier", "IDPNameQualifier");
lasso_node_rename_prop(idpidentifier, "Format", "IDPFormat");
lasso_node_destroy(idpidentifier);
- spidentifier = lasso_node_get_child(LASSO_NODE(request), "SPProvidedNameIdentifier", NULL);
+ spidentifier = lasso_node_get_child(LASSO_NODE(request), "SPProvidedNameIdentifier",
+ NULL, NULL);
lasso_node_rename_prop(spidentifier, "NameQualifier", "SPNameQualifier");
lasso_node_rename_prop(spidentifier, "Format", "SPFormat");
lasso_node_destroy(spidentifier);
- oldidentifier = lasso_node_get_child(LASSO_NODE(request), "OldProvidedNameIdentifier", NULL);
+ oldidentifier = lasso_node_get_child(LASSO_NODE(request), "OldProvidedNameIdentifier",
+ NULL, NULL);
lasso_node_rename_prop(oldidentifier, "NameQualifier", "OldNameQualifier");
lasso_node_rename_prop(oldidentifier, "Format", "OldFormat");
lasso_node_destroy(oldidentifier);
@@ -241,7 +244,7 @@ lasso_register_name_identifier_request_new_from_soap(const xmlChar *buffer)
envelope = lasso_node_new_from_dump(buffer);
lassoNode_request = lasso_node_get_child(envelope, "RegisterNameIdentifierRequest",
- lassoLibHRef);
+ lassoLibHRef, NULL);
class = LASSO_NODE_GET_CLASS(lassoNode_request);
xmlNode_request = xmlCopyNode(class->get_xmlNode(LASSO_NODE(lassoNode_request)), 1);
diff --git a/lasso/Attic/protocols/register_name_identifier_response.c b/lasso/Attic/protocols/register_name_identifier_response.c
index ba64a2e7..2d401f71 100644
--- a/lasso/Attic/protocols/register_name_identifier_response.c
+++ b/lasso/Attic/protocols/register_name_identifier_response.c
@@ -94,7 +94,7 @@ lasso_register_name_identifier_response_new_from_soap(gchar *buffer)
envelope = lasso_node_new_from_dump(buffer);
lassoNode_response = lasso_node_get_child(envelope, "RegisterNameIdentifierResponse",
- lassoLibHRef);
+ lassoLibHRef, NULL);
class = LASSO_NODE_GET_CLASS(lassoNode_response);
xmlNode_response = xmlCopyNode(class->get_xmlNode(LASSO_NODE(lassoNode_response)), 1);
@@ -150,8 +150,8 @@ lasso_register_name_identifier_response_new(gchar *providerID,
LassoNode *request)
{
/* FIXME : change request type */
- LassoNode *response, *ss, *ssc, *request_providerID, *request_relayState;
- xmlChar *inResponseTo, *recipient, *relayState;
+ LassoNode *response, *ss, *ssc;
+ xmlChar *inResponseTo, *request_providerID, *request_relayState;
xmlChar *id, *time;
response = LASSO_NODE(g_object_new(LASSO_TYPE_REGISTER_NAME_IDENTIFIER_RESPONSE, NULL));
@@ -177,22 +177,21 @@ lasso_register_name_identifier_response_new(gchar *providerID,
lasso_lib_status_response_set_providerID(LASSO_LIB_STATUS_RESPONSE(response),
providerID);
- inResponseTo = xmlNodeGetContent((xmlNodePtr)lasso_node_get_attr(request, "RequestID"));
+ inResponseTo = lasso_node_get_attr_value(request, "RequestID", NULL);
lasso_samlp_response_abstract_set_inResponseTo(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
inResponseTo);
+ xmlFree(inResponseTo);
- request_providerID = lasso_node_get_child(request, "ProviderID", NULL);
- recipient = lasso_node_get_content(request_providerID);
+ request_providerID = lasso_node_get_child_content(request, "ProviderID", NULL, NULL);
lasso_samlp_response_abstract_set_recipient(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
- recipient);
- lasso_node_destroy(request_providerID);
+ request_providerID);
+ xmlFree(request_providerID);
- request_relayState = lasso_node_get_child(request, "RelayState", NULL);
+ request_relayState = lasso_node_get_child_content(request, "RelayState", NULL, NULL);
if (request_relayState != NULL) {
- relayState = lasso_node_get_content(request_relayState);
lasso_lib_status_response_set_relayState(LASSO_LIB_STATUS_RESPONSE(response),
- relayState);
- lasso_node_destroy(request_relayState);
+ request_relayState);
+ xmlFree(request_relayState);
}
ss = lasso_samlp_status_new();
diff --git a/lasso/Attic/protocols/request.c b/lasso/Attic/protocols/request.c
index d1d0db04..a5f4ab9e 100644
--- a/lasso/Attic/protocols/request.c
+++ b/lasso/Attic/protocols/request.c
@@ -124,7 +124,8 @@ lasso_request_new_from_export(gchar *buffer,
break;
case lassoNodeExportTypeSoap:
soap_node = lasso_node_new_from_dump(buffer);
- request_node = lasso_node_get_child(soap_node, "Request", lassoSamlProtocolHRef);
+ request_node = lasso_node_get_child(soap_node, "Request",
+ lassoSamlProtocolHRef, NULL);
export = lasso_node_export(request_node);
lasso_node_import(request, export);
xmlFree(export);
diff --git a/lasso/Attic/protocols/response.c b/lasso/Attic/protocols/response.c
index 4a159157..29273b91 100644
--- a/lasso/Attic/protocols/response.c
+++ b/lasso/Attic/protocols/response.c
@@ -129,7 +129,8 @@ lasso_response_new_from_export(xmlChar *buffer,
break;
case lassoNodeExportTypeSoap:
soap_node = lasso_node_new_from_dump(buffer);
- response_node = lasso_node_get_child(soap_node, "Response", lassoSamlProtocolHRef);
+ response_node = lasso_node_get_child(soap_node, "Response",
+ lassoSamlProtocolHRef, NULL);
export = lasso_node_export(response_node);
lasso_node_import(response, export);
xmlFree(export);