From ce2f2376975bc691a9a62d5f0505b1585fcbf8e6 Mon Sep 17 00:00:00 2001 From: Rich Evans Date: Fri, 6 Feb 2015 13:57:42 +0000 Subject: [PATCH] change test function includes to use one convention --- library/pem.c | 1 + tests/suites/test_suite_aes.function | 2 +- tests/suites/test_suite_arc4.function | 2 +- tests/suites/test_suite_asn1write.function | 2 +- tests/suites/test_suite_base64.function | 2 +- tests/suites/test_suite_camellia.function | 2 +- tests/suites/test_suite_ccm.function | 2 +- tests/suites/test_suite_cipher.function | 4 ++-- tests/suites/test_suite_ctr_drbg.function | 4 +--- tests/suites/test_suite_debug.function | 2 +- tests/suites/test_suite_des.function | 2 +- tests/suites/test_suite_dhm.function | 2 +- tests/suites/test_suite_ecdh.function | 2 +- tests/suites/test_suite_ecdsa.function | 2 +- tests/suites/test_suite_ecp.function | 2 +- tests/suites/test_suite_entropy.function | 2 +- tests/suites/test_suite_error.function | 2 +- tests/suites/test_suite_gcm.function | 2 +- tests/suites/test_suite_hmac_drbg.function | 4 +--- tests/suites/test_suite_hmac_shax.function | 6 +++--- tests/suites/test_suite_md.function | 2 +- tests/suites/test_suite_mdx.function | 8 ++++---- .../test_suite_memory_buffer_alloc.function | 2 +- tests/suites/test_suite_mpi.function | 2 +- tests/suites/test_suite_pbkdf2.function | 2 +- tests/suites/test_suite_pem.function | 4 ++-- tests/suites/test_suite_pk.function | 6 +++--- tests/suites/test_suite_pkcs1_v21.function | 4 ++-- tests/suites/test_suite_pkcs5.function | 2 +- tests/suites/test_suite_pkparse.function | 6 +++--- tests/suites/test_suite_pkwrite.function | 6 +++--- tests/suites/test_suite_rsa.function | 18 +++++++++--------- tests/suites/test_suite_shax.function | 6 +++--- tests/suites/test_suite_version.function | 2 +- tests/suites/test_suite_x509parse.function | 12 ++++++------ tests/suites/test_suite_x509write.function | 8 ++++---- tests/suites/test_suite_xtea.function | 2 +- 37 files changed, 69 insertions(+), 72 deletions(-) diff --git a/library/pem.c b/library/pem.c index c6d077c64..b5e8eeedd 100644 --- a/library/pem.c +++ b/library/pem.c @@ -27,6 +27,7 @@ #endif #if defined(POLARSSL_PEM_PARSE_C) || defined(POLARSSL_PEM_WRITE_C) + #include "polarssl/pem.h" #include "polarssl/base64.h" #include "polarssl/des.h" diff --git a/tests/suites/test_suite_aes.function b/tests/suites/test_suite_aes.function index 3bd7d4a2c..7027247a5 100644 --- a/tests/suites/test_suite_aes.function +++ b/tests/suites/test_suite_aes.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/aes.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_arc4.function b/tests/suites/test_suite_arc4.function index b6d3d4ca3..dc7b24b5d 100644 --- a/tests/suites/test_suite_arc4.function +++ b/tests/suites/test_suite_arc4.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/arc4.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_asn1write.function b/tests/suites/test_suite_asn1write.function index 72e9b4bfb..49b073aa9 100644 --- a/tests/suites/test_suite_asn1write.function +++ b/tests/suites/test_suite_asn1write.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/asn1write.h" #define GUARD_LEN 4 #define GUARD_VAL 0x2a diff --git a/tests/suites/test_suite_base64.function b/tests/suites/test_suite_base64.function index 01d8aa6f9..a8348d2ee 100644 --- a/tests/suites/test_suite_base64.function +++ b/tests/suites/test_suite_base64.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/base64.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_camellia.function b/tests/suites/test_suite_camellia.function index 6d88f8ccd..e73aa867a 100644 --- a/tests/suites/test_suite_camellia.function +++ b/tests/suites/test_suite_camellia.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/camellia.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_ccm.function b/tests/suites/test_suite_ccm.function index d513a1503..f597c6914 100644 --- a/tests/suites/test_suite_ccm.function +++ b/tests/suites/test_suite_ccm.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/ccm.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_cipher.function b/tests/suites/test_suite_cipher.function index 2bc1ef9d4..448bfccc5 100644 --- a/tests/suites/test_suite_cipher.function +++ b/tests/suites/test_suite_cipher.function @@ -1,8 +1,8 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/cipher.h" #if defined(POLARSSL_GCM_C) -#include +#include "polarssl/gcm.h" #endif /* END_HEADER */ diff --git a/tests/suites/test_suite_ctr_drbg.function b/tests/suites/test_suite_ctr_drbg.function index c9cb22ea1..644eb4676 100644 --- a/tests/suites/test_suite_ctr_drbg.function +++ b/tests/suites/test_suite_ctr_drbg.function @@ -1,7 +1,5 @@ /* BEGIN_HEADER */ -#include - -#include +#include "polarssl/ctr_drbg.h" int test_offset_idx; int entropy_func( void *data, unsigned char *buf, size_t len ) diff --git a/tests/suites/test_suite_debug.function b/tests/suites/test_suite_debug.function index b31b72a5c..7db04e5d3 100644 --- a/tests/suites/test_suite_debug.function +++ b/tests/suites/test_suite_debug.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/debug.h" struct buffer_data { diff --git a/tests/suites/test_suite_des.function b/tests/suites/test_suite_des.function index 4b5d53d06..dfa168f22 100644 --- a/tests/suites/test_suite_des.function +++ b/tests/suites/test_suite_des.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/des.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_dhm.function b/tests/suites/test_suite_dhm.function index ba9477f97..d7cabf464 100644 --- a/tests/suites/test_suite_dhm.function +++ b/tests/suites/test_suite_dhm.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/dhm.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_ecdh.function b/tests/suites/test_suite_ecdh.function index c84d2b1f7..27be96918 100644 --- a/tests/suites/test_suite_ecdh.function +++ b/tests/suites/test_suite_ecdh.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/ecdh.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_ecdsa.function b/tests/suites/test_suite_ecdsa.function index 144326bc7..ee379dcf9 100644 --- a/tests/suites/test_suite_ecdsa.function +++ b/tests/suites/test_suite_ecdsa.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/ecdsa.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_ecp.function b/tests/suites/test_suite_ecp.function index 1c22a846d..696c5977e 100644 --- a/tests/suites/test_suite_ecp.function +++ b/tests/suites/test_suite_ecp.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/ecp.h" #define POLARSSL_ECP_PF_UNKNOWN -1 /* END_HEADER */ diff --git a/tests/suites/test_suite_entropy.function b/tests/suites/test_suite_entropy.function index 6d137ad85..c46246c47 100644 --- a/tests/suites/test_suite_entropy.function +++ b/tests/suites/test_suite_entropy.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/entropy.h" /* * Number of calls made to entropy_dummy_source() diff --git a/tests/suites/test_suite_error.function b/tests/suites/test_suite_error.function index 4532530e2..87287b7ab 100644 --- a/tests/suites/test_suite_error.function +++ b/tests/suites/test_suite_error.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/error.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_gcm.function b/tests/suites/test_suite_gcm.function index c30b755ba..2ac76280f 100644 --- a/tests/suites/test_suite_gcm.function +++ b/tests/suites/test_suite_gcm.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/gcm.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_hmac_drbg.function b/tests/suites/test_suite_hmac_drbg.function index d58c426cf..56267e075 100644 --- a/tests/suites/test_suite_hmac_drbg.function +++ b/tests/suites/test_suite_hmac_drbg.function @@ -1,7 +1,5 @@ /* BEGIN_HEADER */ -#include - -#include +#include "polarssl/hmac_drbg.h" typedef struct { diff --git a/tests/suites/test_suite_hmac_shax.function b/tests/suites/test_suite_hmac_shax.function index 54ad02f47..b31d7726c 100644 --- a/tests/suites/test_suite_hmac_shax.function +++ b/tests/suites/test_suite_hmac_shax.function @@ -1,7 +1,7 @@ /* BEGIN_HEADER */ -#include -#include -#include +#include "polarssl/sha1.h" +#include "polarssl/sha256.h" +#include "polarssl/sha512.h" /* END_HEADER */ /* BEGIN_CASE depends_on:POLARSSL_SHA1_C */ diff --git a/tests/suites/test_suite_md.function b/tests/suites/test_suite_md.function index ea927260d..40eb7177e 100644 --- a/tests/suites/test_suite_md.function +++ b/tests/suites/test_suite_md.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/md.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_mdx.function b/tests/suites/test_suite_mdx.function index ecc1b9218..6e4c6d834 100644 --- a/tests/suites/test_suite_mdx.function +++ b/tests/suites/test_suite_mdx.function @@ -1,8 +1,8 @@ /* BEGIN_HEADER */ -#include -#include -#include -#include +#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 */ diff --git a/tests/suites/test_suite_memory_buffer_alloc.function b/tests/suites/test_suite_memory_buffer_alloc.function index 88c36abc5..e9cd0217f 100644 --- a/tests/suites/test_suite_memory_buffer_alloc.function +++ b/tests/suites/test_suite_memory_buffer_alloc.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/memory_buffer_alloc.h" #define TEST_SUITE_MEMORY_BUFFER_ALLOC /* END_HEADER */ diff --git a/tests/suites/test_suite_mpi.function b/tests/suites/test_suite_mpi.function index 2835acb11..795d2a022 100644 --- a/tests/suites/test_suite_mpi.function +++ b/tests/suites/test_suite_mpi.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/bignum.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_pbkdf2.function b/tests/suites/test_suite_pbkdf2.function index cbac80ed6..f99cb6d1b 100644 --- a/tests/suites/test_suite_pbkdf2.function +++ b/tests/suites/test_suite_pbkdf2.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/pbkdf2.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_pem.function b/tests/suites/test_suite_pem.function index e8b05eb34..f8aab47c1 100644 --- a/tests/suites/test_suite_pem.function +++ b/tests/suites/test_suite_pem.function @@ -1,6 +1,6 @@ /* BEGIN_HEADER */ -#include -#include +#include "polarssl/base64.h" +#include "polarssl/pem.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_pk.function b/tests/suites/test_suite_pk.function index fb86c99f7..cc378c499 100644 --- a/tests/suites/test_suite_pk.function +++ b/tests/suites/test_suite_pk.function @@ -1,9 +1,9 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/pk.h" /* For error codes */ -#include -#include +#include "polarssl/ecp.h" +#include "polarssl/rsa.h" static int rnd_std_rand( void *rng_state, unsigned char *output, size_t len ); diff --git a/tests/suites/test_suite_pkcs1_v21.function b/tests/suites/test_suite_pkcs1_v21.function index 24b200e66..6fbe2e1d3 100644 --- a/tests/suites/test_suite_pkcs1_v21.function +++ b/tests/suites/test_suite_pkcs1_v21.function @@ -1,6 +1,6 @@ /* BEGIN_HEADER */ -#include -#include +#include "polarssl/rsa.h" +#include "polarssl/md.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_pkcs5.function b/tests/suites/test_suite_pkcs5.function index 1f61db68b..f7165f6e1 100644 --- a/tests/suites/test_suite_pkcs5.function +++ b/tests/suites/test_suite_pkcs5.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/pkcs5.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_pkparse.function b/tests/suites/test_suite_pkparse.function index c07432682..9479cd993 100644 --- a/tests/suites/test_suite_pkparse.function +++ b/tests/suites/test_suite_pkparse.function @@ -1,7 +1,7 @@ /* BEGIN_HEADER */ -#include -#include -#include +#include "polarssl/pk.h" +#include "polarssl/pem.h" +#include "polarssl/oid.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_pkwrite.function b/tests/suites/test_suite_pkwrite.function index b6cb943f0..8b5fafbc0 100644 --- a/tests/suites/test_suite_pkwrite.function +++ b/tests/suites/test_suite_pkwrite.function @@ -1,7 +1,7 @@ /* BEGIN_HEADER */ -#include -#include -#include +#include "polarssl/pk.h" +#include "polarssl/pem.h" +#include "polarssl/oid.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_rsa.function b/tests/suites/test_suite_rsa.function index bafacac9d..45d572330 100644 --- a/tests/suites/test_suite_rsa.function +++ b/tests/suites/test_suite_rsa.function @@ -1,13 +1,13 @@ /* BEGIN_HEADER */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#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 diff --git a/tests/suites/test_suite_shax.function b/tests/suites/test_suite_shax.function index 73190dcb1..51c330114 100644 --- a/tests/suites/test_suite_shax.function +++ b/tests/suites/test_suite_shax.function @@ -1,7 +1,7 @@ /* BEGIN_HEADER */ -#include -#include -#include +#include "polarssl/sha1.h" +#include "polarssl/sha256.h" +#include "polarssl/sha512.h" /* END_HEADER */ /* BEGIN_CASE depends_on:POLARSSL_SHA1_C */ diff --git a/tests/suites/test_suite_version.function b/tests/suites/test_suite_version.function index 72c3ab1c5..f50a6c29b 100644 --- a/tests/suites/test_suite_version.function +++ b/tests/suites/test_suite_version.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/version.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function index 4329dccfe..50de457b0 100644 --- a/tests/suites/test_suite_x509parse.function +++ b/tests/suites/test_suite_x509parse.function @@ -1,10 +1,10 @@ /* BEGIN_HEADER */ -#include -#include -#include -#include -#include -#include +#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 ) { diff --git a/tests/suites/test_suite_x509write.function b/tests/suites/test_suite_x509write.function index 701ed0040..63f35a6db 100644 --- a/tests/suites/test_suite_x509write.function +++ b/tests/suites/test_suite_x509write.function @@ -1,8 +1,8 @@ /* BEGIN_HEADER */ -#include -#include -#include -#include +#include "polarssl/x509_crt.h" +#include "polarssl/x509_csr.h" +#include "polarssl/pem.h" +#include "polarssl/oid.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES diff --git a/tests/suites/test_suite_xtea.function b/tests/suites/test_suite_xtea.function index 74ca6787a..d22c7fdc4 100644 --- a/tests/suites/test_suite_xtea.function +++ b/tests/suites/test_suite_xtea.function @@ -1,5 +1,5 @@ /* BEGIN_HEADER */ -#include +#include "polarssl/xtea.h" /* END_HEADER */ /* BEGIN_DEPENDENCIES