diff options
-rw-r--r-- | lasso/id-ff/session.c | 6 | ||||
-rw-r--r-- | lasso/xml/saml_advice.c | 5 | ||||
-rw-r--r-- | lasso/xml/saml_advice.h | 6 |
3 files changed, 10 insertions, 7 deletions
diff --git a/lasso/id-ff/session.c b/lasso/id-ff/session.c index 113ae47a..42b2aa2e 100644 --- a/lasso/id-ff/session.c +++ b/lasso/id-ff/session.c @@ -88,9 +88,9 @@ lasso_session_add_assertion(LassoSession *session, const char *providerID, Lasso LassoSamlAssertion *saml_assertion = LASSO_SAML_ASSERTION(assertion); if (saml_assertion->Advice) { LassoSamlAdvice *advice = saml_assertion->Advice; - GList *iter; - for (iter = advice->any; iter; iter = iter->next) { - xmlNode *node = (xmlNodePtr)iter->data; + LassoSamlAssertion *advice_assertion = (LassoSamlAssertion*)advice->Assertion; + if (LASSO_IS_SAML_ASSERTION(advice_assertion)) { + xmlNode *node = lasso_node_get_original_xmlnode(&advice_assertion->parent); if (xmlSecCheckNodeName(node, (xmlChar*)"Assertion", (xmlChar*)LASSO_SAML_ASSERTION_HREF)) { xmlChar *id = xmlGetProp(node, (xmlChar*)"AssertionID"); ret = lasso_session_add_assertion_with_id(session, (char*)id, node); diff --git a/lasso/xml/saml_advice.c b/lasso/xml/saml_advice.c index 9d440ba2..8c45cc2a 100644 --- a/lasso/xml/saml_advice.c +++ b/lasso/xml/saml_advice.c @@ -54,10 +54,9 @@ /*****************************************************************************/ static struct XmlSnippet schema_snippets[] = { -/* { "AssertionIDReference", SNIPPET_LIST_CONTENT, + { "AssertionIDReference", SNIPPET_LIST_CONTENT, G_STRUCT_OFFSET(LassoSamlAdvice, AssertionIDReference), NULL, NULL, NULL}, - { "Assertion", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlAdvice, Assertion), NULL, NULL, NULL}, */ - { "", SNIPPET_LIST_XMLNODES, G_STRUCT_OFFSET(LassoSamlAdvice, any), NULL, NULL, NULL}, + { "Assertion", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlAdvice, Assertion), NULL, NULL, NULL}, {NULL, 0, 0, NULL, NULL, NULL} }; diff --git a/lasso/xml/saml_advice.h b/lasso/xml/saml_advice.h index 2b3cdea7..82b0ecc2 100644 --- a/lasso/xml/saml_advice.h +++ b/lasso/xml/saml_advice.h @@ -49,7 +49,11 @@ struct _LassoSamlAdvice { LassoNode parent; /*< public >*/ - GList *any; /* of xmlNode */ + /* <element ref="saml:AssertionIDReference"/> */ + GList *AssertionIDReference; /* of LassoNode */ + /* <element ref="saml:Assertion"/> */ + LassoNode *Assertion; /* actually LassoSamlAssertion* but it recurses */ + }; struct _LassoSamlAdviceClass { |