diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-10-10 17:26:09 +0200 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-10-10 17:26:09 +0200 |
| commit | 984759ea671cc4fa2ed047c17777ea1dfaa65544 (patch) | |
| tree | 3549021c3b748ef8d5257074e44db31d76aafc83 | |
| parent | b7a94f2db805ff6a4db1576eba48206aee945ada (diff) | |
| download | lasso-984759ea671cc4fa2ed047c17777ea1dfaa65544.tar.gz lasso-984759ea671cc4fa2ed047c17777ea1dfaa65544.tar.xz lasso-984759ea671cc4fa2ed047c17777ea1dfaa65544.zip | |
[id-wsf discovery] provider can now contain multiple public keys, only consider the first key for id-wsf token generation
ID-WSF never contemplated the fact that sometimes key roll-over happend
(SubjectConfirmation can only containg on ds:KeyInfo), whatever...
| -rw-r--r-- | lasso/id-wsf/discovery.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lasso/id-wsf/discovery.c b/lasso/id-wsf/discovery.c index eb00e98c..9ff59fa8 100644 --- a/lasso/id-wsf/discovery.c +++ b/lasso/id-wsf/discovery.c @@ -917,12 +917,13 @@ lasso_discovery_build_key_info_node(LassoDiscovery *discovery, const gchar *prov LassoDsKeyValue *key_value = NULL; LassoProvider *provider = NULL; xmlSecKeyInfoCtx *ctx = NULL; - xmlSecKey *public_key = NULL; xmlDoc *doc = NULL; xmlNode *key_info_node = NULL; xmlNode *xmlnode = NULL; xmlXPathContext *xpathCtx = NULL; xmlXPathObject *xpathObj = NULL; + GList *public_keys = NULL; + xmlSecKey *public_key = NULL; lasso_return_val_if_invalid_param(DISCOVERY, discovery, NULL); g_return_val_if_fail(providerID != NULL, NULL); @@ -933,7 +934,11 @@ lasso_discovery_build_key_info_node(LassoDiscovery *discovery, const gchar *prov return NULL; } - public_key = lasso_provider_get_public_key(provider); + public_keys = lasso_provider_get_public_keys(provider); + if (public_keys == NULL) { + return NULL; + } + public_key = (xmlSecKey*)public_keys->data; if (public_key == NULL) { return NULL; } |
