summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-06-07 12:09:58 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-09-02 10:04:42 (GMT)
commit4ad4b673940ef72de1a62d7589cd0d86290086b1 (patch)
treeec1c7ca2963d409f3cf0bb20fa26c8ae1ac01f7b
parenta27d1686b387a045607b5f0802001ea8863342cb (diff)
downloadlasso-4ad4b673940ef72de1a62d7589cd0d86290086b1.zip
lasso-4ad4b673940ef72de1a62d7589cd0d86290086b1.tar.gz
lasso-4ad4b673940ef72de1a62d7589cd0d86290086b1.tar.bz2
xml: modify xschema snippets to handle xsd:choice constructs
-rw-r--r--lasso/xml/saml-2.0/saml2_advice.c6
-rw-r--r--lasso/xml/saml-2.0/saml2_assertion.c6
-rw-r--r--lasso/xml/saml-2.0/saml2_attribute_statement.c2
-rw-r--r--lasso/xml/saml-2.0/saml2_authn_context.c10
-rw-r--r--lasso/xml/saml-2.0/saml2_conditions.c6
-rw-r--r--lasso/xml/saml-2.0/saml2_evidence.c16
-rw-r--r--lasso/xml/saml-2.0/saml2_subject.c8
-rw-r--r--lasso/xml/saml-2.0/saml2_subject_confirmation.c4
-rw-r--r--lasso/xml/saml-2.0/samlp2_logout_request.c4
-rw-r--r--lasso/xml/saml-2.0/samlp2_manage_name_id_request.c6
-rw-r--r--lasso/xml/saml-2.0/samlp2_name_id_mapping_request.c4
-rw-r--r--lasso/xml/saml-2.0/samlp2_name_id_mapping_response.c2
-rw-r--r--lasso/xml/saml-2.0/samlp2_requested_authn_context.c10
-rw-r--r--lasso/xml/saml-2.0/samlp2_response.c5
-rw-r--r--lasso/xml/saml_advice.c2
-rw-r--r--lasso/xml/saml_assertion.c4
-rw-r--r--lasso/xml/saml_subject.c2
17 files changed, 60 insertions, 37 deletions
diff --git a/lasso/xml/saml-2.0/saml2_advice.c b/lasso/xml/saml-2.0/saml2_advice.c
index e5ea13d..54c436e 100644
--- a/lasso/xml/saml-2.0/saml2_advice.c
+++ b/lasso/xml/saml-2.0/saml2_advice.c
@@ -52,11 +52,11 @@
static struct XmlSnippet schema_snippets[] = {
{ "AssertionIDRef", SNIPPET_LIST_NODES,
G_STRUCT_OFFSET(LassoSaml2Advice, AssertionIDRef), NULL, NULL, NULL},
- { "AssertionURIRef", SNIPPET_LIST_NODES,
+ { "AssertionURIRef", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_1,
G_STRUCT_OFFSET(LassoSaml2Advice, AssertionURIRef), NULL, NULL, NULL},
- { "Assertion", SNIPPET_LIST_NODES,
+ { "Assertion", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_2,
G_STRUCT_OFFSET(LassoSaml2Advice, Assertion), NULL, NULL, NULL},
- { "EncryptedAssertion", SNIPPET_LIST_NODES,
+ { "EncryptedAssertion", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_3,
G_STRUCT_OFFSET(LassoSaml2Advice, EncryptedAssertion), NULL, NULL, NULL},
{NULL, 0, 0, NULL, NULL, NULL}
};
diff --git a/lasso/xml/saml-2.0/saml2_assertion.c b/lasso/xml/saml-2.0/saml2_assertion.c
index 3346a86..549742a 100644
--- a/lasso/xml/saml-2.0/saml2_assertion.c
+++ b/lasso/xml/saml-2.0/saml2_assertion.c
@@ -78,11 +78,11 @@ static struct XmlSnippet schema_snippets[] = {
G_STRUCT_OFFSET(LassoSaml2Assertion, Advice), NULL, NULL, NULL},
{ "Statement", SNIPPET_LIST_NODES,
G_STRUCT_OFFSET(LassoSaml2Assertion, Statement), NULL, NULL, NULL},
- { "AuthnStatement", SNIPPET_LIST_NODES,
+ { "AuthnStatement", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_1,
G_STRUCT_OFFSET(LassoSaml2Assertion, AuthnStatement), NULL, NULL, NULL},
- { "AuthzDecisionStatement", SNIPPET_LIST_NODES,
+ { "AuthzDecisionStatement", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_2,
G_STRUCT_OFFSET(LassoSaml2Assertion, AuthzDecisionStatement), NULL, NULL, NULL},
- { "AttributeStatement", SNIPPET_LIST_NODES,
+ { "AttributeStatement", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_3,
G_STRUCT_OFFSET(LassoSaml2Assertion, AttributeStatement), NULL, NULL, NULL},
{ "Version", SNIPPET_ATTRIBUTE,
G_STRUCT_OFFSET(LassoSaml2Assertion, Version), NULL, NULL, NULL},
diff --git a/lasso/xml/saml-2.0/saml2_attribute_statement.c b/lasso/xml/saml-2.0/saml2_attribute_statement.c
index b7303fe..e251c6b 100644
--- a/lasso/xml/saml-2.0/saml2_attribute_statement.c
+++ b/lasso/xml/saml-2.0/saml2_attribute_statement.c
@@ -53,7 +53,7 @@
static struct XmlSnippet schema_snippets[] = {
{ "Attribute", SNIPPET_LIST_NODES,
G_STRUCT_OFFSET(LassoSaml2AttributeStatement, Attribute), NULL, NULL, NULL},
- { "EncryptedAttribute", SNIPPET_LIST_NODES,
+ { "EncryptedAttribute", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_1,
G_STRUCT_OFFSET(LassoSaml2AttributeStatement, EncryptedAttribute), NULL, NULL, NULL},
{NULL, 0, 0, NULL, NULL, NULL}
};
diff --git a/lasso/xml/saml-2.0/saml2_authn_context.c b/lasso/xml/saml-2.0/saml2_authn_context.c
index 995a7ab..5b7c498 100644
--- a/lasso/xml/saml-2.0/saml2_authn_context.c
+++ b/lasso/xml/saml-2.0/saml2_authn_context.c
@@ -59,11 +59,15 @@
static struct XmlSnippet schema_snippets[] = {
- { "AuthnContextClassRef", SNIPPET_CONTENT | SNIPPET_OPTIONAL,
+ { "AuthnContextClassRef", SNIPPET_CONTENT | SNIPPET_OPTIONAL | SNIPPET_JUMP_ON_MISS | SNIPPET_JUMP_3,
G_STRUCT_OFFSET(LassoSaml2AuthnContext, AuthnContextClassRef), NULL, NULL, NULL},
- { "AuthnContextDecl", SNIPPET_NODE | SNIPPET_OPTIONAL,
+ { "AuthnContextDecl", SNIPPET_NODE | SNIPPET_OPTIONAL | SNIPPET_JUMP_ON_MISS | SNIPPET_JUMP_4,
G_STRUCT_OFFSET(LassoSaml2AuthnContext, AuthnContextDecl), NULL, NULL, NULL},
- { "AuthnContextDeclRef", SNIPPET_CONTENT | SNIPPET_OPTIONAL,
+ { "AuthnContextDeclRef", SNIPPET_CONTENT | SNIPPET_OPTIONAL | SNIPPET_JUMP | SNIPPET_JUMP_3,
+ G_STRUCT_OFFSET(LassoSaml2AuthnContext, AuthnContextDeclRef), NULL, NULL, NULL},
+ { "AuthnContextDecl", SNIPPET_NODE | SNIPPET_OPTIONAL | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2,
+ G_STRUCT_OFFSET(LassoSaml2AuthnContext, AuthnContextDecl), NULL, NULL, NULL},
+ { "AuthnContextDeclRef", SNIPPET_CONTENT | SNIPPET_MANDATORY,
G_STRUCT_OFFSET(LassoSaml2AuthnContext, AuthnContextDeclRef), NULL, NULL, NULL},
{ "AuthenticatingAuthority", SNIPPET_CONTENT | SNIPPET_OPTIONAL,
G_STRUCT_OFFSET(LassoSaml2AuthnContext, AuthenticatingAuthority), NULL, NULL, NULL},
diff --git a/lasso/xml/saml-2.0/saml2_conditions.c b/lasso/xml/saml-2.0/saml2_conditions.c
index 37bff88..cfa1b01 100644
--- a/lasso/xml/saml-2.0/saml2_conditions.c
+++ b/lasso/xml/saml-2.0/saml2_conditions.c
@@ -53,11 +53,11 @@
static struct XmlSnippet schema_snippets[] = {
{ "Condition", SNIPPET_LIST_NODES,
G_STRUCT_OFFSET(LassoSaml2Conditions, Condition), NULL, NULL, NULL},
- { "AudienceRestriction", SNIPPET_LIST_NODES,
+ { "AudienceRestriction", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_1,
G_STRUCT_OFFSET(LassoSaml2Conditions, AudienceRestriction), NULL, NULL, NULL},
- { "OneTimeUse", SNIPPET_LIST_NODES,
+ { "OneTimeUse", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_2,
G_STRUCT_OFFSET(LassoSaml2Conditions, OneTimeUse), NULL, NULL, NULL},
- { "ProxyRestriction", SNIPPET_LIST_NODES,
+ { "ProxyRestriction", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_3,
G_STRUCT_OFFSET(LassoSaml2Conditions, ProxyRestriction), NULL, NULL, NULL},
{ "NotBefore", SNIPPET_ATTRIBUTE,
G_STRUCT_OFFSET(LassoSaml2Conditions, NotBefore), NULL, NULL, NULL},
diff --git a/lasso/xml/saml-2.0/saml2_evidence.c b/lasso/xml/saml-2.0/saml2_evidence.c
index 986390c..bb9b66f 100644
--- a/lasso/xml/saml-2.0/saml2_evidence.c
+++ b/lasso/xml/saml-2.0/saml2_evidence.c
@@ -49,13 +49,23 @@
static struct XmlSnippet schema_snippets[] = {
+ /* 1 */
+ { "AssertionIDRef", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_4,
+ G_STRUCT_OFFSET(LassoSaml2Evidence, AssertionIDRef), NULL, NULL, NULL},
+ { "AssertionURIRef", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_3,
+ G_STRUCT_OFFSET(LassoSaml2Evidence, AssertionURIRef), NULL, NULL, NULL},
+ { "Assertion", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2,
+ G_STRUCT_OFFSET(LassoSaml2Evidence, Assertion), NULL, NULL, NULL},
+ { "EncryptedAssertion", SNIPPET_LIST_NODES | SNIPPET_MANDATORY | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_1,
+ G_STRUCT_OFFSET(LassoSaml2Evidence, EncryptedAssertion), NULL, NULL, NULL},
+ /* star */
{ "AssertionIDRef", SNIPPET_LIST_NODES,
G_STRUCT_OFFSET(LassoSaml2Evidence, AssertionIDRef), NULL, NULL, NULL},
- { "AssertionURIRef", SNIPPET_LIST_NODES,
+ { "AssertionURIRef", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_1,
G_STRUCT_OFFSET(LassoSaml2Evidence, AssertionURIRef), NULL, NULL, NULL},
- { "Assertion", SNIPPET_LIST_NODES,
+ { "Assertion", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_2,
G_STRUCT_OFFSET(LassoSaml2Evidence, Assertion), NULL, NULL, NULL},
- { "EncryptedAssertion", SNIPPET_LIST_NODES,
+ { "EncryptedAssertion", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_3,
G_STRUCT_OFFSET(LassoSaml2Evidence, EncryptedAssertion), NULL, NULL, NULL},
{NULL, 0, 0, NULL, NULL, NULL}
};
diff --git a/lasso/xml/saml-2.0/saml2_subject.c b/lasso/xml/saml-2.0/saml2_subject.c
index f9d865f..9bba80d 100644
--- a/lasso/xml/saml-2.0/saml2_subject.c
+++ b/lasso/xml/saml-2.0/saml2_subject.c
@@ -54,13 +54,15 @@
static struct XmlSnippet schema_snippets[] = {
- { "BaseID", SNIPPET_NODE,
+ { "BaseID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_3,
G_STRUCT_OFFSET(LassoSaml2Subject, BaseID), NULL, NULL, NULL},
- { "NameID", SNIPPET_NODE,
+ { "NameID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2,
G_STRUCT_OFFSET(LassoSaml2Subject, NameID), NULL, NULL, NULL},
- { "EncryptedID", SNIPPET_NODE,
+ { "EncryptedID", SNIPPET_NODE | SNIPPET_JUMP_ON_MISS | SNIPPET_JUMP_2,
G_STRUCT_OFFSET(LassoSaml2Subject, EncryptedID),
"LassoSaml2EncryptedElement", NULL, NULL},
+ { "SubjectConfirmation", SNIPPET_NODE | SNIPPET_OPTIONAL | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2,
+ G_STRUCT_OFFSET(LassoSaml2Subject, SubjectConfirmation), NULL, NULL, NULL},
{ "SubjectConfirmation", SNIPPET_NODE,
G_STRUCT_OFFSET(LassoSaml2Subject, SubjectConfirmation), NULL, NULL, NULL},
{NULL, 0, 0, NULL, NULL, NULL}
diff --git a/lasso/xml/saml-2.0/saml2_subject_confirmation.c b/lasso/xml/saml-2.0/saml2_subject_confirmation.c
index 3a8f904..e591369 100644
--- a/lasso/xml/saml-2.0/saml2_subject_confirmation.c
+++ b/lasso/xml/saml-2.0/saml2_subject_confirmation.c
@@ -52,9 +52,9 @@
static struct XmlSnippet schema_snippets[] = {
- { "BaseID", SNIPPET_NODE,
+ { "BaseID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_3,
G_STRUCT_OFFSET(LassoSaml2SubjectConfirmation, BaseID), NULL, NULL, NULL},
- { "NameID", SNIPPET_NODE,
+ { "NameID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2,
G_STRUCT_OFFSET(LassoSaml2SubjectConfirmation, NameID), NULL, NULL, NULL},
{ "EncryptedID", SNIPPET_NODE,
G_STRUCT_OFFSET(LassoSaml2SubjectConfirmation, EncryptedID),
diff --git a/lasso/xml/saml-2.0/samlp2_logout_request.c b/lasso/xml/saml-2.0/samlp2_logout_request.c
index 034d63d..d57f078 100644
--- a/lasso/xml/saml-2.0/samlp2_logout_request.c
+++ b/lasso/xml/saml-2.0/samlp2_logout_request.c
@@ -66,9 +66,9 @@ struct _LassoSamlp2LogoutRequestPrivate {
static struct XmlSnippet schema_snippets[] = {
- { "BaseID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2LogoutRequest, BaseID), NULL,
+ { "BaseID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_3, G_STRUCT_OFFSET(LassoSamlp2LogoutRequest, BaseID), NULL,
LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF},
- { "NameID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2LogoutRequest, NameID), NULL,
+ { "NameID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2, G_STRUCT_OFFSET(LassoSamlp2LogoutRequest, NameID), NULL,
LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF},
{ "EncryptedID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2LogoutRequest, EncryptedID), NULL,
LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF},
diff --git a/lasso/xml/saml-2.0/samlp2_manage_name_id_request.c b/lasso/xml/saml-2.0/samlp2_manage_name_id_request.c
index ff9dc34..e2d8312 100644
--- a/lasso/xml/saml-2.0/samlp2_manage_name_id_request.c
+++ b/lasso/xml/saml-2.0/samlp2_manage_name_id_request.c
@@ -58,14 +58,14 @@
static struct XmlSnippet schema_snippets[] = {
- { "NameID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2ManageNameIDRequest, NameID), NULL,
+ { "NameID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2, G_STRUCT_OFFSET(LassoSamlp2ManageNameIDRequest, NameID), NULL,
LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF},
{ "EncryptedID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2ManageNameIDRequest, EncryptedID),
"LassoSaml2EncryptedElement", LASSO_SAML2_ASSERTION_PREFIX,
LASSO_SAML2_ASSERTION_HREF},
- { "NewID", SNIPPET_CONTENT,
+ { "NewID", SNIPPET_CONTENT | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_3,
G_STRUCT_OFFSET(LassoSamlp2ManageNameIDRequest, NewID), NULL, NULL, NULL},
- { "NewEncryptedID", SNIPPET_NODE,
+ { "NewEncryptedID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2,
G_STRUCT_OFFSET(LassoSamlp2ManageNameIDRequest, NewEncryptedID),
"LassoSaml2EncryptedElement", NULL, NULL},
{ "Terminate", SNIPPET_NODE,
diff --git a/lasso/xml/saml-2.0/samlp2_name_id_mapping_request.c b/lasso/xml/saml-2.0/samlp2_name_id_mapping_request.c
index 8b81d00..fd23dd3 100644
--- a/lasso/xml/saml-2.0/samlp2_name_id_mapping_request.c
+++ b/lasso/xml/saml-2.0/samlp2_name_id_mapping_request.c
@@ -55,9 +55,9 @@
static struct XmlSnippet schema_snippets[] = {
- { "BaseID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2NameIDMappingRequest, BaseID), NULL,
+ { "BaseID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_3, G_STRUCT_OFFSET(LassoSamlp2NameIDMappingRequest, BaseID), NULL,
LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF},
- { "NameID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2NameIDMappingRequest, NameID), NULL,
+ { "NameID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2, G_STRUCT_OFFSET(LassoSamlp2NameIDMappingRequest, NameID), NULL,
LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF},
{ "EncryptedID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2NameIDMappingRequest,
EncryptedID), NULL, LASSO_SAML2_ASSERTION_PREFIX,
diff --git a/lasso/xml/saml-2.0/samlp2_name_id_mapping_response.c b/lasso/xml/saml-2.0/samlp2_name_id_mapping_response.c
index 101aa86..1374e0a 100644
--- a/lasso/xml/saml-2.0/samlp2_name_id_mapping_response.c
+++ b/lasso/xml/saml-2.0/samlp2_name_id_mapping_response.c
@@ -51,7 +51,7 @@
static struct XmlSnippet schema_snippets[] = {
- { "NameID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2NameIDMappingResponse, NameID), NULL,
+ { "NameID", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2, G_STRUCT_OFFSET(LassoSamlp2NameIDMappingResponse, NameID), NULL,
LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF},
{ "EncryptedID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlp2NameIDMappingResponse,
EncryptedID), NULL, LASSO_SAML2_ASSERTION_PREFIX,
diff --git a/lasso/xml/saml-2.0/samlp2_requested_authn_context.c b/lasso/xml/saml-2.0/samlp2_requested_authn_context.c
index c5afd62..b190359 100644
--- a/lasso/xml/saml-2.0/samlp2_requested_authn_context.c
+++ b/lasso/xml/saml-2.0/samlp2_requested_authn_context.c
@@ -48,13 +48,19 @@
static struct XmlSnippet schema_snippets[] = {
- { "AuthnContextClassRef", SNIPPET_LIST_CONTENT,
+ { "AuthnContextClassRef", SNIPPET_LIST_CONTENT | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2,
+ G_STRUCT_OFFSET(LassoSamlp2RequestedAuthnContext, AuthnContextClassRef),
+ NULL, LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF },
+ { "AuthnContextDeclRef", SNIPPET_LIST_CONTENT | SNIPPET_MANDATORY | SNIPPET_JUMP_ON_MATCH | SNIPPET_JUMP_2,
+ G_STRUCT_OFFSET(LassoSamlp2RequestedAuthnContext, AuthnContextDeclRef),
+ NULL, LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF },
+ { "AuthnContextClassRef", SNIPPET_LIST_CONTENT | SNIPPET_JUMP_ON_MISS | SNIPPET_JUMP_2,
G_STRUCT_OFFSET(LassoSamlp2RequestedAuthnContext, AuthnContextClassRef),
NULL, LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF },
{ "AuthnContextDeclRef", SNIPPET_LIST_CONTENT,
G_STRUCT_OFFSET(LassoSamlp2RequestedAuthnContext, AuthnContextDeclRef),
NULL, LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF },
- { "Comparison", SNIPPET_CONTENT,
+ { "Comparison", SNIPPET_CONTENT | SNIPPET_OPTIONAL,
G_STRUCT_OFFSET(LassoSamlp2RequestedAuthnContext, Comparison), NULL, NULL, NULL},
{NULL, 0, 0, NULL, NULL, NULL}
};
diff --git a/lasso/xml/saml-2.0/samlp2_response.c b/lasso/xml/saml-2.0/samlp2_response.c
index 411e8cc..ee2ee5d 100644
--- a/lasso/xml/saml-2.0/samlp2_response.c
+++ b/lasso/xml/saml-2.0/samlp2_response.c
@@ -57,8 +57,9 @@ extern LassoNode* lasso_assertion_encrypt(LassoSaml2Assertion *assertion, char *
static struct XmlSnippet schema_snippets[] = {
{ "Assertion", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoSamlp2Response, Assertion), NULL,
LASSO_SAML2_ASSERTION_PREFIX, LASSO_SAML2_ASSERTION_HREF},
- { "EncryptedAssertion", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoSamlp2Response,
- EncryptedAssertion), NULL, LASSO_SAML2_ASSERTION_PREFIX,
+ { "EncryptedAssertion", SNIPPET_LIST_NODES | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_1,
+ G_STRUCT_OFFSET(LassoSamlp2Response, EncryptedAssertion),
+ NULL, LASSO_SAML2_ASSERTION_PREFIX,
LASSO_SAML2_ASSERTION_HREF},
{NULL, 0, 0, NULL, NULL, NULL}
};
diff --git a/lasso/xml/saml_advice.c b/lasso/xml/saml_advice.c
index dd1fd67..f2fe607 100644
--- a/lasso/xml/saml_advice.c
+++ b/lasso/xml/saml_advice.c
@@ -55,7 +55,7 @@
static struct XmlSnippet schema_snippets[] = {
{ "AssertionIDReference", SNIPPET_LIST_CONTENT,
G_STRUCT_OFFSET(LassoSamlAdvice, AssertionIDReference), NULL, NULL, NULL},
- { "Assertion", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlAdvice, Assertion), NULL, NULL, NULL},
+ { "Assertion", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_1, G_STRUCT_OFFSET(LassoSamlAdvice, Assertion), NULL, NULL, NULL},
{NULL, 0, 0, NULL, NULL, NULL}
};
diff --git a/lasso/xml/saml_assertion.c b/lasso/xml/saml_assertion.c
index c87fe81..43bab05 100644
--- a/lasso/xml/saml_assertion.c
+++ b/lasso/xml/saml_assertion.c
@@ -74,9 +74,9 @@ static struct XmlSnippet schema_snippets[] = {
{ "Conditions", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlAssertion, Conditions), NULL, NULL, NULL},
{ "Advice", SNIPPET_NODE, G_STRUCT_OFFSET(LassoSamlAssertion, Advice), NULL, NULL, NULL},
{ "SubjectStatement", SNIPPET_NODE,G_STRUCT_OFFSET(LassoSamlAssertion, SubjectStatement), NULL, NULL, NULL},
- { "AuthenticationStatement", SNIPPET_NODE,
+ { "AuthenticationStatement", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_1,
G_STRUCT_OFFSET(LassoSamlAssertion, AuthenticationStatement), NULL, NULL, NULL},
- { "AttributeStatement", SNIPPET_NODE,
+ { "AttributeStatement", SNIPPET_NODE | SNIPPET_JUMP_ON_MATCH | SNIPPET_BACK_2,
G_STRUCT_OFFSET(LassoSamlAssertion, AttributeStatement), NULL, NULL, NULL},
{ "Signature", SNIPPET_SIGNATURE,
G_STRUCT_OFFSET(LassoSamlAssertion, AssertionID), NULL, LASSO_DS_PREFIX, LASSO_DS_HREF},
diff --git a/lasso/xml/saml_subject.c b/lasso/xml/saml_subject.c
index 36226cb..a920333 100644
--- a/lasso/xml/saml_subject.c
+++ b/lasso/xml/saml_subject.c
@@ -50,7 +50,7 @@
/*****************************************************************************/
static struct XmlSnippet schema_snippets[] = {
- { "NameIdentifier", SNIPPET_NODE,
+ { "NameIdentifier", SNIPPET_NODE | SNIPPET_JUMP_ON_MISS | SNIPPET_JUMP_2,
G_STRUCT_OFFSET(LassoSamlSubject, NameIdentifier), NULL, NULL, NULL},
{ "EncryptedNameIdentifier", SNIPPET_NODE,
G_STRUCT_OFFSET(LassoSamlSubject, EncryptedNameIdentifier),