summaryrefslogtreecommitdiffstats
path: root/lasso
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-08-09 17:08:16 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-08-09 17:08:16 +0000
commite851b95362633806e5ec851ff04d458b732d3ccd (patch)
treed1654f24a00ac99d835c5f0e2f0292b85cb65124 /lasso
parentbab89ab572a7045ffe1fb1fa70027609bcec9369 (diff)
downloadlasso-e851b95362633806e5ec851ff04d458b732d3ccd.tar.gz
lasso-e851b95362633806e5ec851ff04d458b732d3ccd.tar.xz
lasso-e851b95362633806e5ec851ff04d458b732d3ccd.zip
Fixed a BIG bug in lasso_node_add_child() method
Diffstat (limited to 'lasso')
-rw-r--r--lasso/xml/xml.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c
index a3f4c640..3bb2c54d 100644
--- a/lasso/xml/xml.c
+++ b/lasso/xml/xml.c
@@ -652,6 +652,7 @@ lasso_node_impl_export_to_query(LassoNode *node,
/* try to sign query */
doc = lasso_str_sign(query->str, sign_method, private_key_file);
if (doc != NULL) {
+ /* get signature (base64 encoded) */
str1 = lasso_doc_get_node_content(doc, xmlSecNodeSignatureValue);
str2 = lasso_str_escape(str1);
xmlFree(str1);
@@ -1095,16 +1096,16 @@ lasso_node_impl_add_child(LassoNode *node,
g_return_if_fail (LASSO_IS_NODE(child));
/* if child is not unbounded, we search it */
- if (!unbounded) {
- if (node->private->node->ns != NULL) {
- href = node->private->node->ns->href;
+ if (unbounded == FALSE) {
+ if (child->private->node->ns != NULL) {
+ href = child->private->node->ns->href;
}
old_child = xmlSecFindNode(node->private->node,
child->private->node->name,
href);
}
- if (!unbounded && old_child != NULL) {
+ if (unbounded == FALSE && old_child != NULL) {
/* child replace old child */
xmlReplaceNode(old_child, child->private->node);
}