aboutsummaryrefslogtreecommitdiff
path: root/src/identity-provider
diff options
context:
space:
mode:
authorSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-03-06 17:41:17 +0100
committerSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-03-06 17:41:17 +0100
commit487c649f1e2debc1f9596719ac6fc1c0d71241fb (patch)
tree1e02a46b79420c3584bdbc779d2ee4151ebce93e /src/identity-provider
parent958288ff94c8f9bbd1edb60c83d18983abc60d2f (diff)
downloadgnunet-487c649f1e2debc1f9596719ac6fc1c0d71241fb.tar.gz
gnunet-487c649f1e2debc1f9596719ac6fc1c0d71241fb.zip
update
Diffstat (limited to 'src/identity-provider')
-rw-r--r--src/identity-provider/plugin_rest_openid_connect.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/identity-provider/plugin_rest_openid_connect.c b/src/identity-provider/plugin_rest_openid_connect.c
index c637680da..81cb7af55 100644
--- a/src/identity-provider/plugin_rest_openid_connect.c
+++ b/src/identity-provider/plugin_rest_openid_connect.c
@@ -2038,6 +2038,36 @@ list_ego (void *cls,
2038 ego_entry->ego = ego; 2038 ego_entry->ego = ego;
2039 ego_entry->identifier = GNUNET_strdup (identifier); 2039 ego_entry->identifier = GNUNET_strdup (identifier);
2040 GNUNET_CONTAINER_DLL_insert_tail(handle->ego_head,handle->ego_tail, ego_entry); 2040 GNUNET_CONTAINER_DLL_insert_tail(handle->ego_head,handle->ego_tail, ego_entry);
2041 return;
2042 }
2043 /* Ego renamed or added */
2044 if (identifier != NULL) {
2045 for (ego_entry = handle->ego_head; NULL != ego_entry; ego_entry = ego_entry->next) {
2046 if (ego_entry->ego == ego) {
2047 /* Rename */
2048 GNUNET_free (ego_entry->identifier);
2049 ego_entry->identifier = GNUNET_strdup (identifier);
2050 break;
2051 }
2052 }
2053 if (NULL == ego_entry) {
2054 /* Add */
2055 ego_entry = GNUNET_new (struct EgoEntry);
2056 GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
2057 ego_entry->keystring =
2058 GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
2059 ego_entry->ego = ego;
2060 ego_entry->identifier = GNUNET_strdup (identifier);
2061 GNUNET_CONTAINER_DLL_insert_tail(handle->ego_head,handle->ego_tail, ego_entry);
2062 }
2063 } else {
2064 /* Delete */
2065 for (ego_entry = handle->ego_head; NULL != ego_entry; ego_entry = ego_entry->next) {
2066 if (ego_entry->ego == ego)
2067 break;
2068 }
2069 if (NULL != ego_entry)
2070 GNUNET_CONTAINER_DLL_remove(handle->ego_head,handle->ego_tail, ego_entry);
2041 } 2071 }
2042 2072
2043} 2073}