1
/* $Id: samlp_response.c,v 1.26 2005/03/29 14:37:24 fpeters Exp $
1
/* $Id: samlp_response.c,v 1.27 2005/07/30 22:36:54 fpeters Exp $
3
3
* Lasso - A free implementation of the Liberty Alliance specifications.
74
74
if (LASSO_SAMLP_RESPONSE(node)->Status &&
75
75
has_lib_status(LASSO_SAMLP_RESPONSE(node)->Status->StatusCode)) {
76
76
/* liberty QName, add liberty namespace */
77
xmlNewNs(xmlnode, LASSO_LIB_HREF, LASSO_LIB_PREFIX);
77
xmlNewNs(xmlnode, (xmlChar*)LASSO_LIB_HREF, (xmlChar*)LASSO_LIB_PREFIX);
81
for (t = xmlnode->children; t && strcmp(t->name, "Assertion"); t = t->next) ;
81
for (t = xmlnode->children; t && strcmp((char*)t->name, "Assertion"); t = t->next) ;
83
if (t && strcmp(t->ns->href, LASSO_LIB_HREF) == 0) {
83
if (t && strcmp((char*)t->ns->href, LASSO_LIB_HREF) == 0) {
84
84
/* liberty nodes are not allowed in samlp nodes */
85
xmlSetNs(t, xmlNewNs(xmlnode, LASSO_SAML_ASSERTION_HREF,
86
LASSO_SAML_ASSERTION_PREFIX));
87
if (xmlHasNsProp(t, "type", LASSO_XSI_HREF) == NULL)
88
xmlNewNsProp(t, xmlNewNs(xmlnode, LASSO_XSI_HREF, LASSO_XSI_PREFIX),
89
"type", "lib:AssertionType");
85
xmlSetNs(t, xmlNewNs(xmlnode, (xmlChar*)LASSO_SAML_ASSERTION_HREF,
86
(xmlChar*)LASSO_SAML_ASSERTION_PREFIX));
87
if (xmlHasNsProp(t, (xmlChar*)"type", (xmlChar*)LASSO_XSI_HREF) == NULL)
88
xmlNewNsProp(t, xmlNewNs(xmlnode,
89
(xmlChar*)LASSO_XSI_HREF,
90
(xmlChar*)LASSO_XSI_PREFIX),
91
(xmlChar*)"type", (xmlChar*)"lib:AssertionType");