fix/create ed25519 build, muffle warnings

This commit is contained in:
~hatteb-mitlyd 2014-04-10 17:08:20 -07:00
parent a36a9011c8
commit 70d39b9bfc
3 changed files with 28 additions and 4 deletions

1
outside/ed25519/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
ed25519.a

23
outside/ed25519/Makefile Normal file
View File

@ -0,0 +1,23 @@
# A simple makefile.
#
CFLAGS= -O2 -g -Wall
.c.o:
$(CC) -c $(CFLAGS) -o $@ $<
OFILES=\
src/add_scalar.o \
src/fe.o \
src/ge.o \
src/key_exchange.o \
src/keypair.o \
src/sc.o \
src/seed.o \
src/sha512.o \
src/sign.o \
src/verify.o
all: ed25519.a($(OFILES))
clean:
-rm $(OFILES) ed25519.a

View File

@ -268,8 +268,8 @@ int sha512(const unsigned char *message, size_t message_len, unsigned char *out)
{
sha512_context ctx;
int ret;
if (ret = sha512_init(&ctx)) return ret;
if (ret = sha512_update(&ctx, message, message_len)) return ret;
if (ret = sha512_final(&ctx, out)) return ret;
if ((ret = sha512_init(&ctx))) return ret;
if ((ret = sha512_update(&ctx, message, message_len))) return ret;
if ((ret = sha512_final(&ctx, out))) return ret;
return 0;
}