build tomcrypt sha256 code as separate object

This commit is contained in:
rofl0r 2018-01-03 15:40:51 +00:00 committed by wiire-a
parent fffb4eeea0
commit e552d93a50
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ TARGET = pixiewps
include $(SRCDIR)/crypto/tfm/sources.mak
TFMSRC = $(patsubst ./%,$(SRCDIR)/crypto/tfm/%,$(TFM_SRCS))
TFMOBJS = $(TFMSRC:.c=.o)
TC_SRCS = ./aes_cbc.c ./aes.c
TC_SRCS = ./aes_cbc.c ./aes.c ./sha256.c
TCSRC = $(patsubst ./%,$(SRCDIR)/crypto/tc/%,$(TC_SRCS))
TCOBJS = $(TCSRC:.c=.o)

View File

@ -5,7 +5,7 @@
#ifdef USE_OPENSSL
# include <openssl/sha.h>
#else
# include "tc/sha256.c"
# include "tc/tomcrypt.h"
# define SHA256_CTX hash_state
# define SHA256_Init(x) do { sha256_init(x); } while(0)
# define SHA256_Update(x, y, z) sha256_process(x, y, z)