summaryrefslogtreecommitdiffstats
path: root/lasso/saml-2.0
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-14 16:18:24 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-14 16:18:24 +0000
commitb30498aec6ceeaa50c5d977bd16af14e9548c194 (patch)
tree6eb53e7a87fa72f66f4265ef3248fd0f70aa0917 /lasso/saml-2.0
parentc14fdb11ec20721627cf8ee8dc589bc0fa7e6cd0 (diff)
downloadlasso-b30498aec6ceeaa50c5d977bd16af14e9548c194.tar.gz
lasso-b30498aec6ceeaa50c5d977bd16af14e9548c194.tar.xz
lasso-b30498aec6ceeaa50c5d977bd16af14e9548c194.zip
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.
Diffstat (limited to 'lasso/saml-2.0')
-rw-r--r--lasso/saml-2.0/provider.c4
1 files changed, 2 insertions, 2 deletions
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);
}