summaryrefslogtreecommitdiff
path: root/src/authorization
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-14 19:19:32 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-14 19:19:32 +0100
commit36c2bb7d41b95564652a66b0de40527f78022582 (patch)
tree80c685dec5c3c8291a4f55076e31488d3ff76138 /src/authorization
parentfbe1514b2241ec77af20f5d8a50183fcaa1155c6 (diff)
downloadanastasis-36c2bb7d41b95564652a66b0de40527f78022582.tar.gz
anastasis-36c2bb7d41b95564652a66b0de40527f78022582.tar.bz2
anastasis-36c2bb7d41b95564652a66b0de40527f78022582.zip
-fixing FTBFS for v11
Diffstat (limited to 'src/authorization')
-rw-r--r--src/authorization/anastasis_authorization_plugin_iban.c16
-rw-r--r--src/authorization/anastasis_authorization_plugin_totp.c12
-rw-r--r--src/authorization/libanastasiseufin/lae_common.h2
-rw-r--r--src/authorization/libanastasiseufin/lae_credit.c6
4 files changed, 17 insertions, 19 deletions
diff --git a/src/authorization/anastasis_authorization_plugin_iban.c b/src/authorization/anastasis_authorization_plugin_iban.c
index 58a63a6..fec0d6d 100644
--- a/src/authorization/anastasis_authorization_plugin_iban.c
+++ b/src/authorization/anastasis_authorization_plugin_iban.c
@@ -461,12 +461,12 @@ test_wire_transfers (struct ANASTASIS_AUTHORIZATION_State *as)
struct ANASTASIS_DatabasePlugin *db = ctx->ac->db;
enum GNUNET_DB_QueryStatus qs;
struct GNUNET_TIME_Absolute now;
- struct GNUNET_TIME_Absolute limit;
+ struct GNUNET_TIME_Timestamp limit;
now = GNUNET_TIME_absolute_get ();
- limit = GNUNET_TIME_absolute_subtract (now,
- CODE_VALIDITY_PERIOD);
- (void) GNUNET_TIME_round_abs (&limit);
+ limit = GNUNET_TIME_absolute_to_timestamp (
+ GNUNET_TIME_absolute_subtract (now,
+ CODE_VALIDITY_PERIOD));
qs = db->test_auth_iban_payment (
db->cls,
as->iban_number,
@@ -520,7 +520,7 @@ iban_process (struct ANASTASIS_AUTHORIZATION_State *as,
enum GNUNET_DB_QueryStatus qs;
struct MHD_Response *resp;
struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
- struct GNUNET_TIME_Absolute after;
+ struct GNUNET_TIME_Timestamp after;
if (NULL == as->eh)
{
@@ -544,9 +544,9 @@ iban_process (struct ANASTASIS_AUTHORIZATION_State *as,
&bank_event_cb,
as);
}
- after = GNUNET_TIME_absolute_subtract (now,
- CODE_VALIDITY_PERIOD);
- (void) GNUNET_TIME_round_abs (&after);
+ after = GNUNET_TIME_absolute_to_timestamp (
+ GNUNET_TIME_absolute_subtract (now,
+ CODE_VALIDITY_PERIOD));
qs = db->test_challenge_code_satisfied (db->cls,
&as->truth_uuid,
as->code,
diff --git a/src/authorization/anastasis_authorization_plugin_totp.c b/src/authorization/anastasis_authorization_plugin_totp.c
index b3d5bc0..74d7b7c 100644
--- a/src/authorization/anastasis_authorization_plugin_totp.c
+++ b/src/authorization/anastasis_authorization_plugin_totp.c
@@ -144,7 +144,6 @@ compute_totp (int time_off,
uint8_t hmac[20]; /* SHA1: 20 bytes */
now = GNUNET_TIME_absolute_get ();
- (void) GNUNET_TIME_round_abs (&now);
while (time_off < 0)
{
now = GNUNET_TIME_absolute_subtract (now,
@@ -300,10 +299,9 @@ totp_process (struct ANASTASIS_AUTHORIZATION_State *as,
/* Build HTTP response */
{
struct MHD_Response *resp;
- struct GNUNET_TIME_Absolute now;
+ struct GNUNET_TIME_Timestamp now;
- now = GNUNET_TIME_absolute_get ();
- (void) GNUNET_TIME_round_abs (&now);
+ now = GNUNET_TIME_timestamp_get ();
if (TALER_MHD_xmime_matches (mime,
"application/json"))
{
@@ -313,8 +311,8 @@ totp_process (struct ANASTASIS_AUTHORIZATION_State *as,
GNUNET_JSON_pack_string ("hint",
TALER_ErrorCode_get_hint (
TALER_EC_ANASTASIS_TRUTH_CHALLENGE_FAILED)),
- GNUNET_JSON_pack_time_abs ("server_time",
- now));
+ GNUNET_JSON_pack_timestamp ("server_time",
+ now));
}
else
{
@@ -325,7 +323,7 @@ totp_process (struct ANASTASIS_AUTHORIZATION_State *as,
response_size
= GNUNET_asprintf (&response,
"Server time: %s",
- GNUNET_STRINGS_absolute_time_to_string (now));
+ GNUNET_TIME_timestamp2s (now));
resp = MHD_create_response_from_buffer (response_size,
response,
MHD_RESPMEM_MUST_COPY);
diff --git a/src/authorization/libanastasiseufin/lae_common.h b/src/authorization/libanastasiseufin/lae_common.h
index 8879ba3..1c2c8fd 100644
--- a/src/authorization/libanastasiseufin/lae_common.h
+++ b/src/authorization/libanastasiseufin/lae_common.h
@@ -36,7 +36,7 @@
* @param auth authentication data to use
* @return #GNUNET_OK in success
*/
-int
+enum GNUNET_GenericReturnValue
ANASTASIS_EUFIN_setup_auth_ (
CURL *easy,
const struct ANASTASIS_EUFIN_AuthenticationData *auth);
diff --git a/src/authorization/libanastasiseufin/lae_credit.c b/src/authorization/libanastasiseufin/lae_credit.c
index e8cabb5..d3fd781 100644
--- a/src/authorization/libanastasiseufin/lae_credit.c
+++ b/src/authorization/libanastasiseufin/lae_credit.c
@@ -65,7 +65,7 @@ struct ANASTASIS_EUFIN_CreditHistoryHandle
* were set,
* #GNUNET_SYSERR if there was a protocol violation in @a history
*/
-static int
+static enum GNUNET_GenericReturnValue
parse_account_history (struct ANASTASIS_EUFIN_CreditHistoryHandle *hh,
const json_t *history)
{
@@ -89,8 +89,8 @@ parse_account_history (struct ANASTASIS_EUFIN_CreditHistoryHandle *hh,
struct GNUNET_JSON_Specification hist_spec[] = {
TALER_JSON_spec_amount_any ("amount",
&td.amount),
- TALER_JSON_spec_absolute_time ("date",
- &td.execution_date),
+ GNUNET_JSON_spec_timestamp ("date",
+ &td.execution_date),
GNUNET_JSON_spec_uint64 ("row_id",
&row_id),
GNUNET_JSON_spec_string ("subject",