summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-19 12:24:14 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-19 12:24:14 +0100
commit64e64141962fbea4e8acea87f57f98e93360a7c4 (patch)
tree37653111c82d9bc3e3440a2b8a0ccef756aea4b0 /src/backend/taler-merchant-httpd.c
parent5f57dbbc7b1e1ed21fff24daa537b949727b7966 (diff)
downloadmerchant-64e64141962fbea4e8acea87f57f98e93360a7c4.tar.gz
merchant-64e64141962fbea4e8acea87f57f98e93360a7c4.tar.bz2
merchant-64e64141962fbea4e8acea87f57f98e93360a7c4.zip
introduce new data type for the post-orders hash used for idempotency checks, as well as the hash and salt for authentication checks
Diffstat (limited to 'src/backend/taler-merchant-httpd.c')
-rw-r--r--src/backend/taler-merchant-httpd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
index cae16909..f2de7373 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -150,8 +150,8 @@ char *TMH_default_auth;
enum GNUNET_GenericReturnValue
TMH_check_auth (const char *token,
- const struct GNUNET_ShortHashCode *salt,
- const struct GNUNET_HashCode *hash)
+ struct TALER_MerchantAuthenticationSaltP *salt,
+ struct TALER_MerchantAuthenticationHashP *hash)
{
struct GNUNET_HashCode val;
char *dec;
@@ -180,7 +180,7 @@ TMH_check_auth (const char *token,
0));
GNUNET_free (dec);
return (0 == GNUNET_memcmp (&val,
- hash))
+ &hash->hash))
? GNUNET_OK
: GNUNET_SYSERR;
}
@@ -188,8 +188,8 @@ TMH_check_auth (const char *token,
void
TMH_compute_auth (const char *token,
- struct GNUNET_ShortHashCode *salt,
- struct GNUNET_HashCode *hash)
+ struct TALER_MerchantAuthenticationSaltP *salt,
+ struct TALER_MerchantAuthenticationHashP *hash)
{
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
salt,