diff options
author | Rob Austein <sra@hactrn.net> | 2015-12-13 00:43:11 -0500 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-12-13 00:43:11 -0500 |
commit | c60b4bbd62865c4fe891dcbf7586c4718082d626 (patch) | |
tree | c7a4e2ba247241df3b3fecd79cee197c84646881 /GNUmakefile | |
parent | 6f479d8615a60e94b3c19e090a4eba8a0256ec32 (diff) |
Add rpc_hash.c. Convert dynamic allocator in hash.c to use private
pool of pre-configured state blocks, suitable for an embedded system.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile index 810d997..1f6b711 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -25,28 +25,37 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Number of static hash and HMAC state blocks to allocate + +STATIC_HASH_STATE_BLOCKS = 10 +STATIC_HMAC_STATE_BLOCKS = 4 + INC = hal.h LIB = libhal.a OBJ = ${IO_OBJ} core.o csprng.o hash.o aes_keywrap.o pbkdf2.o \ modexp.o rsa.o ecdsa.o asn1.o errorstrings.o ${RPC_OBJ} - IO_OBJ_EIM = hal_io_eim.o novena-eim.o IO_OBJ_I2C = hal_io_i2c.o # Default I/O bus is EIM, override this to use I2C instead IO_OBJ = ${IO_OBJ_EIM} -RPC_OBJ_CLIENT = hal_rpc.o rpc_client.o -RPC_OBJ_SERVER = hal_rpc.o rpc_server.o +RPC_OBJ_COMMON = hal_rpc.o rpc_hash.o +RPC_OBJ_CLIENT = ${RPC_OBJ_COMMON} rpc_client.o +RPC_OBJ_SERVER = ${RPC_OBJ_COMMON} rpc_misc.o rpc_pkey.o -# Default should be to build the RPC server, but we haven't written even the skeleton of that yet. -# We'll probably end up needing a makefile conditional to handle all this properly +# Default should be to build the RPC server code, but we haven't +# written even the skeleton of that yet. We'll probably end up +# needing a makefile conditional to handle all this properly RPC_OBJ = ${RPC_OBJ_CLIENT} TFMDIR := $(abspath ../thirdparty/libtfm) CFLAGS += -g3 -Wall -fPIC -std=c99 -I${TFMDIR} -DHAL_ECDSA_DEBUG_ONLY_STATIC_TEST_VECTOR_RANDOM=1 LDFLAGS := -g3 -L${TFMDIR} -ltfm +CFLAGS += -DHAL_STATIC_HASH_STATE_BLOCKS=${STATIC_HASH_STATE_BLOCKS} +CFLAGS += -DHAL_STATIC_HMAC_STATE_BLOCKS=${STATIC_HMAC_STATE_BLOCKS} + all: ${LIB} cd tests; ${MAKE} CFLAGS='${CFLAGS} -I..' LDFLAGS='${LDFLAGS}' $@ cd utils; ${MAKE} CFLAGS='${CFLAGS} -I..' LDFLAGS='${LDFLAGS}' $@ |