~ubuntu-branches/ubuntu/dapper/lasso/dapper

« back to all changes in this revision

Viewing changes to lasso/xml/samlp_response.c

  • Committer: Bazaar Package Importer
  • Author(s): Loic Pefferkorn
  • Date: 2005-11-25 19:20:59 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051125192059-m4894lhpynmkrmwr
Tags: 0.6.3-4ubuntu1
Resynchronise with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 $ 
2
2
 *
3
3
 * Lasso - A free implementation of the Liberty Alliance specifications.
4
4
 *
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);
78
78
        }
79
79
 
80
80
 
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) ;
82
82
 
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");
90
92
        }
91
93
 
92
94
        return xmlnode;