diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-01-14 16:18:24 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-01-14 16:18:24 +0000 |
| commit | b30498aec6ceeaa50c5d977bd16af14e9548c194 (patch) | |
| tree | 6eb53e7a87fa72f66f4265ef3248fd0f70aa0917 | |
| parent | c14fdb11ec20721627cf8ee8dc589bc0fa7e6cd0 (diff) | |
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.
| -rw-r--r-- | lasso/id-ff/provider.c | 4 | ||||
| -rw-r--r-- | lasso/saml-2.0/provider.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lasso/id-ff/provider.c b/lasso/id-ff/provider.c index 4cc4f248..24ac5ee7 100644 --- a/lasso/id-ff/provider.c +++ b/lasso/id-ff/provider.c @@ -415,10 +415,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); } 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); } |
