remove removed code

This commit is contained in:
Frédéric Péters 2004-09-17 10:15:16 +00:00
parent 9275ffed95
commit 32fe149c50
6 changed files with 2 additions and 124 deletions

View File

@ -326,12 +326,6 @@ lasso_artifact_new_from_query(const xmlChar *query)
identityProviderSuccinctID,
assertionHandle);
/* printf("b64_samlArt = %s\n", b64_samlArt); */
/* printf("relayState = %s\n", relayState); */
/* printf("byteCode = %s\n", byteCode); */
/* printf("identityProviderSuccinctID = %s\n", identityProviderSuccinctID); */
/* printf("assertionHandle = %s\n", assertionHandle); */
if (ret >= 0) {
artifact = lasso_artifact_new(b64_samlArt,
byteCode, identityProviderSuccinctID,

View File

@ -98,19 +98,6 @@ lasso_logout_request_new(gchar *providerID,
(const xmlChar *)time);
xmlFree(time);
/* class = LASSO_NODE_GET_CLASS(request); */
/* doc = xmlNewDoc("1.0"); */
/* xmlNode = class->get_xmlNode(request); */
/* xmlAddChild((xmlNodePtr)doc, xmlNode); */
/* id_attr = lasso_node_get_attr(request, "RequestID", NULL); */
/* if (id_attr != NULL) { */
/* printf("Request id found %s, get his value and set ID\n", xmlNode->name); */
/* id_value = xmlNodeListGetString(doc, id_attr->children, 1); */
/* id = xmlAddID(NULL, doc, id_value, id_attr); */
/* printf("id from xmlAddID() %s\n", id->value); */
/* xmlFree(id_value); */
/* } */
/* set the signature template */
if (sign_type != lassoSignatureTypeNone) {
lasso_samlp_request_abstract_set_signature_tmpl(LASSO_SAMLP_REQUEST_ABSTRACT(request),

View File

@ -157,26 +157,7 @@ lasso_login_process_federation(LassoLogin *login)
}
else if (xmlStrEqual(nameIDPolicy, lassoLibNameIDPolicyTypeFederated)) {
debug("NameIDPolicy is federated\n");
/* FIXME : AuthnRequest consent attribute */
/* consent = lasso_node_get_attr_value(LASSO_PROFILE(login)->request, */
/* "consent", &err); */
/* if (consent != NULL) { */
/* if (!xmlStrEqual(consent, lassoLibConsentObtained)) { */
/* lasso_profile_set_response_status(LASSO_PROFILE(login), */
/* lassoSamlStatusCodeRequestDenied); */
/* message(G_LOG_LEVEL_WARNING, "Consent not obtained"); */
/* ret = -3; */
/* goto done; */
/* } */
/* } */
/* else { */
/* lasso_profile_set_response_status(LASSO_PROFILE(login), */
/* lassoSamlStatusCodeRequestDenied); */
/* message(G_LOG_LEVEL_WARNING, err->message); */
/* ret = err->code; */
/* g_error_free(err); */
/* goto done; */
/* } */
/* FIXME : check AuthnRequest consent attribute */
if (federation == NULL) {
federation = lasso_federation_new(LASSO_PROFILE(login)->remote_providerID);
@ -261,7 +242,6 @@ lasso_login_process_response_status_and_assertion(LassoLogin *login) {
/* verify signature */
if (idp != NULL) {
/* FIXME detect X509Data ? */
/* signature_check = lasso_node_verify_x509_signature(assertion, idp->ca_certificate); */
ret = lasso_node_verify_signature(assertion, idp->public_key);
if (ret < 0) {
goto done;
@ -284,14 +264,6 @@ lasso_login_process_response_status_and_assertion(LassoLogin *login) {
/* we continue */
}
}
/* nico : dont return a code error if no assertion found */
/* else { */
/* /\* no assertion found *\/ */
/* debug(err->message); */
/* ret = err->code; */
/* g_clear_error(&err); */
/* /\* we continue *\/ */
/* } */
done:
if (err != NULL) {
@ -477,10 +449,7 @@ lasso_login_build_artifact_msg(LassoLogin *login,
}
}
/* save response dump */
/* login->response_dump = lasso_node_export_to_soap(LASSO_PROFILE(login)->response); */
/* nico : doesn't dump the response anymore, instead store the assertion */
/* store the assertion */
login->assertion = NULL;
assertion_node = lasso_node_get_child(LASSO_PROFILE(login)->response, "Assertion", NULL, NULL);
if (assertion_node != NULL) {
@ -1018,8 +987,6 @@ lasso_login_init_from_authn_request_msg(LassoLogin *login,
break;
case lassoHttpMethodPost:
/* FIXME detect X509Data ? */
/* ret = lasso_node_verify_x509_signature(LASSO_PROFILE(login)->request, */
/* remote_provider->ca_certificate); */
ret = lasso_node_verify_signature(LASSO_PROFILE(login)->request,
remote_provider->public_key);
break;

View File

@ -75,7 +75,6 @@ lasso_name_identifier_mapping_build_request_msg(LassoNameIdentifierMapping *mapp
xmlStrEqual(protocolProfile, lassoLibProtocolProfileSloIdpSoap)) {
debug("building a soap request message\n");
profile->request_type = lassoHttpMethodSoap;
/* profile->msg_url = lasso_provider_get_nameIdentifierMappingServiceURL(provider, NULL); */
profile->msg_body = lasso_node_export_to_soap(profile->request);
}
else if(xmlStrEqual(protocolProfile,lassoLibProtocolProfileSloSpHttp) || \
@ -125,7 +124,6 @@ lasso_name_identifier_mapping_build_response_msg(LassoNameIdentifierMapping *map
if(xmlStrEqual(protocolProfile, lassoLibProtocolProfileSloSpSoap) || \
xmlStrEqual(protocolProfile, lassoLibProtocolProfileSloIdpSoap)) {
debug("building a soap response message\n");
/* profile->msg_url = lasso_provider_get_nameIdentifierMappingServiceURL(provider, NULL); */
profile->msg_body = lasso_node_export_to_soap(profile->response);
}
else if(xmlStrEqual(protocolProfile,lassoLibProtocolProfileSloSpHttp) || \

View File

@ -61,7 +61,6 @@ _debug(GLogLevelFlags level,
time_t ts;
char date[20];
va_list args;
/* char *color = NULL; */
if (level == G_LOG_LEVEL_DEBUG && debug_type == 0) {
g_warning("message() function should not be used with G_LOG_LEVEL_DEBUG level. Use debug() function rather.");
@ -75,21 +74,6 @@ _debug(GLogLevelFlags level,
time(&ts);
strftime(date, 20, "%d-%m-%Y %H:%M:%S", localtime(&ts));
/* switch (level) { */
/* case ERROR: */
/* color = red; */
/* break; */
/* case WARNING: */
/* color = blue; */
/* break; */
/* case DEBUG: */
/* color = yellow; */
/* break; */
/* case INFO: */
/* color = green; */
/* break; */
/* } */
if (level == G_LOG_LEVEL_DEBUG || level == G_LOG_LEVEL_CRITICAL) {
g_log("Lasso", level,
"%s (%s/%s:%d)\n======> %s",

View File

@ -961,40 +961,6 @@ lasso_node_impl_get_child(LassoNode *node,
g_return_val_if_fail(name != NULL, NULL);
}
/* /\* No recurssive version *\/ */
/* xmlNodePtr cur; */
/* cur = node->private->node->children; */
/* while (cur != NULL) { */
/* if(cur->type == XML_ELEMENT_NODE) { */
/* if (xmlStrEqual(cur->name, name)) { */
/* return (lasso_node_new_from_xmlNode(cur)); */
/* } */
/* } */
/* cur = cur->next; */
/* } */
/* return (NULL); */
/* /\* Recurssive version *\/ */
/* xmlNodePtr cur; */
/* LassoNode *ret, *child; */
/* cur = node->private->node; */
/* while (cur != NULL) { */
/* if ((cur->type == XML_ELEMENT_NODE) && xmlStrEqual(cur->name, name)) { */
/* return (lasso_node_new_from_xmlNode(cur)); */
/* } */
/* if (cur->children != NULL) { */
/* child = lasso_node_new_from_xmlNode(cur->children); */
/* ret = lasso_node_get_child(child, name); */
/* if (ret != NULL) { */
/* return (ret); */
/* } */
/* } */
/* cur = cur->next; */
/* } */
/* return (NULL); */
if (href != NULL) {
child = xmlSecFindNode(node->private->node, name, href);
}
@ -1439,9 +1405,6 @@ lasso_node_impl_add_signature_tmpl(LassoNode *node,
return LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED;
}
/* uri = xmlMalloc(strlen(reference_uri)+1+1); */
/* g_sprintf(uri, "#%s", reference_uri); */
if (reference_uri != NULL) {
uri = xmlMalloc(strlen(reference_uri)+1+1);
g_sprintf(uri, "#%s", reference_uri);
@ -1577,7 +1540,6 @@ lasso_node_impl_new_child(LassoNode *node,
const xmlChar *content,
gboolean unbounded)
{
/* LassoNode *old_child = NULL; */
xmlNodePtr old_child = NULL;
const xmlChar *href = NULL;
@ -1590,11 +1552,9 @@ lasso_node_impl_new_child(LassoNode *node,
href = node->private->node->ns->href;
}
old_child = xmlSecFindNode(node->private->node, name, href);
/* old_child = lasso_node_get_child(node, name); */
}
if (!unbounded && old_child != NULL) {
/* xmlNodeSetContent(old_child->private->node, content); */
xmlNodeSetContent(old_child, content);
}
else {
@ -1724,18 +1684,6 @@ lasso_node_impl_set_ns(LassoNode *node,
g_return_if_fail (LASSO_IS_NODE(node));
g_return_if_fail (href != NULL || prefix != NULL);
/* xmlNsPtr cur; */
/* cur = node->private->node->ns; */
/* while (cur != NULL) { */
/* printf("%s:%s\n", cur->prefix, cur->href); */
/* cur = cur->next; */
/* } */
/* cur = node->private->node->nsDef; */
/* while (cur != NULL) { */
/* printf("%s:%s\n", cur->prefix, cur->href); */
/* cur = cur->next; */
/* } */
new_ns = xmlNewNs(node->private->node, href, prefix);
xmlFreeNs(node->private->node->ns);
xmlSetNs(node->private->node, new_ns);