GNUNET_SCHEDULER_add_now(&login_redirection,handle);
}
+/**
+ * Iterate over tlds in config
+ */
+static void
+tld_iter (void *cls,
+ const char *section,
+ const char *option,
+ const char *value)
+{
+ struct RequestHandle *handle = cls;
+ struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
+
+ if (GNUNET_OK !=
+ GNUNET_CRYPTO_ecdsa_public_key_from_string (value,
+ strlen (value),
+ &pkey))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Skipping non key %s\n",
+ value);
+ return;
+ }
+ if ( 0 == memcmp (&pkey, &handle->oidc->client_pkey,
+ sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)) )
+ handle->tld = GNUNET_strdup (option+1);
+}
+
/**
* Responds to authorization GET and url-encoded POST request
*
handle->tld = GNUNET_strdup (tmp_ego->identifier);
handle->ego_entry = handle->ego_tail;
}
- }
+ }
+ if (NULL == handle->tld)
+ GNUNET_CONFIGURATION_iterate_section_values (cfg,
+ "gns",
+ tld_iter,
+ handle);
+ if (NULL == handle->tld)
+ handle->tld = GNUNET_strdup (tmp_ego->keystring);
GNUNET_SCHEDULER_add_now (&build_authz_response, handle);
}