summaryrefslogtreecommitdiff
path: root/src/util/test_crypto_ecdsa.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-08 16:56:33 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-08 16:56:33 +0200
commit11ae9f030e13d07c505a4d5477d592ddb4b3acf6 (patch)
tree69ce120a7c60c84d0d074bab8fe2cd26e77300dc /src/util/test_crypto_ecdsa.c
parent2348fe4ae8ffe93765d5c56c3cc5d4490eae946d (diff)
fix sign api for to address #6164
Diffstat (limited to 'src/util/test_crypto_ecdsa.c')
-rw-r--r--src/util/test_crypto_ecdsa.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/util/test_crypto_ecdsa.c b/src/util/test_crypto_ecdsa.c
index 826097d52..190c58d7d 100644
--- a/src/util/test_crypto_ecdsa.c
+++ b/src/util/test_crypto_ecdsa.c
@@ -55,7 +55,8 @@ testSignVerify ()
for (i = 0; i < ITER; i++)
{
fprintf (stderr, "%s", "."); fflush (stderr);
- if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_sign (key, &purp, &sig))
+ if (GNUNET_SYSERR ==
+ GNUNET_CRYPTO_ecdsa_sign_ (key, &purp, &sig))
{
fprintf (stderr,
"%s",
@@ -64,16 +65,18 @@ testSignVerify ()
continue;
}
if (GNUNET_SYSERR ==
- GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_TEST, &purp, &sig,
- &pkey))
+ GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_TEST,
+ &purp, &sig,
+ &pkey))
{
printf ("GNUNET_CRYPTO_ecdsa_verify failed!\n");
ok = GNUNET_SYSERR;
continue;
}
if (GNUNET_SYSERR !=
- GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN,
- &purp, &sig, &pkey))
+ GNUNET_CRYPTO_ecdsa_verify_ (
+ GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN,
+ &purp, &sig, &pkey))
{
printf ("GNUNET_CRYPTO_ecdsa_verify failed to fail!\n");
ok = GNUNET_SYSERR;
@@ -104,33 +107,33 @@ testDeriveSignVerify ()
purp.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose));
purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST);
- if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_sign (dpriv, &purp, &sig))
+ if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_sign_ (dpriv, &purp, &sig))
{
fprintf (stderr, "%s", "GNUNET_CRYPTO_ecdsa_sign returned SYSERR\n");
GNUNET_free (dpriv);
return GNUNET_SYSERR;
}
if (GNUNET_SYSERR ==
- GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_TEST,
- &purp, &sig,
- &dpub))
+ GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_TEST,
+ &purp, &sig,
+ &dpub))
{
printf ("GNUNET_CRYPTO_ecdsa_verify failed!\n");
GNUNET_free (dpriv);
return GNUNET_SYSERR;
}
if (GNUNET_SYSERR !=
- GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_TEST,
- &purp, &sig,
- &pkey))
+ GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_TEST,
+ &purp, &sig,
+ &pkey))
{
printf ("GNUNET_CRYPTO_ecdsa_verify failed to fail!\n");
GNUNET_free (dpriv);
return GNUNET_SYSERR;
}
if (GNUNET_SYSERR !=
- GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN,
- &purp, &sig, &dpub))
+ GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN,
+ &purp, &sig, &dpub))
{
printf ("GNUNET_CRYPTO_ecdsa_verify failed to fail!\n");
GNUNET_free (dpriv);
@@ -160,7 +163,7 @@ testSignPerformance ()
for (i = 0; i < ITER; i++)
{
fprintf (stderr, "%s", "."); fflush (stderr);
- if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_sign (key, &purp, &sig))
+ if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_sign_ (key, &purp, &sig))
{
fprintf (stderr, "%s",
"GNUNET_CRYPTO_ecdsa_sign returned SYSERR\n");