diff --git a/include/polarssl/config.h b/include/polarssl/config.h index 362c237d2e..fcdce0be63 100644 --- a/include/polarssl/config.h +++ b/include/polarssl/config.h @@ -480,6 +480,43 @@ */ #define POLARSSL_DHM_C +/** + * \def POLARSSL_ECDH_C + * + * Enable the elliptic curve Diffie-Hellman library. + * + * Module: library/ecdh.c + * Caller: + * + * Requires: POLARSSL_ECP_C + */ +#define POLARSSL_ECDH_C + +/** + * \def POLARSSL_ECDSA_C + * + * Enable the elliptic curve DSA library. + * + * Module: library/ecdsa.c + * Caller: + * + * Requires: POLARSSL_ECP_C + */ +#define POLARSSL_ECDSA_C + +/** + * \def POLARSSL_ECP_C + * + * Enable the elliptic curve over GF(p) library. + * + * Module: library/ecp.c + * Caller: library/ecdh.c + * library/ecdsa.c + * + * Requires: POLARSSL_BIGNUM_C + */ +#define POLARSSL_ECP_C + /** * \def POLARSSL_ENTROPY_C * @@ -830,43 +867,6 @@ */ #define POLARSSL_XTEA_C -/** - * \def POLARSSL_ECP_C - * - * Enable the elliptic curve over GF(p) library. - * - * Module: library/ecp.c - * Caller: library/ecdh.c - * library/ecdsa.c - * - * Requires: POLARSSL_BIGNUM_C - */ -#define POLARSSL_ECP_C - -/** - * \def POLARSSL_ECDH_C - * - * Enable the elliptic curve Diffie-Hellman library. - * - * Module: library/ecdh.c - * Caller: - * - * Requires: POLARSSL_ECP_C - */ -#define POLARSSL_ECDH_C - -/** - * \def POLARSSL_ECDSA_C - * - * Enable the elliptic curve DSA library. - * - * Module: library/ecdsa.c - * Caller: - * - * Requires: POLARSSL_ECP_C - */ -#define POLARSSL_ECDSA_C - /* \} name */ #endif /* config.h */ diff --git a/library/Makefile b/library/Makefile index 6852e95df2..c3cd45179b 100644 --- a/library/Makefile +++ b/library/Makefile @@ -39,7 +39,8 @@ OBJS= aes.o arc4.o asn1parse.o \ blowfish.o camellia.o \ certs.o cipher.o cipher_wrap.o \ ctr_drbg.o debug.o des.o \ - dhm.o ecp.o \ + dhm.o ecdh.o ecdsa.o \ + ecp.o \ entropy.o entropy_poll.o \ error.o gcm.o havege.o \ md.o md_wrap.o md2.o \ diff --git a/tests/Makefile b/tests/Makefile index be5e09831a..08173e1147 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -30,6 +30,7 @@ APPS = test_suite_aes test_suite_arc4 \ test_suite_cipher.des test_suite_cipher.null \ 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_gcm.decrypt \ test_suite_gcm.decrypt test_suite_hmac_shax \ @@ -128,6 +129,14 @@ test_suite_dhm: test_suite_dhm.c ../library/libpolarssl.a echo " CC $@.c" $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@ +test_suite_ecdh: test_suite_ecdh.c ../library/libpolarssl.a + echo " CC $@.c" + $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@ + +test_suite_ecdsa: test_suite_ecdsa.c ../library/libpolarssl.a + echo " CC $@.c" + $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@ + test_suite_ecp: test_suite_ecp.c ../library/libpolarssl.a echo " CC $@.c" $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@