diff options
Diffstat (limited to 'src/exchange')
| -rw-r--r-- | src/exchange/taler-exchange-httpd_reserves_purse.c | 32 | 
1 files changed, 17 insertions, 15 deletions
diff --git a/src/exchange/taler-exchange-httpd_reserves_purse.c b/src/exchange/taler-exchange-httpd_reserves_purse.c index f7266bd2..930acf54 100644 --- a/src/exchange/taler-exchange-httpd_reserves_purse.c +++ b/src/exchange/taler-exchange-httpd_reserves_purse.c @@ -536,6 +536,23 @@ TEH_handler_reserves_purse (                                            reserve_pub);      TALER_payto_hash (payto_uri,                        &rpc.h_payto); +    TEH_METRICS_num_verifications[TEH_MT_SIGNATURE_EDDSA]++; +    if (GNUNET_OK != +        TALER_wallet_purse_merge_verify (payto_uri, +                                         rpc.merge_timestamp, +                                         &rpc.pd.purse_pub, +                                         &rpc.merge_pub, +                                         &rpc.merge_sig)) +    { +      GNUNET_break_op (0); +      GNUNET_JSON_parse_free (spec); +      GNUNET_free (payto_uri); +      return TALER_MHD_reply_with_error ( +        connection, +        MHD_HTTP_FORBIDDEN, +        TALER_EC_EXCHANGE_RESERVES_PURSE_MERGE_SIGNATURE_INVALID, +        NULL); +    }      GNUNET_free (payto_uri);    }    GNUNET_assert (GNUNET_OK == @@ -628,21 +645,6 @@ TEH_handler_reserves_purse (        NULL);    }    if (GNUNET_OK != -      TALER_wallet_purse_merge_verify (TEH_base_url, -                                       rpc.merge_timestamp, -                                       &rpc.pd.purse_pub, -                                       &rpc.merge_pub, -                                       &rpc.merge_sig)) -  { -    GNUNET_break_op (0); -    GNUNET_JSON_parse_free (spec); -    return TALER_MHD_reply_with_error ( -      connection, -      MHD_HTTP_FORBIDDEN, -      TALER_EC_EXCHANGE_RESERVES_PURSE_MERGE_SIGNATURE_INVALID, -      NULL); -  } -  if (GNUNET_OK !=        TALER_wallet_account_merge_verify (rpc.merge_timestamp,                                           &rpc.pd.purse_pub,                                           rpc.pd.purse_expiration,  | 
