From 240b092a6c6f802720bc99326d9bb993b0f61d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 11 Apr 2014 17:50:41 +0200 Subject: [PATCH] Drop dummy self_test functions --- include/mbedtls/cipher.h | 7 ------- include/mbedtls/ecdh.h | 7 ------- include/mbedtls/ecdsa.h | 7 ------- library/cipher.c | 15 --------------- library/ecdh.c | 14 -------------- library/ecdsa.c | 13 ------------- tests/suites/test_suite_cipher.function | 7 ------- 7 files changed, 70 deletions(-) diff --git a/include/mbedtls/cipher.h b/include/mbedtls/cipher.h index 977cc97d7..62c7f5bb3 100644 --- a/include/mbedtls/cipher.h +++ b/include/mbedtls/cipher.h @@ -757,13 +757,6 @@ int cipher_auth_decrypt( cipher_context_t *ctx, const unsigned char *tag, size_t tag_len ); #endif /* POLARSSL_CIPHER_MODE_AEAD */ -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int cipher_self_test( int verbose ); - #ifdef __cplusplus } #endif diff --git a/include/mbedtls/ecdh.h b/include/mbedtls/ecdh.h index 60f913d98..b0bbde061 100644 --- a/include/mbedtls/ecdh.h +++ b/include/mbedtls/ecdh.h @@ -208,13 +208,6 @@ int ecdh_calc_secret( ecdh_context *ctx, size_t *olen, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int ecdh_self_test( int verbose ); - #ifdef __cplusplus } #endif diff --git a/include/mbedtls/ecdsa.h b/include/mbedtls/ecdsa.h index 9a04ee65b..b1fd88414 100644 --- a/include/mbedtls/ecdsa.h +++ b/include/mbedtls/ecdsa.h @@ -219,13 +219,6 @@ void ecdsa_init( ecdsa_context *ctx ); */ void ecdsa_free( ecdsa_context *ctx ); -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int ecdsa_self_test( int verbose ); - #ifdef __cplusplus } #endif diff --git a/library/cipher.c b/library/cipher.c index 53348516d..e2d1786b5 100644 --- a/library/cipher.c +++ b/library/cipher.c @@ -897,19 +897,4 @@ int cipher_auth_decrypt( cipher_context_t *ctx, } #endif /* POLARSSL_CIPHER_MODE_AEAD */ - -#if defined(POLARSSL_SELF_TEST) - -/* - * Checkup routine - */ -int cipher_self_test( int verbose ) -{ - ((void) verbose); - - return( 0 ); -} - -#endif /* POLARSSL_SELF_TEST */ - #endif /* POLARSSL_CIPHER_C */ diff --git a/library/ecdh.c b/library/ecdh.c index 5866c44de..d62010881 100644 --- a/library/ecdh.c +++ b/library/ecdh.c @@ -262,18 +262,4 @@ int ecdh_calc_secret( ecdh_context *ctx, size_t *olen, return mpi_write_binary( &ctx->z, buf, *olen ); } - -#if defined(POLARSSL_SELF_TEST) - -/* - * Checkup routine - */ -int ecdh_self_test( int verbose ) -{ - ((void) verbose ); - return( 0 ); -} - -#endif /* POLARSSL_SELF_TEST */ - #endif /* POLARSSL_ECDH_C */ diff --git a/library/ecdsa.c b/library/ecdsa.c index 11cf18a1b..c95f90b81 100644 --- a/library/ecdsa.c +++ b/library/ecdsa.c @@ -486,17 +486,4 @@ void ecdsa_free( ecdsa_context *ctx ) mpi_free( &ctx->s ); } -#if defined(POLARSSL_SELF_TEST) - -/* - * Checkup routine - */ -int ecdsa_self_test( int verbose ) -{ - ((void) verbose ); - return( 0 ); -} - -#endif /* POLARSSL_SELF_TEST */ - #endif /* POLARSSL_ECDSA_C */ diff --git a/tests/suites/test_suite_cipher.function b/tests/suites/test_suite_cipher.function index 471bcef28..76aca1473 100644 --- a/tests/suites/test_suite_cipher.function +++ b/tests/suites/test_suite_cipher.function @@ -667,10 +667,3 @@ void check_padding( int pad_mode, char *input_str, int ret, int dlen_check ) TEST_ASSERT( dlen == (size_t) dlen_check ); } /* END_CASE */ - -/* BEGIN_CASE depends_on:POLARSSL_SELF_TEST */ -void cipher_selftest() -{ - TEST_ASSERT( cipher_self_test( 0 ) == 0 ); -} -/* END_CASE */