aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_crypto.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-10-13 18:52:59 +0200
committerChristian Grothoff <christian@grothoff.org>2021-10-13 18:52:59 +0200
commitacbadd5c6e98282c4c4d568942b4c36c825c3dad (patch)
tree80560e70be10ff5a77265ef1b5e54bdf3998be62 /src/util/test_crypto.c
parent9e25e39b80657f2fa07be22d878b2d3d8c4b5b45 (diff)
downloadexchange-acbadd5c6e98282c4c4d568942b4c36c825c3dad.tar.xz
-modify C API to future-proof it for returning more details as required for KYC implementation
Diffstat (limited to 'src/util/test_crypto.c')
-rw-r--r--src/util/test_crypto.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/util/test_crypto.c b/src/util/test_crypto.c
index af5b6d5e4..27e48b9e3 100644
--- a/src/util/test_crypto.c
+++ b/src/util/test_crypto.c
@@ -158,21 +158,24 @@ static int
test_merchant_sigs ()
{
const char *pt = "payto://x-taler-bank/localhost/Account";
- const char *salt = "my test salt";
+ struct TALER_WireSalt salt;
struct TALER_MerchantPrivateKeyP priv;
struct TALER_MerchantPublicKeyP pub;
struct TALER_MerchantSignatureP sig;
GNUNET_CRYPTO_eddsa_key_create (&priv.eddsa_priv);
+ memset (&salt,
+ 42,
+ sizeof (salt));
TALER_merchant_wire_signature_make (pt,
- salt,
+ &salt,
&priv,
&sig);
GNUNET_CRYPTO_eddsa_key_get_public (&priv.eddsa_priv,
&pub.eddsa_pub);
if (GNUNET_OK !=
TALER_merchant_wire_signature_check (pt,
- salt,
+ &salt,
&pub,
&sig))
{
@@ -182,16 +185,19 @@ test_merchant_sigs ()
if (GNUNET_OK ==
TALER_merchant_wire_signature_check (
"payto://x-taler-bank/localhost/Other",
- salt,
+ &salt,
&pub,
&sig))
{
GNUNET_break (0);
return 1;
}
+ memset (&salt,
+ 43,
+ sizeof (salt));
if (GNUNET_OK ==
TALER_merchant_wire_signature_check (pt,
- "other salt",
+ &salt,
&pub,
&sig))
{