aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcryptobox/ed25519/ed25519.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcryptobox/ed25519/ed25519.c')
-rw-r--r--src/libcryptobox/ed25519/ed25519.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libcryptobox/ed25519/ed25519.c b/src/libcryptobox/ed25519/ed25519.c
index b022c16cc..736cd96bf 100644
--- a/src/libcryptobox/ed25519/ed25519.c
+++ b/src/libcryptobox/ed25519/ed25519.c
@@ -29,7 +29,7 @@ typedef struct ed25519_impl_s {
void (*sign) (unsigned char *sig, size_t *siglen_p,
const unsigned char *m, size_t mlen,
const unsigned char *sk);
- bool (*verify) (const unsigned char *sig,
+ int (*verify) (const unsigned char *sig,
const unsigned char *m,
size_t mlen,
const unsigned char *pk);
@@ -40,7 +40,7 @@ typedef struct ed25519_impl_s {
void ed_sign_##ext(unsigned char *sig, size_t *siglen_p, \
const unsigned char *m, size_t mlen, \
const unsigned char *sk); \
- bool ed_verify_##ext(const unsigned char *sig, \
+ int ed_verify_##ext(const unsigned char *sig, \
const unsigned char *m, \
size_t mlen, \
const unsigned char *pk)
@@ -98,7 +98,9 @@ ed25519_verify (const unsigned char *sig,
size_t mlen,
const unsigned char *pk)
{
- return (ed25519_opt->verify (sig, m, mlen, pk) == 0);
+ int ret = ed25519_opt->verify (sig, m, mlen, pk);
+
+ return (ret == 0 ? true : false);
}
struct ed25519_test_vector {