summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2012-10-09 16:51:49 +0200
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2013-01-25 18:30:55 +0100
commit0f3093dc56411d8d4042361ff23b5ed6a02a269b (patch)
treee91833c3d73030e6685cfd1262e2aa30dbe74aaa
parent8e98e432ff221a98297b177ca40d6217f581c0b4 (diff)
downloadlasso-0f3093dc56411d8d4042361ff23b5ed6a02a269b.tar.gz
lasso-0f3093dc56411d8d4042361ff23b5ed6a02a269b.tar.xz
lasso-0f3093dc56411d8d4042361ff23b5ed6a02a269b.zip
xml-saml-2.0: LogoutRequest must have a NameID
-rw-r--r--lasso/xml/saml-2.0/samlp2_logout_request.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lasso/xml/saml-2.0/samlp2_logout_request.c b/lasso/xml/saml-2.0/samlp2_logout_request.c
index 947e0cd6..3d123d65 100644
--- a/lasso/xml/saml-2.0/samlp2_logout_request.c
+++ b/lasso/xml/saml-2.0/samlp2_logout_request.c
@@ -139,8 +139,16 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
int rc = 0;
xmlNode *child = NULL;
LassoSamlp2LogoutRequestPrivate *pv = NULL;
+ LassoSamlp2LogoutRequest *logout_request = (LassoSamlp2LogoutRequest*)node;
rc = parent_class->init_from_xml(node, xmlnode);
+ if ((logout_request->BaseID != 0) +
+ (logout_request->NameID != 0) +
+ (logout_request->EncryptedID != 0) != 1) {
+ error("samlp2:LogoutRequest needs one of BaseID, NameID or EncryptedID");
+ rc = 1;
+ }
+
if (rc == 0) {
pv = GET_PRIVATE(node);