Merge branch 'development' into dtls

* development: (100 commits)
  Update Changelog for the mem-measure branch
  Fix issues introduced when rebasing
  Fix compile error in memory_buffer_alloc_selftest
  Code cosmetics
  Add curve25519 to ecc-heap.sh
  Add curve25519 to the benchmark program
  Fix compile issue when buffer_alloc not available
  New script ecc-heap.sh
  Fix unused variable issue in some configs
  Rm usunused member in private struct
  Add heap usage for PK in benchmark
  Use memory_buffer_alloc() in benchmark if available
  Only define mode_func if mode is enabled (CBC etc)
  PKCS8 encrypted key depend on PKCS5 or PKCS12
  Disable SRV_C for client measurement
  Output stack+heap usage with massif
  Enable NIST_OPTIM by default for config-suite-b
  Refactor memory.sh
  Adapt memory.sh to config-suite-b
  Adapt mini-client for config-suite-b.h
  ...

Conflicts:
	ChangeLog
	include/polarssl/net.h
	library/Makefile
	library/error.c
	library/ssl_tls.c
	programs/Makefile
	programs/ssl/ssl_client2.c
	programs/ssl/ssl_server2.c
	tests/Makefile
This commit is contained in:
Manuel Pégourié-Gonnard 2015-02-16 18:37:53 +00:00
commit d901d17817
212 changed files with 3927 additions and 2497 deletions

View file

