From e29a6603fd830338742d295b426728cfd7c9c4af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 1 Mar 2021 23:25:21 +0100 Subject: towards updated auth API (tests still missing) --- ...ler-merchant-httpd_private-patch-instances-ID.c | 27 ---------------------- 1 file changed, 27 deletions(-) (limited to 'src/backend/taler-merchant-httpd_private-patch-instances-ID.c') diff --git a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c index 637ded04..edda6228 100644 --- a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c +++ b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c @@ -63,14 +63,10 @@ TMH_private_patch_instances_ID (const struct TMH_RequestHandler *rh, struct TMH_MerchantInstance *mi = hc->instance; struct TALER_MERCHANTDB_InstanceSettings is; json_t *payto_uris; - const char *auth_token = NULL; const char *name; struct TMH_WireMethod *wm_head = NULL; struct TMH_WireMethod *wm_tail = NULL; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ("auth_token", - &auth_token)), GNUNET_JSON_spec_json ("payto_uris", &payto_uris), GNUNET_JSON_spec_string ("name", @@ -149,14 +145,6 @@ TMH_private_patch_instances_ID (const struct TMH_RequestHandler *rh, /* Check for equality of settings */ if (! ( (0 == strcmp (mi->settings.name, name)) && - ( ( (NULL != auth_token) && - (GNUNET_OK == - TMH_check_auth (auth_token, - &mi->settings.auth_salt, - &mi->settings.auth_hash)) ) || - ( (NULL == auth_token) && - (GNUNET_YES == - GNUNET_is_zero (&mi->settings.auth_hash))) ) && (1 == json_equal (mi->settings.address, is.address)) && (1 == json_equal (mi->settings.jurisdiction, @@ -404,21 +392,6 @@ giveup: json_decref (mi->settings.address); json_decref (mi->settings.jurisdiction); is.id = mi->settings.id; - if (NULL == auth_token) - { - memset (&is.auth_salt, - 0, - sizeof (is.auth_salt)); - memset (&is.auth_hash, - 0, - sizeof (is.auth_hash)); - } - else - { - TMH_compute_auth (auth_token, - &is.auth_salt, - &is.auth_hash); - } mi->settings = is; mi->settings.address = json_incref (mi->settings.address); mi->settings.jurisdiction = json_incref (mi->settings.jurisdiction); -- cgit v1.2.3