[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: use #defines for common HTTP he
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: use #defines for common HTTP headers |
Date: |
Mon, 08 Feb 2021 20:43:52 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new 830b9a6 use #defines for common HTTP headers
830b9a6 is described below
commit 830b9a6063a13577f4df727a4ba840250872955b
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Feb 8 20:43:50 2021 +0100
use #defines for common HTTP headers
---
src/backend/anastasis-httpd_policy.c | 2 +-
src/backend/anastasis-httpd_policy_upload.c | 27 +++------
src/backend/anastasis-httpd_truth.c | 35 +++++++----
src/include/anastasis_crypto_lib.h | 28 +++++++++
src/include/anastasis_service.h | 5 --
src/restclient/anastasis_api_keyshare_lookup.c | 82 +++-----------------------
src/restclient/anastasis_api_policy_lookup.c | 45 ++------------
src/restclient/anastasis_api_policy_store.c | 10 ----
src/restclient/anastasis_api_truth_store.c | 7 +--
src/testing/testing_api_cmd_policy_lookup.c | 22 -------
10 files changed, 76 insertions(+), 187 deletions(-)
diff --git a/src/backend/anastasis-httpd_policy.c
b/src/backend/anastasis-httpd_policy.c
index 0a1396a..72e74be 100644
--- a/src/backend/anastasis-httpd_policy.c
+++ b/src/backend/anastasis-httpd_policy.c
@@ -130,7 +130,7 @@ return_policy (struct MHD_Connection *connection,
sizeof (recovery_data_hash));
GNUNET_break (MHD_YES ==
MHD_add_response_header (resp,
- "Anastasis-Policy-Signature",
+
ANASTASIS_HTTP_HEADER_POLICY_SIGNATURE,
sig_s));
GNUNET_break (MHD_YES ==
MHD_add_response_header (resp,
diff --git a/src/backend/anastasis-httpd_policy_upload.c
b/src/backend/anastasis-httpd_policy_upload.c
index af00d47..744aa87 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -287,7 +287,7 @@ make_payment_request (struct PolicyUploadContext *puc)
}
GNUNET_break (MHD_YES ==
MHD_add_response_header (resp,
- "Taler",
+ ANASTASIS_HTTP_HEADER_TALER,
hdr));
GNUNET_free (hdr);
}
@@ -357,12 +357,6 @@ proposal_cb (void *cls,
por->details.ok.order_id);
post_counter = (uint32_t) amount_to_post_counter (&AH_annual_fee);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Post counter to save: %i\n",
- post_counter);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Payment-Identifier to be saved to db: %s\n",
- TALER_B2S (&puc->payment_identifier));
qs = db->record_recdoc_payment (db->cls,
&puc->account,
post_counter,
@@ -624,9 +618,6 @@ prepare_payment (struct PolicyUploadContext *puc)
GNUNET_CRYPTO_QUALITY_NONCE,
&puc->payment_identifier,
sizeof (struct ANASTASIS_PaymentSecretP));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Payment-Identifier generated: %s, starting payment process\n",
- TALER_B2S (&puc->payment_identifier));
return begin_payment (puc,
GNUNET_NO);
}
@@ -761,7 +752,7 @@ AH_handler_policy_post (
sig_s = MHD_lookup_connection_value (connection,
MHD_HEADER_KIND,
- "Anastasis-Policy-Signature");
+
ANASTASIS_HTTP_HEADER_POLICY_SIGNATURE);
if ( (NULL == sig_s) ||
(GNUNET_OK !=
GNUNET_STRINGS_string_to_data (sig_s,
@@ -773,7 +764,8 @@ AH_handler_policy_post (
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_ANASTASIS_POLICY_BAD_SIGNATURE,
- "Anastasis-Policy-Signature does
not include a base32-encoded EdDSA signature");
+
ANASTASIS_HTTP_HEADER_POLICY_SIGNATURE
+ " header must include a
base32-encoded EdDSA signature");
}
}
{
@@ -794,7 +786,8 @@ AH_handler_policy_post (
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_ANASTASIS_POLICY_BAD_IF_MATCH,
- "Etag must include a base32-encoded
SHA-512 hash");
+ MHD_HTTP_HEADER_IF_NONE_MATCH
+ " header must include a
base32-encoded SHA-512 hash");
}
}
/* validate signature */
@@ -816,7 +809,7 @@ AH_handler_policy_post (
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_FORBIDDEN,
TALER_EC_ANASTASIS_POLICY_BAD_SIGNATURE,
- "Anastasis-Policy-Signature");
+
ANASTASIS_HTTP_HEADER_POLICY_SIGNATURE);
}
}
/* get ready to hash (done here as we may go async for payments next) */
@@ -940,7 +933,7 @@ AH_handler_policy_post (
TALER_MHD_add_global_headers (resp);
GNUNET_break (MHD_YES ==
MHD_add_response_header (resp,
- "Anastasis-Version",
+
ANASTASIS_HTTP_HEADER_POLICY_VERSION,
version_s));
ret = MHD_queue_response (connection,
MHD_HTTP_NOT_MODIFIED,
@@ -953,8 +946,6 @@ AH_handler_policy_post (
}
}
/* ready to begin! */
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Policy upload starting\n");
return MHD_YES;
}
@@ -1095,7 +1086,7 @@ AH_handler_policy_post (
TALER_MHD_add_global_headers (resp);
GNUNET_break (MHD_YES ==
MHD_add_response_header (resp,
- "Anastasis-Version",
+
ANASTASIS_HTTP_HEADER_POLICY_VERSION,
version_s));
ret = MHD_queue_response (connection,
MHD_HTTP_NO_CONTENT,
diff --git a/src/backend/anastasis-httpd_truth.c
b/src/backend/anastasis-httpd_truth.c
index 0ed12db..e567dba 100644
--- a/src/backend/anastasis-httpd_truth.c
+++ b/src/backend/anastasis-httpd_truth.c
@@ -106,6 +106,11 @@ struct GetContext
*/
struct MHD_Response *resp;
+ /**
+ * Random authorization code we are using.
+ */
+ uint64_t code;
+
/**
* HTTP response code to use on resume, if resp is set.
*/
@@ -546,6 +551,7 @@ AH_handler_truth_get (struct MHD_Connection *connection,
{
/* Authorization process is "running", check what is going on */
enum ANASTASIS_AUTHORIZATION_Result ret;
+ enum GNUNET_DB_QueryStatus qs;
ret = gc->authorization->process (gc->as,
connection);
@@ -553,7 +559,10 @@ AH_handler_truth_get (struct MHD_Connection *connection,
{
case ANASTASIS_AUTHORIZATION_RES_SUCCESS:
/* Challenge sent successfully */
- // FIXME: mark in DB that we did it (now, for
code_retransmission_frequency!)
+ qs = db->mark_challenge_sent (db->cls,
+ &gc->truth_public_key,
+ gc->code);
+ GNUNET_break (0 < qs);
gc->authorization->cleanup (gc->as);
gc->as = NULL;
return MHD_YES;
@@ -569,7 +578,10 @@ AH_handler_truth_get (struct MHD_Connection *connection,
return MHD_YES;
case ANASTASIS_AUTHORIZATION_RES_SUCCESS_REPLY_FAILED:
/* Challenge sent successfully */
- // FIXME: mark in DB that we did it (now, for
code_retransmission_frequency!)
+ qs = db->mark_challenge_sent (db->cls,
+ &gc->truth_public_key,
+ gc->code);
+ GNUNET_break (0 < qs);
gc->authorization->cleanup (gc->as);
gc->as = NULL;
return MHD_NO;
@@ -595,7 +607,7 @@ AH_handler_truth_get (struct MHD_Connection *connection,
pay_id = MHD_lookup_connection_value (connection,
MHD_HEADER_KIND,
- "Payment-Identifier");
+
ANASTASIS_HTTP_HEADER_PAYMENT_IDENTIFIER);
if (NULL != pay_id)
{
if (GNUNET_OK !=
@@ -609,7 +621,7 @@ AH_handler_truth_get (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PARAMETER_MALFORMED,
- "Payment-Identifier");
+
ANASTASIS_HTTP_HEADER_PAYMENT_IDENTIFIER);
}
gc->payment_identifier_provided = true;
}
@@ -639,13 +651,13 @@ AH_handler_truth_get (struct MHD_Connection *connection,
tdk = MHD_lookup_connection_value (connection,
MHD_HEADER_KIND,
- "Truth-Decryption-Key");
+
ANASTASIS_HTTP_HEADER_TRUTH_DECRYPTION_KEY);
{
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PARAMETER_MISSING,
- "Truth-Decryption-Key");
+
ANASTASIS_HTTP_HEADER_TRUTH_DECRYPTION_KEY);
}
if (GNUNET_OK !=
@@ -659,7 +671,7 @@ AH_handler_truth_get (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PARAMETER_MALFORMED,
- "Truth-Decryption-Key");
+
ANASTASIS_HTTP_HEADER_TRUTH_DECRYPTION_KEY);
}
}
@@ -903,7 +915,6 @@ AH_handler_truth_get (struct MHD_Connection *connection,
/* Setup challenge and begin authorization process */
{
struct GNUNET_TIME_Absolute transmission_date;
- uint64_t code;
enum GNUNET_DB_QueryStatus qs;
qs = db->create_challenge_code (db->cls,
@@ -912,7 +923,7 @@ AH_handler_truth_get (struct MHD_Connection *connection,
p->code_validity_period,
INITIAL_RETRY_COUNTER,
&transmission_date,
- &code);
+ &gc->code);
switch (qs)
{
case GNUNET_DB_STATUS_HARD_ERROR:
@@ -943,7 +954,7 @@ AH_handler_truth_get (struct MHD_Connection *connection,
&AH_trigger_daemon,
NULL,
&gc->truth_public_key,
- code,
+ gc->code,
decrypted_truth,
decrypted_truth_size);
GNUNET_free (decrypted_truth);
@@ -970,7 +981,7 @@ AH_handler_truth_get (struct MHD_Connection *connection,
/* all good, challenge sent! */
qs = db->mark_challenge_sent (db->cls,
&gc->truth_public_key,
- code);
+ gc->code);
GNUNET_break (0 < qs);
break;
case ANASTASIS_AUTHORIZATION_RES_FAILED:
@@ -984,7 +995,7 @@ AH_handler_truth_get (struct MHD_Connection *connection,
/* Challenge sent successfully, but HTTP reply failed */
qs = db->mark_challenge_sent (db->cls,
&gc->truth_public_key,
- code);
+ gc->code);
GNUNET_break (0 < qs);
gc->authorization->cleanup (gc->as);
return MHD_NO;
diff --git a/src/include/anastasis_crypto_lib.h
b/src/include/anastasis_crypto_lib.h
index b2ef561..9605f13 100644
--- a/src/include/anastasis_crypto_lib.h
+++ b/src/include/anastasis_crypto_lib.h
@@ -23,6 +23,34 @@
#include <jansson.h>
#include <gnunet/gnunet_crypto_lib.h>
+
+/**
+ * Server to client: this is the policy version.
+ */
+#define ANASTASIS_HTTP_HEADER_POLICY_VERSION "Anastasis-Version"
+
+/**
+ * Client to server: use this to decrypt the truth.
+ */
+#define ANASTASIS_HTTP_HEADER_TRUTH_DECRYPTION_KEY "Truth-Decryption-Key"
+
+/**
+ * Client to server: I paid using this payment secret.
+ */
+#define ANASTASIS_HTTP_HEADER_PAYMENT_IDENTIFIER "Payment-Identifier"
+
+/**
+ * Client to server: I am authorized to update this policy, or
+ * server to client: I prove this is a valid policy.
+ */
+#define ANASTASIS_HTTP_HEADER_POLICY_SIGNATURE "Anastasis-Policy-Signature"
+
+/**
+ * Server to client: Taler Payto-URI.
+ */
+#define ANASTASIS_HTTP_HEADER_TALER "Taler"
+
+
GNUNET_NETWORK_STRUCT_BEGIN
/**
diff --git a/src/include/anastasis_service.h b/src/include/anastasis_service.h
index 929196d..4d9b033 100644
--- a/src/include/anastasis_service.h
+++ b/src/include/anastasis_service.h
@@ -139,11 +139,6 @@ struct ANASTASIS_DownloadDetails
*/
struct ANASTASIS_AccountSignatureP sig;
- /**
- * Hash of the previous version.
- */
- struct GNUNET_HashCode prev_policy_hash;
-
/**
* Hash over @e policy and @e policy_size.
*/
diff --git a/src/restclient/anastasis_api_keyshare_lookup.c
b/src/restclient/anastasis_api_keyshare_lookup.c
index 4fa52be..663d421 100644
--- a/src/restclient/anastasis_api_keyshare_lookup.c
+++ b/src/restclient/anastasis_api_keyshare_lookup.c
@@ -1,6 +1,6 @@
/*
This file is part of Anastasis
- Copyright (C) 2020 Taler Systems SA
+ Copyright (C) 2020, 2021 Taler Systems SA
Anastasis is free software; you can redistribute it and/or modify it under
the
terms of the GNU Lesser General Public License as published by the Free
Software
@@ -14,8 +14,8 @@
Anastasis; see the file COPYING.GPL. If not, see
<http://www.gnu.org/licenses/>
*/
/**
- * @file lib/anastasis_api_policy_lookup.c
- * @brief Implementation of the /policy GET
+ * @file lib/anastasis_api_keyshare_lookup.c
+ * @brief Implementation of the GET /truth client
* @author Christian Grothoff
* @author Dennis Neufeld
* @author Dominik Meister
@@ -155,68 +155,6 @@ handle_keyshare_lookup_finished (void *cls,
}
-/**
- * Handle HTTP header received by curl.
- *
- * @param buffer one line of HTTP header data
- * @param size size of an item
- * @param nitems number of items passed
- * @param userdata our `struct ANASTASIS_KeyShareLookupOperation *`
- * @return `size * nitems`
- */
-static size_t
-handle_header (char *buffer,
- size_t size,
- size_t nitems,
- void *userdata)
-{
- struct ANASTASIS_KeyShareLookupOperation *kslo = userdata;
- size_t total = size * nitems;
- char *ndup;
- const char *hdr_type;
- char *hdr_val;
- char *sp;
-
- ndup = GNUNET_strndup (buffer,
- total);
- hdr_type = strtok_r (ndup,
- ":",
- &sp);
- if (NULL == hdr_type)
- {
- GNUNET_free (ndup);
- return total;
- }
- hdr_val = strtok_r (NULL,
- "\n\r",
- &sp);
- if (NULL == hdr_val)
- {
- GNUNET_free (ndup);
- return total;
- }
- if (' ' == *hdr_val)
- hdr_val++;
- if (0 == strcasecmp (hdr_type,
- "Truth-Decryption-Key"))
- {
- if (GNUNET_OK !=
- GNUNET_STRINGS_string_to_data (hdr_val,
- strlen (hdr_val),
- &kslo->truth_key,
- sizeof (struct
- ANASTASIS_CRYPTO_TruthKeyP)))
- {
- GNUNET_break_op (0);
- GNUNET_free (ndup);
- return 0;
- }
- }
- GNUNET_free (ndup);
- return total;
-}
-
-
struct ANASTASIS_KeyShareLookupOperation *
ANASTASIS_keyshare_lookup (
struct GNUNET_CURL_Context *ctx,
@@ -244,7 +182,8 @@ ANASTASIS_keyshare_lookup (
val = GNUNET_STRINGS_data_to_string_alloc (truth_key,
sizeof (*truth_key));
GNUNET_asprintf (&hdr,
- "Truth-Decryption-Key: %s",
+ "%s: %s",
+ ANASTASIS_HTTP_HEADER_TRUTH_DECRYPTION_KEY,
val);
GNUNET_free (val);
ext = curl_slist_append (job_headers,
@@ -267,7 +206,8 @@ ANASTASIS_keyshare_lookup (
payment_secret,
sizeof (*payment_secret));
GNUNET_asprintf (&hdr,
- "Payment-Identifier: %s",
+ "%s: %s",
+ ANASTASIS_HTTP_HEADER_PAYMENT_IDENTIFIER,
paid_order_id);
GNUNET_free (paid_order_id);
ext = curl_slist_append (job_headers,
@@ -306,14 +246,6 @@ ANASTASIS_keyshare_lookup (
GNUNET_free (answer_s);
GNUNET_free (path);
eh = ANASTASIS_curl_easy_get_ (kslo->url);
- GNUNET_assert (CURLE_OK ==
- curl_easy_setopt (eh,
- CURLOPT_HEADERFUNCTION,
- &handle_header));
- GNUNET_assert (CURLE_OK ==
- curl_easy_setopt (eh,
- CURLOPT_HEADERDATA,
- kslo));
kslo->cb = cb;
kslo->cb_cls = cb_cls;
kslo->job = GNUNET_CURL_job_add_raw (ctx,
diff --git a/src/restclient/anastasis_api_policy_lookup.c
b/src/restclient/anastasis_api_policy_lookup.c
index 041ca86..e40700d 100644
--- a/src/restclient/anastasis_api_policy_lookup.c
+++ b/src/restclient/anastasis_api_policy_lookup.c
@@ -75,13 +75,6 @@ struct ANASTASIS_PolicyLookupOperation
*/
struct ANASTASIS_AccountSignatureP account_sig;
- /**
- * FIXME: reasonable?
- * Hash code returned by the server in the
- * "Anastasis-Previous" header, or all zeros for
- * none.
- */
- struct GNUNET_HashCode anastasis_previous;
};
@@ -123,7 +116,6 @@ handle_policy_lookup_finished (void *cls,
struct ANASTASIS_UploadSignaturePS usp = {
.purpose.purpose = htonl (TALER_SIGNATURE_ANASTASIS_POLICY_UPLOAD),
.purpose.size = htonl (sizeof (usp)),
- // .old_recovery_data_hash = plo->anastasis_previous
};
GNUNET_CRYPTO_hash (data,
@@ -135,16 +127,6 @@ handle_policy_lookup_finished (void *cls,
&plo->account_sig.eddsa_sig,
&plo->account_pub.pub))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Hash of new recovery data (download): %s\n",
- TALER_B2S (&usp.new_recovery_data_hash));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Account Signature to verify download: %s\n",
- TALER_B2S (&plo->account_sig));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Account Public Key for verification of signature: %s\n",
- TALER_B2S (&plo->account_pub));
-
GNUNET_break_op (0);
response_code = 0;
break;
@@ -152,7 +134,6 @@ handle_policy_lookup_finished (void *cls,
/* Success, call callback with all details! */
memset (&dd, 0, sizeof (dd));
dd.sig = plo->account_sig;
- dd.prev_policy_hash = plo->anastasis_previous;
dd.curr_policy_hash = usp.new_recovery_data_hash;
dd.policy = data;
dd.policy_size = data_size;
@@ -237,28 +218,14 @@ handle_header (char *buffer,
if (' ' == *hdr_val)
hdr_val++;
if (0 == strcasecmp (hdr_type,
- "Anastasis-Policy-Signature"))
- {
- if (GNUNET_OK !=
- GNUNET_STRINGS_string_to_data (hdr_val,
- strlen (hdr_val),
- &plo->account_sig,
- sizeof (struct
- ANASTASIS_AccountSignatureP)))
- {
- GNUNET_break_op (0);
- GNUNET_free (ndup);
- return 0;
- }
- }
- if (0 == strcasecmp (hdr_type,
- "Anastasis-Previous"))
+ ANASTASIS_HTTP_HEADER_POLICY_SIGNATURE))
{
if (GNUNET_OK !=
- GNUNET_STRINGS_string_to_data (hdr_val,
- strlen (hdr_val),
- &plo->anastasis_previous,
- sizeof (struct GNUNET_HashCode)))
+ GNUNET_STRINGS_string_to_data (
+ hdr_val,
+ strlen (hdr_val),
+ &plo->account_sig,
+ sizeof (struct ANASTASIS_AccountSignatureP)))
{
GNUNET_break_op (0);
GNUNET_free (ndup);
diff --git a/src/restclient/anastasis_api_policy_store.c
b/src/restclient/anastasis_api_policy_store.c
index 92dc61e..f346ff7 100644
--- a/src/restclient/anastasis_api_policy_store.c
+++ b/src/restclient/anastasis_api_policy_store.c
@@ -320,9 +320,6 @@ ANASTASIS_policy_store (
GNUNET_CRYPTO_eddsa_key_get_public (&anastasis_priv->priv,
&pub.pub);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Account public key created: %s\n",
- TALER_B2S (&pub));
acc_pub_str = GNUNET_STRINGS_data_to_string_alloc (&pub,
sizeof (pub));
GNUNET_asprintf (&path,
@@ -340,13 +337,6 @@ ANASTASIS_policy_store (
NULL);
GNUNET_free (path);
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "At %s:%d url is %s\n", __FILE__, __LINE__,
- pso->url);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "At %s:%d recovery data is %s-%llu b\n", __FILE__, __LINE__,
- TALER_b2s (recovery_data, recovery_data_size),
- (unsigned long long) recovery_data_size);
pso->ctx = ctx;
pso->cb = cb;
pso->cb_cls = cb_cls;
diff --git a/src/restclient/anastasis_api_truth_store.c
b/src/restclient/anastasis_api_truth_store.c
index bdf6126..a51be77 100644
--- a/src/restclient/anastasis_api_truth_store.c
+++ b/src/restclient/anastasis_api_truth_store.c
@@ -219,7 +219,7 @@ handle_header (char *buffer,
if (' ' == *hdr_val)
hdr_val++;
if (0 == strcasecmp (hdr_type,
- "Taler"))
+ ANASTASIS_HTTP_HEADER_TALER))
{
size_t len;
@@ -244,7 +244,7 @@ ANASTASIS_truth_store (
struct GNUNET_CURL_Context *ctx,
const char *backend_url,
const struct ANASTASIS_CRYPTO_TruthPublicKeyP *truth_public_key,
- const json_t *truth_data,
+ const json_t *truth_data, // FIXME: why json_t?
bool payment_requested,
const char *paid_order_id,
ANASTASIS_TruthStoreCallback cb,
@@ -287,9 +287,6 @@ ANASTASIS_truth_store (
GNUNET_free (path);
GNUNET_free (pub_key_str);
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "URL before curl: %s\n",
- tso->url);
json_str = json_dumps (truth_data,
JSON_COMPACT);
tso->ctx = ctx;
diff --git a/src/testing/testing_api_cmd_policy_lookup.c
b/src/testing/testing_api_cmd_policy_lookup.c
index 346c323..e97f746 100644
--- a/src/testing/testing_api_cmd_policy_lookup.c
+++ b/src/testing/testing_api_cmd_policy_lookup.c
@@ -46,11 +46,6 @@ struct PolicyLookupState
*/
const struct GNUNET_HashCode *upload_hash;
- /**
- * Hash of the previous upload (all zeros if there was no previous upload).
- */
- const struct GNUNET_HashCode *prev_upload_hash;
-
/**
* URL of the anastasis backend.
*/
@@ -109,14 +104,6 @@ policy_lookup_cb (void *cls,
TALER_TESTING_interpreter_fail (pls->is);
return;
}
- if ( (MHD_HTTP_OK == http_status) &&
- (0 != GNUNET_memcmp (&dd->prev_policy_hash,
- pls->prev_upload_hash)) )
- {
- GNUNET_break (0);
- TALER_TESTING_interpreter_fail (pls->is);
- return;
- }
}
TALER_TESTING_interpreter_next (pls->is);
}
@@ -160,15 +147,6 @@ policy_lookup_run (void *cls,
TALER_TESTING_interpreter_fail (pls->is);
return;
}
- if (GNUNET_OK !=
- ANASTASIS_TESTING_get_trait_hash (upload_cmd,
-
ANASTASIS_TESTING_TRAIT_HASH_PREVIOUS,
- &pls->prev_upload_hash))
- {
- GNUNET_break (0);
- TALER_TESTING_interpreter_fail (pls->is);
- return;
- }
if (GNUNET_OK !=
ANASTASIS_TESTING_get_trait_account_pub (upload_cmd,
0,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: use #defines for common HTTP headers,
gnunet <=