@ -7,22 +7,36 @@ CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-state
-Wno-unused-function -Wno-unused-value
OFLAGS = -O2
LDFLAGS += -L../library -lmbedtls $(SYS_LDFLAGS)
LDFLAGS += -L../library -lmbedtls$(SHARED_SUFFIX) $(SYS_LDFLAGS)
DLEXT=so
ifndef SHARED
DEP=../library/libmbedtls.a
CHECK_PRELOAD=
else
DEP=../library/libmbedtls.so
CHECK_PRELOAD= LD_PRELOAD=../library/libmbedtls.so
DEP=../library/libmbedtls.$(DLEXT)
CHECK_PRELOAD= LD_PRELOAD=../library/libmbedtls.$(DLEXT)
endif
ifdef DEBUG
CFLAGS += -g3
endif
#
# if we running on Windows build
# for Windows
#
ifdef WINDOWS
WINDOWS_BUILD=1
endif
ifdef WINDOWS_BUILD
DLEXT=dll
EXEXT=.exe
LDFLAGS += -lws2_32
ifdef SHARED
SHARED_SUFFIX=.$(DLEXT)
endif
endif
# Zlib shared library extensions:
@ -30,45 +44,45 @@ ifdef ZLIB
LDFLAGS += -lz
endif
APPS = test_suite_aes.ecb test_suite_aes.cbc \
test_suite_aes.cfb test_suite_aes.rest \
test_suite_arc4 test_suite_asn1write \
test_suite_base64 test_suite_blowfish \
test_suite_camellia test_suite_ccm \
test_suite_cipher.aes \
test_suite_cipher.arc4 test_suite_cipher.ccm \
test_suite_cipher.gcm \
test_suite_cipher.blowfish \
test_suite_cipher.camellia \
test_suite_cipher.des test_suite_cipher.null \
test_suite_cipher.padding \
test_suite_ctr_drbg test_suite_debug \
test_suite_des test_suite_dhm \
test_suite_ecdh test_suite_ecdsa \
test_suite_ecp \
test_suite_error test_suite_entropy \
test_suite_gcm.aes128_de \
test_suite_gcm.aes192_de \
test_suite_gcm.aes256_de \
test_suite_gcm.aes128_en \
test_suite_gcm.aes192_en \
test_suite_gcm.aes256_en \
test_suite_gcm.camellia test_suite_hmac_shax \
test_suite_hmac_drbg.misc \
test_suite_hmac_drbg.no_reseed \
test_suite_hmac_drbg.nopr \
test_suite_hmac_drbg.pr \
test_suite_md test_suite_mdx \
test_suite_memory_buffer_alloc \
test_suite_mpi test_suite_pbkdf2 \
test_suite_pem \
test_suite_pkcs1_v21 test_suite_pkcs5 \
test_suite_pkparse test_suite_pkwrite \
test_suite_pk \
test_suite_rsa test_suite_shax \
test_suite_ssl \
test_suite_x509parse test_suite_x509write \
test_suite_xtea test_suite_version
APPS = test_suite_aes.ecb$(EXEXT) test_suite_aes.cbc$(EXEXT) \
test_suite_aes.cfb$(EXEXT) test_suite_aes.rest$(EXEXT) \
test_suite_arc4$(EXEXT) test_suite_asn1write$(EXEXT) \
test_suite_base64$(EXEXT) test_suite_blowfish$(EXEXT) \
test_suite_camellia$(EXEXT) test_suite_ccm$(EXEXT) \
test_suite_cipher.aes$(EXEXT) \
test_suite_cipher.arc4$(EXEXT) test_suite_cipher.ccm$(EXEXT) \
test_suite_cipher.gcm$(EXEXT) \
test_suite_cipher.blowfish$(EXEXT) \
test_suite_cipher.camellia$(EXEXT) \
test_suite_cipher.des$(EXEXT) test_suite_cipher.null$(EXEXT) \
test_suite_cipher.padding$(EXEXT) \
test_suite_ctr_drbg$(EXEXT) test_suite_debug$(EXEXT) \
test_suite_des$(EXEXT) test_suite_dhm$(EXEXT) \
test_suite_ecdh$(EXEXT) test_suite_ecdsa$(EXEXT) \
test_suite_ecp$(EXEXT) \
test_suite_error$(EXEXT) test_suite_entropy$(EXEXT) \
test_suite_gcm.aes128_de$(EXEXT) \
test_suite_gcm.aes192_de$(EXEXT) \
test_suite_gcm.aes256_de$(EXEXT) \
test_suite_gcm.aes128_en$(EXEXT) \
test_suite_gcm.aes192_en$(EXEXT) \
test_suite_gcm.aes256_en$(EXEXT) \
test_suite_gcm.camellia$(EXEXT) test_suite_hmac_shax$(EXEXT) \
test_suite_hmac_drbg.misc$(EXEXT) \
test_suite_hmac_drbg.no_reseed$(EXEXT) \
test_suite_hmac_drbg.nopr$(EXEXT) \
test_suite_hmac_drbg.pr$(EXEXT) \
test_suite_md$(EXEXT) test_suite_mdx$(EXEXT) \
test_suite_memory_buffer_alloc$(EXEXT) \
test_suite_mpi$(EXEXT) test_suite_pbkdf2$(EXEXT) \
test_suite_pem$(EXEXT) \
test_suite_pkcs1_v21$(EXEXT) test_suite_pkcs5$(EXEXT) \
test_suite_pkparse$(EXEXT) test_suite_pkwrite$(EXEXT) \
test_suite_pk$(EXEXT) \
test_suite_rsa$(EXEXT) test_suite_shax$(EXEXT) \
test_suite_ssl$(EXEXT) \
test_suite_x509parse$(EXEXT) test_suite_x509write$(EXEXT) \
test_suite_xtea$(EXEXT) test_suite_version$(EXEXT)
.SILENT:
@ -174,237 +188,237 @@ test_suite_hmac_drbg.pr.c : suites/test_suite_hmac_drbg.function suites/test_sui
echo " Generate $@"
scripts/generate_code.pl suites $* $*
test_suite_aes.ecb: test_suite_aes.ecb.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_aes.ecb$(EXEXT): test_suite_aes.ecb.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_aes.cbc: test_suite_aes.cbc.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_aes.cbc$(EXEXT): test_suite_aes.cbc.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_aes.cfb: test_suite_aes.cfb.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_aes.cfb$(EXEXT): test_suite_aes.cfb.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_aes.rest: test_suite_aes.rest.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_aes.rest$(EXEXT): test_suite_aes.rest.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_arc4: test_suite_arc4.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_arc4$(EXEXT): test_suite_arc4.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_asn1write: test_suite_asn1write.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_asn1write$(EXEXT): test_suite_asn1write.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_base64: test_suite_base64.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_base64$(EXEXT): test_suite_base64.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_blowfish: test_suite_blowfish.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_blowfish$(EXEXT): test_suite_blowfish.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_camellia: test_suite_camellia.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_camellia$(EXEXT): test_suite_camellia.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_ccm: test_suite_ccm.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_ccm$(EXEXT): test_suite_ccm.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_cipher.aes: test_suite_cipher.aes.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_cipher.aes$(EXEXT): test_suite_cipher.aes.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_cipher.arc4: test_suite_cipher.arc4.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_cipher.arc4$(EXEXT): test_suite_cipher.arc4.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_cipher.ccm: test_suite_cipher.ccm.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_cipher.ccm$(EXEXT): test_suite_cipher.ccm.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_cipher.gcm: test_suite_cipher.gcm.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_cipher.gcm$(EXEXT): test_suite_cipher.gcm.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_cipher.blowfish: test_suite_cipher.blowfish.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_cipher.blowfish$(EXEXT): test_suite_cipher.blowfish.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_cipher.camellia: test_suite_cipher.camellia.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_cipher.camellia$(EXEXT): test_suite_cipher.camellia.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_cipher.des: test_suite_cipher.des.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_cipher.des$(EXEXT): test_suite_cipher.des.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_cipher.null: test_suite_cipher.null.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_cipher.null$(EXEXT): test_suite_cipher.null.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_cipher.padding: test_suite_cipher.padding.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_cipher.padding$(EXEXT): test_suite_cipher.padding.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_ctr_drbg: test_suite_ctr_drbg.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_ctr_drbg$(EXEXT): test_suite_ctr_drbg.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_des: test_suite_des.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_des$(EXEXT): test_suite_des.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_dhm: test_suite_dhm.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_dhm$(EXEXT): test_suite_dhm.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_ecdh: test_suite_ecdh.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_ecdh$(EXEXT): test_suite_ecdh.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_ecdsa: test_suite_ecdsa.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_ecdsa$(EXEXT): test_suite_ecdsa.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_ecp: test_suite_ecp.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_ecp$(EXEXT): test_suite_ecp.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_entropy: test_suite_entropy.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_entropy$(EXEXT): test_suite_entropy.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_error: test_suite_error.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_error$(EXEXT): test_suite_error.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_gcm.aes128_de: test_suite_gcm.aes128_de.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_gcm.aes128_de$(EXEXT): test_suite_gcm.aes128_de.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_gcm.aes192_de: test_suite_gcm.aes192_de.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_gcm.aes192_de$(EXEXT): test_suite_gcm.aes192_de.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_gcm.aes256_de: test_suite_gcm.aes256_de.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_gcm.aes256_de$(EXEXT): test_suite_gcm.aes256_de.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_gcm.aes128_en: test_suite_gcm.aes128_en.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_gcm.aes128_en$(EXEXT): test_suite_gcm.aes128_en.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_gcm.aes192_en: test_suite_gcm.aes192_en.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_gcm.aes192_en$(EXEXT): test_suite_gcm.aes192_en.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_gcm.aes256_en: test_suite_gcm.aes256_en.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_gcm.aes256_en$(EXEXT): test_suite_gcm.aes256_en.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_gcm.camellia: test_suite_gcm.camellia.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_gcm.camellia$(EXEXT): test_suite_gcm.camellia.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_hmac_drbg.misc: test_suite_hmac_drbg.misc.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_hmac_drbg.misc$(EXEXT): test_suite_hmac_drbg.misc.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_hmac_drbg.no_reseed: test_suite_hmac_drbg.no_reseed.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_hmac_drbg.no_reseed$(EXEXT): test_suite_hmac_drbg.no_reseed.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_hmac_drbg.nopr: test_suite_hmac_drbg.nopr.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_hmac_drbg.nopr$(EXEXT): test_suite_hmac_drbg.nopr.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_hmac_drbg.pr: test_suite_hmac_drbg.pr.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_hmac_drbg.pr$(EXEXT): test_suite_hmac_drbg.pr.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_hmac_shax: test_suite_hmac_shax.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_hmac_shax$(EXEXT): test_suite_hmac_shax.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_md: test_suite_md.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_md$(EXEXT): test_suite_md.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_mdx: test_suite_mdx.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_mdx$(EXEXT): test_suite_mdx.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_memory_buffer_alloc: test_suite_memory_buffer_alloc.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_memory_buffer_alloc$(EXEXT): test_suite_memory_buffer_alloc.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_mpi: test_suite_mpi.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_mpi$(EXEXT): test_suite_mpi.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_pbkdf2: test_suite_pbkdf2.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_pbkdf2$(EXEXT): test_suite_pbkdf2.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_pem: test_suite_pem.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_pem$(EXEXT): test_suite_pem.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_pkcs1_v21: test_suite_pkcs1_v21.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_pkcs1_v21$(EXEXT): test_suite_pkcs1_v21.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_pkcs5: test_suite_pkcs5.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_pkcs5$(EXEXT): test_suite_pkcs5.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_pkparse: test_suite_pkparse.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_pkparse$(EXEXT): test_suite_pkparse.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_pkwrite: test_suite_pkwrite.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_pkwrite$(EXEXT): test_suite_pkwrite.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_pk: test_suite_pk.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_pk$(EXEXT): test_suite_pk.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_rsa: test_suite_rsa.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_rsa$(EXEXT): test_suite_rsa.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_shax: test_suite_shax.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_shax$(EXEXT): test_suite_shax.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_ssl: test_suite_ssl.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_ssl$(EXEXT): test_suite_ssl.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_x509parse: test_suite_x509parse.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_x509parse$(EXEXT): test_suite_x509parse.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_x509write: test_suite_x509write.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_x509write$(EXEXT): test_suite_x509write.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_xtea: test_suite_xtea.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_xtea$(EXEXT): test_suite_xtea.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_debug: test_suite_debug.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_debug$(EXEXT): test_suite_debug.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
test_suite_version: test_suite_version.c $(DEP)
echo " CC $@.c"
$(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
test_suite_version$(EXEXT): test_suite_version.c $(DEP)
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS) -o $@
clean:
ifndef WINDOWS
@ -422,9 +436,9 @@ ifndef WINDOWS
do \
echo " - $${i}"; \
RESULT=`$(CHECK_PRELOAD) ./$${i} | grep -v 'PASS$$' | grep -v -- '----' | grep -v '^$$'`; \
FAILED=`echo $$RESULT |grep FAILED`; \
PASSED=`echo $$RESULT |grep PASSED`; \
echo " $$RESULT"; \
if [ "$$FAILED" != "" ]; \
if [ "$$PASSED" == "" ]; \
then \
echo "**** Failed ***************"; \
RETURN=1; \

