diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2006-11-14 17:07:31 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2006-11-14 17:07:31 +0000 |
| commit | 011bc4456936801ed9ca1a438bf6571e55246480 (patch) | |
| tree | 65cf3b26029a8cf7152eaa488e55d20a1e9afeca | |
| parent | 85d8ea7d4bda979f28af90d000451388558ba513 (diff) | |
random fixage of warning displayed with -Wall
| -rw-r--r-- | lasso/id-ff/profile.c | 9 | ||||
| -rw-r--r-- | lasso/id-ff/provider.c | 4 | ||||
| -rw-r--r-- | lasso/id-wsf/authentication.c | 8 | ||||
| -rw-r--r-- | lasso/id-wsf/data_service.c | 7 | ||||
| -rw-r--r-- | lasso/id-wsf/discovery.c | 17 | ||||
| -rw-r--r-- | lasso/id-wsf/wsf_profile.c | 91 | ||||
| -rw-r--r-- | lasso/id-wsf/wsf_profile.h | 4 | ||||
| -rw-r--r-- | lasso/saml-2.0/login.c | 12 | ||||
| -rw-r--r-- | lasso/saml-2.0/loginprivate.h | 1 | ||||
| -rw-r--r-- | lasso/saml-2.0/name_id_management.c | 7 | ||||
| -rw-r--r-- | lasso/xml/xml.c | 36 |
11 files changed, 103 insertions, 93 deletions
diff --git a/lasso/id-ff/profile.c b/lasso/id-ff/profile.c index 89111085..39b5a942 100644 --- a/lasso/id-ff/profile.c +++ b/lasso/id-ff/profile.c @@ -398,12 +398,12 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump) if (profile->private_data->artifact) { xmlNewTextChild(xmlnode, NULL, (xmlChar*)"Artifact", - profile->private_data->artifact); + (xmlChar*)profile->private_data->artifact); } if (profile->private_data->artifact_message) { xmlNewTextChild(xmlnode, NULL, (xmlChar*)"ArtifactMessage", - profile->private_data->artifact_message); + (xmlChar*)profile->private_data->artifact_message); } return xmlnode; @@ -423,7 +423,6 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode) t = xmlnode->children; while (t) { - xmlNode *t2 = t->children; xmlChar *s; if (t->type != XML_ELEMENT_NODE) { @@ -433,11 +432,11 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode) if (strcmp((char*)t->name, "Artifact") == 0) { s = xmlNodeGetContent(t); - profile->private_data->artifact = g_strdup(s); + profile->private_data->artifact = g_strdup((char*)s); xmlFree(s); } else if (strcmp((char*)t->name, "ArtifactMessage") == 0) { s = xmlNodeGetContent(t); - profile->private_data->artifact_message = g_strdup(s); + profile->private_data->artifact_message = g_strdup((char*)s); xmlFree(s); } diff --git a/lasso/id-ff/provider.c b/lasso/id-ff/provider.c index 330fb79b..bbe9693d 100644 --- a/lasso/id-ff/provider.c +++ b/lasso/id-ff/provider.c @@ -808,8 +808,8 @@ lasso_provider_load_public_key(LassoProvider *provider, LassoPublicKeyType publi if (rc < 0) { /* bad base-64 */ g_free(value); - value = g_strdup(b64_value); - rc = strlen(value); + value = (xmlSecByte*)g_strdup((char*)b64_value); + rc = strlen((char*)value); } for (i=0; key_formats[i] && pub_key == NULL; i++) { diff --git a/lasso/id-wsf/authentication.c b/lasso/id-wsf/authentication.c index 23067f44..67d78ec4 100644 --- a/lasso/id-wsf/authentication.c +++ b/lasso/id-wsf/authentication.c @@ -69,7 +69,7 @@ lasso_sasl_cb_pass(sasl_conn_t* conn, void* context, int id, sasl_secret_t** pse if (account != NULL && account->password != NULL) { s = (sasl_secret_t*) g_malloc0(sizeof(sasl_secret_t) + strlen(account->password)); - strcpy(s->data, account->password); + strcpy((char*)s->data, account->password); s->len = strlen(account->password); *psecret = s; @@ -114,7 +114,7 @@ lasso_authentication_client_start(LassoAuthentication *authentication) } if (outlen > 0) { - outbase64 = xmlSecBase64Encode(out, outlen, 0); + outbase64 = xmlSecBase64Encode((xmlChar*)out, outlen, 0); request->Data = g_list_append(request->Data, outbase64); } @@ -143,8 +143,8 @@ lasso_authentication_client_step(LassoAuthentication *authentication) if (response->Data != NULL) { inbase64 = response->Data->data; - in = g_malloc(strlen(inbase64)); - inlen = xmlSecBase64Decode(inbase64, in, strlen(inbase64)); + in = g_malloc(strlen((char*)inbase64)); + inlen = xmlSecBase64Decode(inbase64, in, strlen((char*)inbase64)); res = sasl_client_step(authentication->connection, /* our context */ in, /* the data from the server */ diff --git a/lasso/id-wsf/data_service.c b/lasso/id-wsf/data_service.c index db30d7dd..3b548982 100644 --- a/lasso/id-wsf/data_service.c +++ b/lasso/id-wsf/data_service.c @@ -61,6 +61,7 @@ lasso_data_service_add_credential(LassoDataService *service, service->private_data->credentials = g_list_append( service->private_data->credentials, g_object_ref(assertion)); + return 0; } LassoDstModification* @@ -126,12 +127,7 @@ lasso_data_service_add_query_item(LassoDataService *service, gint lasso_data_service_need_redirect_user(LassoDataService *service, const char *redirectUrl) { - LassoWsfProfile *profile; - LassoSoapBody *body; - LassoSoapFault *fault; - LassoUtilityStatus *status; LassoSoapDetail *detail; - GList *iter; /* Find a SOAP fault element */ service->private_data->fault = lasso_soap_fault_new(); @@ -589,7 +585,6 @@ lasso_data_service_process_query_response_msg(LassoDataService *service, const char *message) { int rc; - LassoDstQueryResponse *response; LassoSoapFault *fault = NULL; LassoIsRedirectRequest *redirect_request = NULL; GList *iter; diff --git a/lasso/id-wsf/discovery.c b/lasso/id-wsf/discovery.c index 76061165..1d0b3614 100644 --- a/lasso/id-wsf/discovery.c +++ b/lasso/id-wsf/discovery.c @@ -22,6 +22,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <libxml/xpath.h> +#include <libxml/xpathInternals.h> + #include <xmlsec/xmltree.h> #include <lasso/xml/soap_binding_correlation.h> @@ -143,15 +146,17 @@ lasso_discovery_build_credential(LassoDiscovery *discovery, const gchar *provide ctx->mode = xmlSecKeyInfoModeWrite; ctx->keyReq.keyType = xmlSecKeyDataTypePublic; - doc = xmlSecCreateTree("KeyInfo", "http://www.w3.org/2000/09/xmldsig#"); + doc = xmlSecCreateTree((xmlChar*)"KeyInfo", + (xmlChar*)"http://www.w3.org/2000/09/xmldsig#"); key_info_node = xmlDocGetRootElement(doc); - xmlSecAddChild(key_info_node, - "KeyValue", "http://www.w3.org/2000/09/xmldsig#"); + xmlSecAddChild(key_info_node, (xmlChar*)"KeyValue", + (xmlChar*)"http://www.w3.org/2000/09/xmldsig#"); xmlSecKeyInfoNodeWrite(key_info_node, public_key, ctx); xpathCtx = xmlXPathNewContext(doc); - xmlXPathRegisterNs(xpathCtx, (xmlChar*)"ds", "http://www.w3.org/2000/09/xmldsig#"); + xmlXPathRegisterNs(xpathCtx, (xmlChar*)"ds", + (xmlChar*)"http://www.w3.org/2000/09/xmldsig#"); rsa_key_value = lasso_ds_rsa_key_value_new(); xpathObj = xmlXPathEvalExpression((xmlChar*)"//ds:Modulus", xpathCtx); @@ -811,10 +816,8 @@ lasso_discovery_build_response_msg(LassoDiscovery *discovery) LassoDiscoQueryResponse *response; LassoSoapEnvelope *envelope; - LassoSoapBindingProvider *provider = NULL; - GList *offerings = NULL; - GList *iter, *iter2, *iter3, *iter4; + GList *iter, *iter2, *iter3; int res = 0; gchar *credentialRef; diff --git a/lasso/id-wsf/wsf_profile.c b/lasso/id-wsf/wsf_profile.c index d6452462..92a9e5a0 100644 --- a/lasso/id-wsf/wsf_profile.c +++ b/lasso/id-wsf/wsf_profile.c @@ -22,6 +22,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <libxml/xpath.h> +#include <libxml/xpathInternals.h> + +#include <xmlsec/xmltree.h> +#include <xmlsec/xmldsig.h> +#include <xmlsec/templates.h> +#include <xmlsec/crypto.h> + #include <lasso/id-wsf/wsf_profile.h> #include <lasso/xml/disco_modify.h> #include <lasso/xml/soap_fault.h> @@ -37,11 +45,6 @@ #include <lasso/id-ff/server.h> #include <lasso/id-ff/providerprivate.h> -#include <xmlsec/xmltree.h> -#include <xmlsec/xmldsig.h> -#include <xmlsec/templates.h> -#include <xmlsec/crypto.h> - struct _LassoWsfProfilePrivate { gboolean dispose_has_run; @@ -51,6 +54,9 @@ struct _LassoWsfProfilePrivate GList *credentials; }; +gint lasso_wsf_profile_verify_x509_authentication(LassoWsfProfile *profile, + xmlDoc *doc, xmlSecKey *public_key); + /*****************************************************************************/ /* private methods */ /*****************************************************************************/ @@ -200,13 +206,13 @@ lasso_wsf_profile_verify_credential_signature(LassoWsfProfile *profile, xmlSecDSigCtx *dsigCtx; - char *issuer; + xmlChar *issuer; /* Retrieve provider id of credential signer . Issuer could be the right place */ - issuer = xmlGetProp(credential, "Issuer"); + issuer = xmlGetProp(credential, (xmlChar*)"Issuer"); if (!issuer) return LASSO_ERROR_UNDEFINED; - lasso_provider = lasso_server_get_provider(profile->server, issuer); + lasso_provider = lasso_server_get_provider(profile->server, (char*)issuer); if (!lasso_provider) return LASSO_ERROR_UNDEFINED; @@ -272,8 +278,7 @@ lasso_wsf_profile_add_credential_signature(LassoWsfProfile *profile, xmlDoc *doc, xmlNode *credential, LassoSignatureMethod sign_method) { - xmlNode *signature = NULL, *sign_tmpl, *reference, *key_info, *t; - xmlChar *id; + xmlNode *signature = NULL, *sign_tmpl, *reference, *key_info; char *uri; xmlAttr *id_attr; @@ -348,7 +353,7 @@ lasso_wsf_profile_get_public_key_from_credential(LassoWsfProfile *profile, xmlNo authentication_statement = credential->children; while (authentication_statement) { if (authentication_statement->type == XML_ELEMENT_NODE && \ - strcmp(authentication_statement->name, "AuthenticationStatement") == 0) + strcmp((char*)authentication_statement->name, "AuthenticationStatement") == 0) break; authentication_statement = authentication_statement->next; } @@ -359,7 +364,8 @@ lasso_wsf_profile_get_public_key_from_credential(LassoWsfProfile *profile, xmlNo /* get Subject element */ subject = authentication_statement->children; while (subject) { - if (subject->type == XML_ELEMENT_NODE && strcmp(subject->name, "Subject") == 0) + if (subject->type == XML_ELEMENT_NODE && + strcmp((char*)subject->name, "Subject") == 0) break; subject = subject->next; } @@ -370,8 +376,8 @@ lasso_wsf_profile_get_public_key_from_credential(LassoWsfProfile *profile, xmlNo /* get SubjectConfirmation */ subject_confirmation = subject->children; while (subject_confirmation) { - if (subject_confirmation->type == XML_ELEMENT_NODE && \ - strcmp(subject_confirmation->name, "SubjectConfirmation") == 0) + if (subject_confirmation->type == XML_ELEMENT_NODE && + strcmp((char*)subject_confirmation->name, "SubjectConfirmation") == 0) break; subject_confirmation = subject_confirmation->next; } @@ -382,7 +388,8 @@ lasso_wsf_profile_get_public_key_from_credential(LassoWsfProfile *profile, xmlNo /* get KeyInfo */ key_info = subject_confirmation->children; while (key_info) { - if (key_info->type == XML_ELEMENT_NODE && strcmp(key_info->name, "KeyInfo") == 0) + if (key_info->type == XML_ELEMENT_NODE && + strcmp((char*)key_info->name, "KeyInfo") == 0) break; key_info = key_info->next; } @@ -402,45 +409,46 @@ lasso_wsf_profile_get_public_key_from_credential(LassoWsfProfile *profile, xmlNo { xmlDoc *doc; - char *modulus_value, *exponent_value; + xmlChar *modulus_value, *exponent_value; xmlNode *rsa_key_value, *xmlnode, *modulus, *exponent; xmlnode = key_info->children; while (xmlnode) { - if (strcmp(xmlnode->name, "KeyValue") == 0) { + if (strcmp((char*)xmlnode->name, "KeyValue") == 0) { break; } xmlnode = xmlnode->next; } rsa_key_value = xmlnode->children; while (rsa_key_value) { - if (strcmp(rsa_key_value->name, "RsaKeyValue") == 0) { + if (strcmp((char*)rsa_key_value->name, "RsaKeyValue") == 0) { break; } rsa_key_value = rsa_key_value->next; } xmlnode = rsa_key_value->children; while (xmlnode) { - if (strcmp(xmlnode->name, "Modulus") == 0) + if (strcmp((char*)xmlnode->name, "Modulus") == 0) modulus_value = xmlNodeGetContent(xmlnode); - else if (strcmp(xmlnode->name, "Exponent") == 0) + else if (strcmp((char*)xmlnode->name, "Exponent") == 0) exponent_value = xmlNodeGetContent(xmlnode); xmlnode = xmlnode->next; } - doc = xmlSecCreateTree("KeyInfo", "http://www.w3.org/2000/09/xmldsig#"); + doc = xmlSecCreateTree((xmlChar*)"KeyInfo", + (xmlChar*)"http://www.w3.org/2000/09/xmldsig#"); key_info = xmlDocGetRootElement(doc); - xmlnode = xmlSecAddChild(key_info, - "KeyValue", "http://www.w3.org/2000/09/xmldsig#"); - xmlnode = xmlSecAddChild(xmlnode, - "RSAKeyValue", "http://www.w3.org/2000/09/xmldsig#"); - modulus = xmlSecAddChild(xmlnode, - "Modulus", "http://www.w3.org/2000/09/xmldsig#"); + xmlnode = xmlSecAddChild(key_info, (xmlChar*)"KeyValue", + (xmlChar*)"http://www.w3.org/2000/09/xmldsig#"); + xmlnode = xmlSecAddChild(xmlnode, (xmlChar*)"RSAKeyValue", + (xmlChar*)"http://www.w3.org/2000/09/xmldsig#"); + modulus = xmlSecAddChild(xmlnode, (xmlChar*)"Modulus", + (xmlChar*)"http://www.w3.org/2000/09/xmldsig#"); xmlNodeSetContent(modulus, modulus_value); - exponent = xmlSecAddChild(xmlnode, - "Exponent", "http://www.w3.org/2000/09/xmldsig#"); + exponent = xmlSecAddChild(xmlnode, (xmlChar*)"Exponent", + (xmlChar*)"http://www.w3.org/2000/09/xmldsig#"); xmlNodeSetContent(exponent, exponent_value); } @@ -457,7 +465,7 @@ lasso_wsf_profile_verify_saml_authentication(LassoWsfProfile *profile, xmlDoc *d xmlXPathObject *xpathObj; xmlNode *credential; xmlSecKey *public_key; - int i, res; + int res; xpathCtx = xmlXPathNewContext(doc); @@ -502,11 +510,8 @@ lasso_wsf_profile_add_soap_signature(LassoWsfProfile *profile, xmlDoc *doc, xmlN xmlSecDSigCtx *dsigCtx; xmlChar *id; char *uri; - xmlAttr *id_attr; - LassoSignatureType sign_type = LASSO_SIGNATURE_TYPE_WITHX509; - /* Get Correlation, Provider, Security, Body elements */ t = envelope_node->children; while (t) { @@ -625,8 +630,8 @@ lasso_wsf_profile_verify_x509_authentication(LassoWsfProfile *profile, { LassoProvider *lasso_provider = NULL; - xmlNode *provider = NULL, *correlation = NULL, *security = NULL, *body = NULL; - xmlNode *signature = NULL, *x509data = NULL, *node; + xmlNode *provider = NULL, *correlation = NULL, *body = NULL; + xmlNode *x509data = NULL, *node; xmlChar *id; xmlAttr *id_attr; @@ -1064,9 +1069,11 @@ lasso_wsf_profile_build_soap_request_msg(LassoWsfProfile *profile) /* FIXME: not sure it's the proper way to avoid ns error */ xmlNewNs(envelope_node, - LASSO_SAML_ASSERTION_HREF, LASSO_SAML_ASSERTION_PREFIX); + (xmlChar*)LASSO_SAML_ASSERTION_HREF, + (xmlChar*)LASSO_SAML_ASSERTION_PREFIX); xmlNewNs(envelope_node, - LASSO_DS_HREF, LASSO_DS_PREFIX); + (xmlChar*)LASSO_DS_HREF, + (xmlChar*)LASSO_DS_PREFIX); while (iter) { credential = (xmlNode *) iter->data; @@ -1110,12 +1117,9 @@ lasso_wsf_profile_ensure_soap_credentials_signature(LassoWsfProfile *profile, xmlDoc *doc, xmlNode *soap_envelope) { - int i; - xmlNode *credential; - GList *iter; - xmlXPathContext *xpathCtx = NULL; xmlXPathObject *xpathObj; + int i; xpathCtx = xmlXPathNewContext(doc); @@ -1141,9 +1145,7 @@ lasso_wsf_profile_build_soap_response_msg(LassoWsfProfile *profile) LassoSoapHeader *header; LassoWsseSecurity *security; - xmlNode *soap_envelope, *credential; - gchar *credentialRef; - GList *iter; + xmlNode *soap_envelope; xmlDoc *doc; @@ -1198,7 +1200,6 @@ lasso_wsf_profile_process_soap_request_msg(LassoWsfProfile *profile, const gchar LassoSoapBindingCorrelation *correlation; LassoSoapEnvelope *envelope = NULL; LassoSoapFault *fault = NULL; - GList *iter; gchar *messageId; int res = 0; xmlDoc *doc; diff --git a/lasso/id-wsf/wsf_profile.h b/lasso/id-wsf/wsf_profile.h index bcad451a..ecbc294c 100644 --- a/lasso/id-wsf/wsf_profile.h +++ b/lasso/id-wsf/wsf_profile.h @@ -115,6 +115,10 @@ LASSO_EXPORT LassoWsfProfile* lasso_wsf_profile_new(LassoServer *server); LASSO_EXPORT gboolean lasso_wsf_profile_principal_is_online(LassoWsfProfile *profile); +LASSO_EXPORT gint lasso_wsf_profile_add_credential(LassoWsfProfile *profile, xmlNode *credential); + +LASSO_EXPORT void lasso_wsf_profile_set_description(LassoWsfProfile *profile, + LassoDiscoDescription *description); LASSO_EXPORT void lasso_wsf_profile_set_principal_status(LassoWsfProfile *profile, const char *status); diff --git a/lasso/saml-2.0/login.c b/lasso/saml-2.0/login.c index 8d83beaf..5e619101 100644 --- a/lasso/saml-2.0/login.c +++ b/lasso/saml-2.0/login.c @@ -22,6 +22,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <libxml/xpath.h> +#include <libxml/xpathInternals.h> + #include <lasso/saml-2.0/providerprivate.h> #include <lasso/saml-2.0/loginprivate.h> #include <lasso/saml-2.0/profileprivate.h> @@ -161,7 +164,7 @@ lasso_saml20_login_build_authn_request_msg(LassoLogin *login, LassoProvider *rem } else { /* artifact method */ char *artifact = lasso_saml20_profile_generate_artifact(profile, 0); - char *url_artifact = xmlURIEscapeStr((xmlChar*)artifact, NULL); + char *url_artifact = (char*)xmlURIEscapeStr((xmlChar*)artifact, NULL); url = lasso_provider_get_metadata_one( remote_provider, "SingleSignOnService HTTP-Artifact"); if (login->http_method == LASSO_HTTP_METHOD_ARTIFACT_GET) { @@ -286,7 +289,7 @@ lasso_saml20_login_must_authenticate(LassoLogin *login) char *comparison = request->RequestedAuthnContext->Comparison; GList *class_refs = request->RequestedAuthnContext->AuthnContextClassRef; char *class_ref; - GList *t1, *t2, *t3; + GList *t1, *t2; int compa; if (comparison == NULL || strcmp(comparison, "exact") == 0) { @@ -659,7 +662,7 @@ lasso_saml20_login_build_artifact_msg(LassoLogin *login, LassoHttpMethod http_me login->assertionArtifact = g_strdup(artifact); if (http_method == LASSO_HTTP_METHOD_ARTIFACT_GET) { gchar *query; - char *url_artifact = xmlURIEscapeStr((xmlChar*)artifact, NULL); + char *url_artifact = (char*)xmlURIEscapeStr((xmlChar*)artifact, NULL); query = g_strdup_printf("SAMLart=%s", url_artifact); profile->msg_url = lasso_concat_url_query(url, query); g_free(query); @@ -818,7 +821,7 @@ lasso_saml20_login_process_paos_response_msg(LassoLogin *login, gchar *msg) xpathObj = xmlXPathEvalExpression((xmlChar*)"//ecp:RelayState", xpathCtx); if (xpathObj && xpathObj->nodesetval && xpathObj->nodesetval->nodeNr) { xmlnode = xpathObj->nodesetval->nodeTab[0]; - LASSO_PROFILE(login)->msg_relayState = xmlNodeGetContent(xmlnode); + LASSO_PROFILE(login)->msg_relayState = (char*)xmlNodeGetContent(xmlnode); } profile->response = response; @@ -1008,7 +1011,6 @@ static char* lasso_saml20_login_get_assertion_consumer_service_url(LassoLogin *login, LassoProvider *remote_provider) { - char *url; LassoSamlp2AuthnRequest *request; request = LASSO_SAMLP2_AUTHN_REQUEST(LASSO_PROFILE(login)->request); diff --git a/lasso/saml-2.0/loginprivate.h b/lasso/saml-2.0/loginprivate.h index eee1e6f2..99c1b693 100644 --- a/lasso/saml-2.0/loginprivate.h +++ b/lasso/saml-2.0/loginprivate.h @@ -34,6 +34,7 @@ extern "C" { gint lasso_saml20_login_init_authn_request(LassoLogin *login, LassoProvider *remote_provider, LassoHttpMethod http_method); gint lasso_saml20_login_build_authn_request_msg(LassoLogin *login, LassoProvider *remote_provider); +gint lasso_saml20_login_build_authn_response_msg(LassoLogin *login); gint lasso_saml20_login_process_authn_request_msg(LassoLogin *login, const char *authn_request_msg); gboolean lasso_saml20_login_must_authenticate(LassoLogin *login); gboolean lasso_saml20_login_must_ask_for_consent(LassoLogin *login); diff --git a/lasso/saml-2.0/name_id_management.c b/lasso/saml-2.0/name_id_management.c index 4df6a75d..d2e18897 100644 --- a/lasso/saml-2.0/name_id_management.c +++ b/lasso/saml-2.0/name_id_management.c @@ -23,6 +23,10 @@ */ #include <lasso/saml-2.0/name_id_management.h> +#include <lasso/saml-2.0/providerprivate.h> +#include <lasso/saml-2.0/profileprivate.h> +#include <lasso/id-ff/providerprivate.h> +#include <lasso/id-ff/identityprivate.h> /*****************************************************************************/ /* public methods */ @@ -129,9 +133,6 @@ lasso_name_id_management_build_request_msg(LassoNameIdManagement *name_id_manage { LassoProfile *profile; LassoProvider *remote_provider; - LassoFederation *federation; - LassoSaml2NameID *name_id, *name_id_n; - LassoSamlp2RequestAbstract *request; g_return_val_if_fail(LASSO_IS_NAME_ID_MANAGEMENT(name_id_management), -1); diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index cd73c08d..f906fd5a 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -220,9 +220,11 @@ lasso_node_export_to_ecp_soap_response(LassoNode *node, const char *assertionCon ecp_response = xmlNewNode(NULL, (xmlChar*)"Response"); ecp_ns = xmlNewNs(ecp_response, (xmlChar*)LASSO_ECP_HREF, (xmlChar*)LASSO_ECP_PREFIX); xmlSetNs(ecp_response, ecp_ns); - xmlSetNsProp(ecp_response, soap_env_ns, "mustUnderstand", "1"); - xmlSetNsProp(ecp_response, soap_env_ns, "actor", LASSO_SOAP_ENV_ACTOR); - xmlSetProp(ecp_response, "AssertionConsumerURL", assertionConsumerURL); + xmlSetNsProp(ecp_response, soap_env_ns, (xmlChar*)"mustUnderstand", (xmlChar*)"1"); + xmlSetNsProp(ecp_response, soap_env_ns, + (xmlChar*)"actor", (xmlChar*)LASSO_SOAP_ENV_ACTOR); + xmlSetProp(ecp_response, (xmlChar*)"AssertionConsumerURL", + (const xmlChar*)assertionConsumerURL); xmlAddChild(header, ecp_response); /* Body block */ @@ -275,33 +277,36 @@ lasso_node_export_to_paos_request(LassoNode *node, const char *issuer, paos_request = xmlNewNode(NULL, (xmlChar*)"Request"); xmlSetNs(paos_request, xmlNewNs(paos_request, (xmlChar*)LASSO_PAOS_HREF, (xmlChar*)LASSO_PAOS_PREFIX)); - xmlSetProp(paos_request, "service", LASSO_PAOS_HREF); - xmlSetNsProp(paos_request, soap_env_ns, "mustUnderstand", "1"); - xmlSetNsProp(paos_request, soap_env_ns, "actor", LASSO_SOAP_ENV_ACTOR); + xmlSetProp(paos_request, (xmlChar*)"service", (xmlChar*)LASSO_PAOS_HREF); + xmlSetNsProp(paos_request, soap_env_ns, (xmlChar*)"mustUnderstand", (xmlChar*)"1"); + xmlSetNsProp(paos_request, soap_env_ns, (xmlChar*)"actor", (xmlChar*)LASSO_SOAP_ENV_ACTOR); xmlAddChild(header, paos_request); /* ECP request header block */ ecp_request = xmlNewNode(NULL, (xmlChar*)"Request"); ecp_ns = xmlNewNs(ecp_request, (xmlChar*)LASSO_ECP_HREF, (xmlChar*)LASSO_ECP_PREFIX); xmlSetNs(ecp_request, ecp_ns); - xmlSetProp(ecp_request, "responseConsumerURL", responseConsumerURL); - xmlSetNsProp(ecp_request, soap_env_ns, "mustUnderstand", "1"); - xmlSetNsProp(ecp_request, soap_env_ns, "actor", LASSO_SOAP_ENV_ACTOR); + xmlSetProp(ecp_request, (xmlChar*)"responseConsumerURL", + (const xmlChar*)responseConsumerURL); + xmlSetNsProp(ecp_request, soap_env_ns, (xmlChar*)"mustUnderstand", (xmlChar*)"1"); + xmlSetNsProp(ecp_request, soap_env_ns, (xmlChar*)"actor", (xmlChar*)LASSO_SOAP_ENV_ACTOR); saml_ns = xmlNewNs(ecp_request, - (xmlChar*)LASSO_SAML_ASSERTION_HREF, - (xmlChar*)LASSO_SAML_ASSERTION_PREFIX); - xmlNewTextChild(ecp_request, saml_ns, (xmlChar*)"Issuer", issuer); + (xmlChar*)LASSO_SAML_ASSERTION_HREF, + (xmlChar*)LASSO_SAML_ASSERTION_PREFIX); + xmlNewTextChild(ecp_request, saml_ns, (xmlChar*)"Issuer", (const xmlChar*)issuer); xmlAddChild(header, ecp_request); /* ECP relay state block */ if (relay_state) { ecp_relay_state = xmlNewNode(NULL, (xmlChar*)"RelayState"); - xmlNodeSetContent(ecp_relay_state, relay_state); + xmlNodeSetContent(ecp_relay_state, (const xmlChar*)relay_state); ecp_ns = xmlNewNs(ecp_relay_state, (xmlChar*)LASSO_ECP_HREF, (xmlChar*)LASSO_ECP_PREFIX); xmlSetNs(ecp_relay_state, ecp_ns); - xmlSetNsProp(ecp_relay_state, soap_env_ns, "mustUnderstand", "1"); - xmlSetNsProp(ecp_relay_state, soap_env_ns, "actor", LASSO_SOAP_ENV_ACTOR); + xmlSetNsProp(ecp_relay_state, soap_env_ns, + (xmlChar*)"mustUnderstand", (xmlChar*)"1"); + xmlSetNsProp(ecp_relay_state, soap_env_ns, + (xmlChar*)"actor", (xmlChar*)LASSO_SOAP_ENV_ACTOR); xmlAddChild(header, ecp_relay_state); } @@ -398,7 +403,6 @@ lasso_node_encrypt(LassoNode *lasso_node, xmlSecKey *encryption_public_key) xmlNodePtr orig_node = NULL; xmlNodePtr encrypted_data_node = NULL; xmlSecKeysMngrPtr key_manager = NULL; - xmlSecKeyPtr key = NULL; xmlNodePtr key_info_node = NULL; xmlNodePtr encrypted_key_node = NULL; xmlNodePtr key_info_node2 = NULL; |
