From b30498aec6ceeaa50c5d977bd16af14e9548c194 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 14 Jan 2010 16:18:24 +0000 Subject: ID-FF&SAML2: if use is not defined on a key descriptor use the key for any use * lasso/id-ff/provider.c lasso/saml-2.0/provider.c: if the "use" attribute is not set on a KeyDescriptor, use the key for signing and encryption. --- lasso/saml-2.0/provider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lasso/saml-2.0') diff --git a/lasso/saml-2.0/provider.c b/lasso/saml-2.0/provider.c index 97a8dd3e..704b3880 100644 --- a/lasso/saml-2.0/provider.c +++ b/lasso/saml-2.0/provider.c @@ -64,10 +64,10 @@ load_descriptor(xmlNode *xmlnode, GHashTable *descriptor, LassoProvider *provide } if (strcmp((char*)t->name, "KeyDescriptor") == 0) { use = xmlGetProp(t, (xmlChar*)"use"); - if (use && strcmp((char*)use, "signing") == 0) { + if (use == NULL || strcmp((char*)use, "signing") == 0) { provider->private_data->signing_key_descriptor = xmlCopyNode(t, 1); } - if (use && strcmp((char*)use, "encryption") == 0) { + if (use == NULL || strcmp((char*)use, "encryption") == 0) { provider->private_data->encryption_key_descriptor = xmlCopyNode(t, 1); } -- cgit