View file

@ -73,6 +73,9 @@ msg()
msg "test: recursion.pl" # < 1s
scripts/recursion.pl library/*.c
msg "test: freshness of generated source files" # < 1s
tests/scripts/check-generated-files.sh
msg "build: cmake, gcc, ASan" # ~ 1 min 50s
cleanup
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
@ -128,10 +131,70 @@ tests/scripts/curves.pl
msg "build: Unix make, -O2 (gcc)" # ~ 30s
cleanup
CC=gcc make
CC=gcc CFLAGS=-Werror make
# MemSan currently only available on Linux
if [ `uname` = 'Linux' ]; then
# this is meant to cath missing #define polarssl_printf etc
msg "build: full config except platform.c" # ~ 30s
cleanup
cp "$CONFIG_H" "$CONFIG_BAK"
scripts/config.pl full
scripts/config.pl unset POLARSSL_PLATFORM_C
scripts/config.pl unset POLARSSL_PLATFORM_MEMORY
scripts/config.pl unset POLARSSL_MEMORY_C
scripts/config.pl unset POLARSSL_MEMORY_BUFFER_ALLOC_C
CC=gcc CFLAGS=-Werror make
if uname -a | grep -F x86_64 >/dev/null; then
msg "build: i386, make, gcc" # ~ 30s
cleanup
CC=gcc CFLAGS='-Werror -m32' make
fi # x86_64
if which arm-none-eabi-gcc >/dev/null; then
msg "build: arm-none-eabi-gcc, make" # ~ 10s
cleanup
cp "$CONFIG_H" "$CONFIG_BAK"
scripts/config.pl full
scripts/config.pl unset POLARSSL_NET_C
scripts/config.pl unset POLARSSL_TIMING_C
scripts/config.pl unset POLARSSL_FS_IO
# following things are not in the default config
scripts/config.pl unset POLARSSL_HAVEGE_C # depends on timing.c
scripts/config.pl unset POLARSSL_THREADING_PTHREAD
scripts/config.pl unset POLARSSL_THREADING_C
scripts/config.pl unset POLARSSL_MEMORY_BACKTRACE # execinfo.h
scripts/config.pl unset POLARSSL_MEMORY_BUFFER_ALLOC_C # calls exit
CC=arm-none-eabi-gcc CFLAGS=-Werror make lib
fi # arm-gcc
if which armcc >/dev/null; then
msg "build: armcc, make"
cleanup
cp "$CONFIG_H" "$CONFIG_BAK"
scripts/config.pl full
scripts/config.pl unset POLARSSL_NET_C
scripts/config.pl unset POLARSSL_TIMING_C
scripts/config.pl unset POLARSSL_FS_IO
scripts/config.pl unset POLARSSL_HAVE_TIME
# following things are not in the default config
scripts/config.pl unset POLARSSL_HAVEGE_C # depends on timing.c
scripts/config.pl unset POLARSSL_THREADING_PTHREAD
scripts/config.pl unset POLARSSL_THREADING_C
scripts/config.pl unset POLARSSL_MEMORY_BACKTRACE # execinfo.h
scripts/config.pl unset POLARSSL_MEMORY_BUFFER_ALLOC_C # calls exit
CC=arm-none-eabi-gcc CFLAGS=-Werror make lib 2> armcc.stderr
grep -v '^ar: creating' armcc.stderr || exit 1
rm armcc.stderr
fi # armcc
if which i686-w64-mingw32-gcc >/dev/null; then
msg "build: cross-mingw64, make" # ~ 30s
cleanup
CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar CFLAGS=-Werror WINDOWS_BUILD=1 make
fi
# MemSan currently only available on Linux 64 bits
if uname -a | grep 'Linux.*x86_64' >/dev/null; then
msg "build: MSan (clang)" # ~ 1 min 20s
cleanup

View file

@ -0,0 +1,24 @@
#!/bin/sh
# check if generated files are up-to-date
set -eu
if [ -d library -a -d include -a -d tests ]; then :; else
echo "Must be run from mbed TLS root" >&2
exit 1
fi
check()
{
FILE=$1
SCRIPT=$2
cp $FILE $FILE.bak
$SCRIPT
diff $FILE $FILE.bak
mv $FILE.bak $FILE
}
check library/error.c scripts/generate_errors.pl
check library/version_features.c scripts/generate_features.pl

View file

@ -65,12 +65,12 @@ print TEST_FILE << "END";
#include POLARSSL_CONFIG_FILE
#endif
$test_helpers
$suite_pre_code
$suite_header
$suite_post_code
$test_helpers
END
$test_main =~ s/SUITE_PRE_DEP/$suite_pre_code/;

View file

@ -1,8 +1,15 @@
#if defined(POLARSSL_PLATFORM_C)
#include "polarssl/platform.h"
#else
#include <stdio.h>
#define polarssl_printf printf
#define polarssl_fprintf fprintf
#define polarssl_malloc malloc
#define polarssl_free free
#define polarssl_exit exit
#define polarssl_fprintf fprintf
#define polarssl_printf printf
#define polarssl_snprintf snprintf
#endif
#ifdef _MSC_VER
@ -12,10 +19,17 @@ typedef UINT32 uint32_t;
#include <inttypes.h>
#endif
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define assert(a) if( !( a ) ) \
{ \
polarssl_fprintf( stderr, "Assertion Failed at %s:%d - %s\n", \
__FILE__, __LINE__, #a ); \
polarssl_exit( 1 ); \
}
/*
* 32-bit integer manipulation macros (big endian)
*/
@ -39,13 +53,13 @@ typedef UINT32 uint32_t;
}
#endif
static int unhexify(unsigned char *obuf, const char *ibuf)
static int unhexify( unsigned char *obuf, const char *ibuf )
{
unsigned char c, c2;
int len = strlen(ibuf) / 2;
assert(!(strlen(ibuf) %1)); // must be even number of bytes
int len = strlen( ibuf ) / 2;
assert( strlen( ibuf ) % 2 == 0 ); // must be even number of bytes
while (*ibuf != 0)
while( *ibuf != 0 )
{
c = *ibuf++;
if( c >= '0' && c <= '9' )
@ -73,14 +87,14 @@ static int unhexify(unsigned char *obuf, const char *ibuf)
return len;
}
static void hexify(unsigned char *obuf, const unsigned char *ibuf, int len)
static void hexify( unsigned char *obuf, const unsigned char *ibuf, int len )
{
unsigned char l, h;
while (len != 0)
while( len != 0 )
{
h = (*ibuf) / 16;
l = (*ibuf) % 16;
h = *ibuf / 16;
l = *ibuf % 16;
if( h < 10 )
*obuf++ = '0' + h;
@ -107,7 +121,7 @@ static void hexify(unsigned char *obuf, const unsigned char *ibuf, int len)
static unsigned char *zero_alloc( size_t len )
{
void *p;
size_t actual_len = len != 0 ? len : 1;
size_t actual_len = ( len != 0 ) ? len : 1;
p = polarssl_malloc( actual_len );
assert( p != NULL );
@ -131,7 +145,7 @@ static unsigned char *unhexify_alloc( const char *ibuf, size_t *olen )
{
unsigned char *obuf;
*olen = strlen(ibuf) / 2;
*olen = strlen( ibuf ) / 2;
if( *olen == 0 )
return( zero_alloc( *olen ) );
@ -269,9 +283,11 @@ static int rnd_pseudo_rand( void *rng_state, unsigned char *output, size_t len )
for( i = 0; i < 32; i++ )
{
info->v0 += (((info->v1 << 4) ^ (info->v1 >> 5)) + info->v1) ^ (sum + k[sum & 3]);
info->v0 += ( ( ( info->v1 << 4 ) ^ ( info->v1 >> 5 ) )
+ info->v1 ) ^ ( sum + k[sum & 3] );
sum += delta;
info->v1 += (((info->v0 << 4) ^ (info->v0 >> 5)) + info->v0) ^ (sum + k[(sum>>11) & 3]);
info->v1 += ( ( ( info->v0 << 4 ) ^ ( info->v0 >> 5 ) )
+ info->v0 ) ^ ( sum + k[( sum>>11 ) & 3] );
}
PUT_UINT32_BE( info->v0, result, 0 );

View file

@ -1,13 +1,14 @@
#include <stdio.h>
#include <string.h>
#if defined(POLARSSL_PLATFORM_C)
#include "polarssl/platform.h"
#else
#define polarssl_printf printf
#define polarssl_fprintf fprintf
#define polarssl_malloc malloc
#include <stdio.h>
#define polarssl_exit exit
#define polarssl_free free
#define polarssl_malloc malloc
#define polarssl_fprintf fprintf
#define polarssl_printf printf
#endif
#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
@ -280,7 +281,7 @@ int main()
{
polarssl_fprintf( stderr, "FAILED: FATAL PARSE ERROR\n" );
fclose(file);
exit( 2 );
polarssl_exit( 2 );
}
else
total_errors++;

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/aes.h>
#include "polarssl/aes.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/arc4.h>
#include "polarssl/arc4.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/asn1write.h>
#include "polarssl/asn1write.h"
#define GUARD_LEN 4
#define GUARD_VAL 0x2a

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/base64.h>
#include "polarssl/base64.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/camellia.h>
#include "polarssl/camellia.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/ccm.h>
#include "polarssl/ccm.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES
@ -146,6 +146,7 @@ void ccm_auth_decrypt( int cipher_id,
if( strcmp( "FAIL", result_hex ) == 0 )
{
ret = POLARSSL_ERR_CCM_AUTH_FAILED;
result_len = -1;
}
else
{

View file

@ -1,8 +1,8 @@
/* BEGIN_HEADER */
#include <polarssl/cipher.h>
#include "polarssl/cipher.h"
#if defined(POLARSSL_GCM_C)
#include <polarssl/gcm.h>
#include "polarssl/gcm.h"
#endif
/* END_HEADER */

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/ctr_drbg.h>
#include "polarssl/ctr_drbg.h"
int test_offset_idx;
int entropy_func( void *data, unsigned char *buf, size_t len )

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/debug.h>
#include "polarssl/debug.h"
struct buffer_data
{

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/des.h>
#include "polarssl/des.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/dhm.h>
#include "polarssl/dhm.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/ecdh.h>
#include "polarssl/ecdh.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/ecdsa.h>
#include "polarssl/ecdsa.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/ecp.h>
#include "polarssl/ecp.h"
#define POLARSSL_ECP_PF_UNKNOWN -1
/* END_HEADER */

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/entropy.h>
#include "polarssl/entropy.h"
/*
* Number of calls made to entropy_dummy_source()

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/error.h>
#include "polarssl/error.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/gcm.h>
#include "polarssl/gcm.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/hmac_drbg.h>
#include "polarssl/hmac_drbg.h"
typedef struct
{

View file

@ -1,7 +1,7 @@
/* BEGIN_HEADER */
#include <polarssl/sha1.h>
#include <polarssl/sha256.h>
#include <polarssl/sha512.h>
#include "polarssl/sha1.h"
#include "polarssl/sha256.h"
#include "polarssl/sha512.h"
/* END_HEADER */
/* BEGIN_CASE depends_on:POLARSSL_SHA1_C */

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/md.h>
#include "polarssl/md.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,8 +1,8 @@
/* BEGIN_HEADER */
#include <polarssl/md2.h>
#include <polarssl/md4.h>
#include <polarssl/md5.h>
#include <polarssl/ripemd160.h>
#include "polarssl/md2.h"
#include "polarssl/md4.h"
#include "polarssl/md5.h"
#include "polarssl/ripemd160.h"
/* END_HEADER */
/* BEGIN_CASE depends_on:POLARSSL_MD2_C */

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/memory_buffer_alloc.h>
#include "polarssl/memory_buffer_alloc.h"
#define TEST_SUITE_MEMORY_BUFFER_ALLOC
/* END_HEADER */

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/bignum.h>
#include "polarssl/bignum.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES
@ -97,6 +97,7 @@ void mpi_read_file( int radix_X, char *input_file, char *input_A,
unsigned char buf[1000];
size_t buflen;
FILE *file;
int ret;
memset( buf, 0x00, 1000 );
memset( str, 0x00, 1000 );
@ -105,8 +106,9 @@ void mpi_read_file( int radix_X, char *input_file, char *input_A,
file = fopen( input_file, "r" );
TEST_ASSERT( file != NULL );
TEST_ASSERT( mpi_read_file( &X, radix_X, file ) == result );
ret = mpi_read_file( &X, radix_X, file );
fclose(file);
TEST_ASSERT( ret == result );
if( result == 0 )
{

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/pbkdf2.h>
#include "polarssl/pbkdf2.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,6 +1,6 @@
/* BEGIN_HEADER */
#include <polarssl/base64.h>
#include <polarssl/pem.h>
#include "polarssl/base64.h"
#include "polarssl/pem.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,9 +1,9 @@
/* BEGIN_HEADER */
#include <polarssl/pk.h>
#include "polarssl/pk.h"
/* For error codes */
#include <polarssl/ecp.h>
#include <polarssl/rsa.h>
#include "polarssl/ecp.h"
#include "polarssl/rsa.h"
static int rnd_std_rand( void *rng_state, unsigned char *output, size_t len );

View file

@ -1,6 +1,6 @@
/* BEGIN_HEADER */
#include <polarssl/rsa.h>
#include <polarssl/md.h>
#include "polarssl/rsa.h"
#include "polarssl/md.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/pkcs5.h>
#include "polarssl/pkcs5.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,7 +1,7 @@
/* BEGIN_HEADER */
#include <polarssl/pk.h>
#include <polarssl/pem.h>
#include <polarssl/oid.h>
#include "polarssl/pk.h"
#include "polarssl/pem.h"
#include "polarssl/oid.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,7 +1,7 @@
/* BEGIN_HEADER */
#include <polarssl/pk.h>
#include <polarssl/pem.h>
#include <polarssl/oid.h>
#include "polarssl/pk.h"
#include "polarssl/pem.h"
#include "polarssl/oid.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,13 +1,13 @@
/* BEGIN_HEADER */
#include <polarssl/rsa.h>
#include <polarssl/md2.h>
#include <polarssl/md4.h>
#include <polarssl/md5.h>
#include <polarssl/sha1.h>
#include <polarssl/sha256.h>
#include <polarssl/sha512.h>
#include <polarssl/entropy.h>
#include <polarssl/ctr_drbg.h>
#include "polarssl/rsa.h"
#include "polarssl/md2.h"
#include "polarssl/md4.h"
#include "polarssl/md5.h"
#include "polarssl/sha1.h"
#include "polarssl/sha256.h"
#include "polarssl/sha512.h"
#include "polarssl/entropy.h"
#include "polarssl/ctr_drbg.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,7 +1,7 @@
/* BEGIN_HEADER */
#include <polarssl/sha1.h>
#include <polarssl/sha256.h>
#include <polarssl/sha512.h>
#include "polarssl/sha1.h"
#include "polarssl/sha256.h"
#include "polarssl/sha512.h"
/* END_HEADER */
/* BEGIN_CASE depends_on:POLARSSL_SHA1_C */

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/version.h>
#include "polarssl/version.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES
@ -17,10 +17,10 @@ void check_compiletime_version( char *version_str )
memset( build_str, 0, 100 );
memset( build_str_full, 0, 100 );
snprintf (build_str, 100, "%d.%d.%d", POLARSSL_VERSION_MAJOR,
polarssl_snprintf( build_str, 100, "%d.%d.%d", POLARSSL_VERSION_MAJOR,
POLARSSL_VERSION_MINOR, POLARSSL_VERSION_PATCH );
snprintf( build_str_full, 100, "mbed TLS %d.%d.%d", POLARSSL_VERSION_MAJOR,
polarssl_snprintf( build_str_full, 100, "mbed TLS %d.%d.%d", POLARSSL_VERSION_MAJOR,
POLARSSL_VERSION_MINOR, POLARSSL_VERSION_PATCH );
build_int = POLARSSL_VERSION_MAJOR << 24 |
@ -52,11 +52,11 @@ void check_runtime_version( char *version_str )
version_get_string( get_str );
version_get_string_full( get_str_full );
snprintf( build_str, 100, "%d.%d.%d",
polarssl_snprintf( build_str, 100, "%d.%d.%d",
(get_int >> 24) & 0xFF,
(get_int >> 16) & 0xFF,
(get_int >> 8) & 0xFF );
snprintf( build_str_full, 100, "mbed TLS %s", version_str );
polarssl_snprintf( build_str_full, 100, "mbed TLS %s", version_str );
TEST_ASSERT( strcmp( build_str, version_str ) == 0 );
TEST_ASSERT( strcmp( build_str_full, get_str_full ) == 0 );

View file

@ -1,10 +1,10 @@
/* BEGIN_HEADER */
#include <polarssl/x509_crt.h>
#include <polarssl/x509_crl.h>
#include <polarssl/x509_csr.h>
#include <polarssl/pem.h>
#include <polarssl/oid.h>
#include <polarssl/base64.h>
#include "polarssl/x509_crt.h"
#include "polarssl/x509_crl.h"
#include "polarssl/x509_csr.h"
#include "polarssl/pem.h"
#include "polarssl/oid.h"
#include "polarssl/base64.h"
int verify_none( void *data, x509_crt *crt, int certificate_depth, int *flags )
{

View file

@ -1,8 +1,8 @@
/* BEGIN_HEADER */
#include <polarssl/x509_crt.h>
#include <polarssl/x509_csr.h>
#include <polarssl/pem.h>
#include <polarssl/oid.h>
#include "polarssl/x509_crt.h"
#include "polarssl/x509_csr.h"
#include "polarssl/pem.h"
#include "polarssl/oid.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES

View file

@ -1,5 +1,5 @@
/* BEGIN_HEADER */
#include <polarssl/xtea.h>
#include "polarssl/xtea.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES