Fix missing-prototype errors in tests/suites
Signed-off-by: Michael Schuster <michael@schuster.ms>
diff --git a/tests/src/test_helpers/ssl_helpers.c b/tests/src/test_helpers/ssl_helpers.c
index 16fa38a..21dcdec 100644
--- a/tests/src/test_helpers/ssl_helpers.c
+++ b/tests/src/test_helpers/ssl_helpers.c
@@ -950,7 +950,7 @@
/*
* Write application data. Increase write counter if necessary.
*/
-int mbedtls_ssl_write_fragment(mbedtls_ssl_context *ssl,
+static int mbedtls_ssl_write_fragment(mbedtls_ssl_context *ssl,
unsigned char *buf, int buf_len,
int *written,
const int expected_fragments)
@@ -997,7 +997,7 @@
* Read application data and increase read counter and fragments counter
* if necessary.
*/
-int mbedtls_ssl_read_fragment(mbedtls_ssl_context *ssl,
+static int mbedtls_ssl_read_fragment(mbedtls_ssl_context *ssl,
unsigned char *buf, int buf_len,
int *read, int *fragments,
const int expected_fragments)
diff --git a/tests/suites/host_test.function b/tests/suites/host_test.function
index eb42a07..d28a75e 100644
--- a/tests/suites/host_test.function
+++ b/tests/suites/host_test.function
@@ -8,7 +8,7 @@
*
* \return 0 if success else 1
*/
-int verify_string(char **str)
+static int verify_string(char **str)
{
if ((*str)[0] != '"' ||
(*str)[strlen(*str) - 1] != '"') {
@@ -32,7 +32,7 @@
*
* \return 0 if success else 1
*/
-int verify_int(char *str, intmax_t *p_value)
+static int verify_int(char *str, intmax_t *p_value)
{
char *end = NULL;
errno = 0;
@@ -80,7 +80,7 @@
*
* \return 0 if success else -1
*/
-int get_line(FILE *f, char *buf, size_t len)
+static int get_line(FILE *f, char *buf, size_t len)
{
char *ret;
int i = 0, str_len = 0, has_string = 0;
@@ -485,7 +485,7 @@
*
* \return Program exit status.
*/
-int execute_tests(int argc, const char **argv)
+static int execute_tests(int argc, const char **argv)
{
/* Local Configurations and options */
const char *default_filename = "DATA_FILE";
diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function
index f327a03..c0cc2ac 100644
--- a/tests/suites/main_test.function
+++ b/tests/suites/main_test.function
@@ -69,7 +69,7 @@
*
* \return 0 if exp_id is found. 1 otherwise.
*/
-int get_expression(int32_t exp_id, intmax_t *out_value)
+static int get_expression(int32_t exp_id, intmax_t *out_value)
{
int ret = KEY_VALUE_MAPPING_FOUND;
@@ -100,7 +100,7 @@
*
* \return DEPENDENCY_SUPPORTED if set else DEPENDENCY_NOT_SUPPORTED
*/
-int dep_check(int dep_id)
+static int dep_check(int dep_id)
{
int ret = DEPENDENCY_NOT_SUPPORTED;
@@ -155,7 +155,7 @@
* DISPATCH_TEST_FN_NOT_FOUND if not found
* DISPATCH_UNSUPPORTED_SUITE if not compile time enabled.
*/
-int dispatch_test(size_t func_idx, void **params)
+static int dispatch_test(size_t func_idx, void **params)
{
int ret = DISPATCH_TEST_SUCCESS;
TestWrapper_t fp = NULL;
@@ -193,7 +193,7 @@
* DISPATCH_TEST_FN_NOT_FOUND if not found
* DISPATCH_UNSUPPORTED_SUITE if not compile time enabled.
*/
-int check_test(size_t func_idx)
+static int check_test(size_t func_idx)
{
int ret = DISPATCH_TEST_SUCCESS;
TestWrapper_t fp = NULL;
diff --git a/tests/suites/test_suite_alignment.function b/tests/suites/test_suite_alignment.function
index 842101f..240f552 100644
--- a/tests/suites/test_suite_alignment.function
+++ b/tests/suites/test_suite_alignment.function
@@ -10,7 +10,7 @@
/*
* Convert a string of the form "abcd" (case-insensitive) to a uint64_t.
*/
-int parse_hex_string(char *hex_string, uint64_t *result)
+static int parse_hex_string(char *hex_string, uint64_t *result)
{
uint8_t raw[8] = { 0 };
size_t olen;
diff --git a/tests/suites/test_suite_asn1parse.function b/tests/suites/test_suite_asn1parse.function
index 01a091b..394d08a 100644
--- a/tests/suites/test_suite_asn1parse.function
+++ b/tests/suites/test_suite_asn1parse.function
@@ -122,7 +122,7 @@
return ERR_PARSE_INCONSISTENCY;
}
-int get_len_step(const data_t *input, size_t buffer_size,
+static int get_len_step(const data_t *input, size_t buffer_size,
size_t actual_length)
{
unsigned char *buf = NULL;
diff --git a/tests/suites/test_suite_asn1write.function b/tests/suites/test_suite_asn1write.function
index 469b971..d332485 100644
--- a/tests/suites/test_suite_asn1write.function
+++ b/tests/suites/test_suite_asn1write.function
@@ -12,7 +12,7 @@
size_t size;
} generic_write_data_t;
-int generic_write_start_step(generic_write_data_t *data)
+static int generic_write_start_step(generic_write_data_t *data)
{
mbedtls_test_set_step(data->size);
mbedtls_free(data->output);
@@ -26,7 +26,7 @@
return 0;
}
-int generic_write_finish_step(generic_write_data_t *data,
+static int generic_write_finish_step(generic_write_data_t *data,
const data_t *expected, int ret)
{
int ok = 0;
diff --git a/tests/suites/test_suite_bignum.function b/tests/suites/test_suite_bignum.function
index f3a64e1..22a637a 100644
--- a/tests/suites/test_suite_bignum.function
+++ b/tests/suites/test_suite_bignum.function
@@ -44,7 +44,7 @@
* test) are stored in the data member of the state structure. Each number is in
* the format that mbedtls_mpi_read_string understands and is chunk_len long.
*/
-int mbedtls_test_mpi_miller_rabin_determinizer(void *state,
+static int mbedtls_test_mpi_miller_rabin_determinizer(void *state,
unsigned char *buf,
size_t len)
{
diff --git a/tests/suites/test_suite_cipher.function b/tests/suites/test_suite_cipher.function
index 8e49d2d..040c35c 100644
--- a/tests/suites/test_suite_cipher.function
+++ b/tests/suites/test_suite_cipher.function
@@ -129,7 +129,7 @@
* return 1 if it is,
* 0 if it isn't.
*/
-int buffer_is_all_zero(const uint8_t *buf, size_t size)
+static int buffer_is_all_zero(const uint8_t *buf, size_t size)
{
for (size_t i = 0; i < size; i++) {
if (buf[i] != 0) {
diff --git a/tests/suites/test_suite_common.function b/tests/suites/test_suite_common.function
index 5c5700c..c508b11 100644
--- a/tests/suites/test_suite_common.function
+++ b/tests/suites/test_suite_common.function
@@ -1,7 +1,7 @@
/* BEGIN_HEADER */
#include "common.h"
-void fill_arrays(unsigned char *a, unsigned char *b, unsigned char *r1, unsigned char *r2, size_t n)
+static void fill_arrays(unsigned char *a, unsigned char *b, unsigned char *r1, unsigned char *r2, size_t n)
{
for (size_t i = 0; i < n; i++) {
a[i] = (unsigned char) i * 3;
diff --git a/tests/suites/test_suite_ctr_drbg.function b/tests/suites/test_suite_ctr_drbg.function
index 720eb3e..9fa55a7 100644
--- a/tests/suites/test_suite_ctr_drbg.function
+++ b/tests/suites/test_suite_ctr_drbg.function
@@ -96,6 +96,7 @@
}
static const int thread_random_reps = 10;
+void *thread_random_function(void *ctx); /* only used conditionally in ctr_drbg_threads */
void *thread_random_function(void *ctx)
{
unsigned char out[16];
diff --git a/tests/suites/test_suite_debug.function b/tests/suites/test_suite_debug.function
index 70e7bad..878ceed 100644
--- a/tests/suites/test_suite_debug.function
+++ b/tests/suites/test_suite_debug.function
@@ -9,7 +9,7 @@
char *ptr;
};
-void string_debug(void *data, int level, const char *file, int line, const char *str)
+static void string_debug(void *data, int level, const char *file, int line, const char *str)
{
struct buffer_data *buffer = (struct buffer_data *) data;
char *p = buffer->ptr;
diff --git a/tests/suites/test_suite_dhm.function b/tests/suites/test_suite_dhm.function
index 2090594..a7b4b40 100644
--- a/tests/suites/test_suite_dhm.function
+++ b/tests/suites/test_suite_dhm.function
@@ -1,7 +1,7 @@
/* BEGIN_HEADER */
#include "mbedtls/dhm.h"
-int check_get_value(const mbedtls_dhm_context *ctx,
+static int check_get_value(const mbedtls_dhm_context *ctx,
mbedtls_dhm_parameter param,
const mbedtls_mpi *expected)
{
diff --git a/tests/suites/test_suite_entropy.function b/tests/suites/test_suite_entropy.function
index 5ac65fc..c89c26c 100644
--- a/tests/suites/test_suite_entropy.function
+++ b/tests/suites/test_suite_entropy.function
@@ -65,7 +65,7 @@
*/
static unsigned char buffer_seed[MBEDTLS_ENTROPY_BLOCK_SIZE];
-int buffer_nv_seed_read(unsigned char *buf, size_t buf_len)
+static int buffer_nv_seed_read(unsigned char *buf, size_t buf_len)
{
if (buf_len != MBEDTLS_ENTROPY_BLOCK_SIZE) {
return -1;
@@ -75,7 +75,7 @@
return 0;
}
-int buffer_nv_seed_write(unsigned char *buf, size_t buf_len)
+static int buffer_nv_seed_write(unsigned char *buf, size_t buf_len)
{
if (buf_len != MBEDTLS_ENTROPY_BLOCK_SIZE) {
return -1;
@@ -111,7 +111,7 @@
return 0;
}
-int read_nv_seed(unsigned char *buf, size_t buf_len)
+static int read_nv_seed(unsigned char *buf, size_t buf_len)
{
FILE *f;
diff --git a/tests/suites/test_suite_lmots.function b/tests/suites/test_suite_lmots.function
index 293287a..61f2e28 100644
--- a/tests/suites/test_suite_lmots.function
+++ b/tests/suites/test_suite_lmots.function
@@ -3,7 +3,7 @@
#include "mbedtls/lms.h"
#if defined(MBEDTLS_TEST_HOOKS)
-int check_lmots_private_key_for_leak(unsigned char *sig)
+static int check_lmots_private_key_for_leak(unsigned char *sig)
{
size_t idx;
diff --git a/tests/suites/test_suite_pk.function b/tests/suites/test_suite_pk.function
index 38c27e3..c102f93 100644
--- a/tests/suites/test_suite_pk.function
+++ b/tests/suites/test_suite_pk.function
@@ -221,7 +221,7 @@
}
#if defined(MBEDTLS_PSA_CRYPTO_C)
-psa_status_t pk_psa_import_key(const unsigned char *key_data, size_t key_len,
+static psa_status_t pk_psa_import_key(const unsigned char *key_data, size_t key_len,
psa_key_type_t type, psa_key_usage_t usage,
psa_algorithm_t alg, mbedtls_svc_key_id_t *key)
{
@@ -320,7 +320,7 @@
* for volatile keys.
* \param[out] key Identifier of the "generated" (actually imported) PSA key.
*/
-psa_status_t pk_psa_setup(psa_key_type_t type, size_t bits,
+static psa_status_t pk_psa_setup(psa_key_type_t type, size_t bits,
psa_key_usage_t usage, psa_algorithm_t alg,
psa_algorithm_t enrollment_alg,
mbedtls_svc_key_id_t persistent_key_id,
@@ -468,7 +468,7 @@
#endif /* MBEDTLS_PSA_CRYPTO_C */
#if defined(MBEDTLS_RSA_C)
-int mbedtls_rsa_decrypt_func(void *ctx, size_t *olen,
+static int mbedtls_rsa_decrypt_func(void *ctx, size_t *olen,
const unsigned char *input, unsigned char *output,
size_t output_max_len)
{
@@ -476,7 +476,7 @@
mbedtls_test_rnd_std_rand, NULL,
olen, input, output, output_max_len);
}
-int mbedtls_rsa_sign_func(void *ctx,
+static int mbedtls_rsa_sign_func(void *ctx,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
mbedtls_md_type_t md_alg, unsigned int hashlen,
const unsigned char *hash, unsigned char *sig)
@@ -487,7 +487,7 @@
mbedtls_test_rnd_std_rand, NULL,
md_alg, hashlen, hash, sig);
}
-size_t mbedtls_rsa_key_len_func(void *ctx)
+static size_t mbedtls_rsa_key_len_func(void *ctx)
{
return ((const mbedtls_rsa_context *) ctx)->len;
}
@@ -618,7 +618,7 @@
/* Create a copy of a PSA key with same usage and algorithm policy and destroy
* the original one. */
-mbedtls_svc_key_id_t psa_copy_and_destroy(mbedtls_svc_key_id_t orig_key_id)
+static mbedtls_svc_key_id_t psa_copy_and_destroy(mbedtls_svc_key_id_t orig_key_id)
{
psa_key_attributes_t orig_attr = PSA_KEY_ATTRIBUTES_INIT;
psa_key_attributes_t new_attr = PSA_KEY_ATTRIBUTES_INIT;
diff --git a/tests/suites/test_suite_pkcs7.function b/tests/suites/test_suite_pkcs7.function
index 4c8bf23..e5dc4bd 100644
--- a/tests/suites/test_suite_pkcs7.function
+++ b/tests/suites/test_suite_pkcs7.function
@@ -17,7 +17,7 @@
* END_DEPENDENCIES
*/
/* BEGIN_SUITE_HELPERS */
-int pkcs7_parse_buffer(unsigned char *pkcs7_buf, int buflen)
+static int pkcs7_parse_buffer(unsigned char *pkcs7_buf, int buflen)
{
int res;
mbedtls_pkcs7 pkcs7;
diff --git a/tests/suites/test_suite_platform.function b/tests/suites/test_suite_platform.function
index c65d011..5d49e52 100644
--- a/tests/suites/test_suite_platform.function
+++ b/tests/suites/test_suite_platform.function
@@ -18,7 +18,7 @@
#else
#include <unistd.h>
#endif
-void sleep_ms(int milliseconds)
+static void sleep_ms(int milliseconds)
{
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \
defined(__MINGW32__) || defined(_WIN64)
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index 85b2fd7..144c2e5 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -153,7 +153,7 @@
}
#endif /* MBEDTLS_ASN1_WRITE_C */
-int exercise_mac_setup(psa_key_type_t key_type,
+static int exercise_mac_setup(psa_key_type_t key_type,
const unsigned char *key_bytes,
size_t key_length,
psa_algorithm_t alg,
@@ -185,7 +185,7 @@
return 0;
}
-int exercise_cipher_setup(psa_key_type_t key_type,
+static int exercise_cipher_setup(psa_key_type_t key_type,
const unsigned char *key_bytes,
size_t key_length,
psa_algorithm_t alg,
@@ -1332,7 +1332,7 @@
/* Attempt to import the key in ctx. This handles any valid error codes
* and reports an error for any invalid codes. This function also insures
* that once imported by some thread, all threads can use the key. */
-void *thread_import_key(void *ctx)
+static void *thread_import_key(void *ctx)
{
mbedtls_svc_key_id_t returned_key_id;
same_key_context *skc = (struct same_key_context *) ctx;
@@ -1406,7 +1406,7 @@
return NULL;
}
-void *thread_use_and_destroy_key(void *ctx)
+static void *thread_use_and_destroy_key(void *ctx)
{
same_key_context *skc = (struct same_key_context *) ctx;
@@ -1446,7 +1446,7 @@
int reps;
}
generate_key_context;
-void *thread_generate_key(void *ctx)
+static void *thread_generate_key(void *ctx)
{
mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT;
psa_key_attributes_t got_attributes = PSA_KEY_ATTRIBUTES_INIT;
diff --git a/tests/suites/test_suite_psa_crypto_metadata.function b/tests/suites/test_suite_psa_crypto_metadata.function
index b51f2a2..d299794 100644
--- a/tests/suites/test_suite_psa_crypto_metadata.function
+++ b/tests/suites/test_suite_psa_crypto_metadata.function
@@ -106,7 +106,7 @@
* The expected parity is even so that 0 is considered a valid encoding.
*
* Return a nonzero value if value has even parity and 0 otherwise. */
-int has_even_parity(uint32_t value)
+static int has_even_parity(uint32_t value)
{
value ^= value >> 16;
value ^= value >> 8;
@@ -116,7 +116,7 @@
#define TEST_PARITY(value) \
TEST_ASSERT(has_even_parity(value))
-void algorithm_classification(psa_algorithm_t alg, unsigned flags)
+static void algorithm_classification(psa_algorithm_t alg, unsigned flags)
{
unsigned classification_flags_tested = 0;
TEST_CLASSIFICATION_MACRO(1, ALG_IS_VENDOR_DEFINED, alg, flags);
@@ -155,7 +155,7 @@
exit:;
}
-void key_type_classification(psa_key_type_t type, unsigned flags)
+static void key_type_classification(psa_key_type_t type, unsigned flags)
{
unsigned classification_flags_tested = 0;
@@ -192,7 +192,7 @@
exit:;
}
-void mac_algorithm_core(psa_algorithm_t alg, int classification_flags,
+static void mac_algorithm_core(psa_algorithm_t alg, int classification_flags,
psa_key_type_t key_type, size_t key_bits,
size_t length)
{
@@ -218,7 +218,7 @@
exit:;
}
-void aead_algorithm_core(psa_algorithm_t alg, int classification_flags,
+static void aead_algorithm_core(psa_algorithm_t alg, int classification_flags,
psa_key_type_t key_type, size_t key_bits,
size_t tag_length)
{
diff --git a/tests/suites/test_suite_psa_crypto_se_driver_hal.function b/tests/suites/test_suite_psa_crypto_se_driver_hal.function
index 37a72d9..96be55b 100644
--- a/tests/suites/test_suite_psa_crypto_se_driver_hal.function
+++ b/tests/suites/test_suite_psa_crypto_se_driver_hal.function
@@ -599,7 +599,7 @@
* If this changes, the storage format version must change.
* See psa_get_se_driver_its_file_uid() in psa_crypto_se.c.
*/
-psa_storage_uid_t file_uid_for_location(psa_key_location_t location)
+static psa_storage_uid_t file_uid_for_location(psa_key_location_t location)
{
if (location > PSA_MAX_SE_LOCATION) {
return 0;
diff --git a/tests/suites/test_suite_psa_crypto_se_driver_hal_mocks.function b/tests/suites/test_suite_psa_crypto_se_driver_hal_mocks.function
index b6d3a34..9480bd4 100644
--- a/tests/suites/test_suite_psa_crypto_se_driver_hal_mocks.function
+++ b/tests/suites/test_suite_psa_crypto_se_driver_hal_mocks.function
@@ -162,7 +162,7 @@
return mock_import_data.return_value;
}
-psa_status_t mock_export(psa_drv_se_context_t *context,
+static psa_status_t mock_export(psa_drv_se_context_t *context,
psa_key_slot_number_t slot_number,
uint8_t *p_data,
size_t data_size,
@@ -179,7 +179,7 @@
return mock_export_data.return_value;
}
-psa_status_t mock_export_public(psa_drv_se_context_t *context,
+static psa_status_t mock_export_public(psa_drv_se_context_t *context,
psa_key_slot_number_t slot_number,
uint8_t *p_data,
size_t data_size,
@@ -196,7 +196,7 @@
return mock_export_public_data.return_value;
}
-psa_status_t mock_sign(psa_drv_se_context_t *context,
+static psa_status_t mock_sign(psa_drv_se_context_t *context,
psa_key_slot_number_t key_slot,
psa_algorithm_t alg,
const uint8_t *p_hash,
@@ -219,7 +219,7 @@
return mock_sign_data.return_value;
}
-psa_status_t mock_verify(psa_drv_se_context_t *context,
+static psa_status_t mock_verify(psa_drv_se_context_t *context,
psa_key_slot_number_t key_slot,
psa_algorithm_t alg,
const uint8_t *p_hash,
@@ -240,7 +240,7 @@
return mock_verify_data.return_value;
}
-psa_status_t mock_allocate(psa_drv_se_context_t *drv_context,
+static psa_status_t mock_allocate(psa_drv_se_context_t *drv_context,
void *persistent_data,
const psa_key_attributes_t *attributes,
psa_key_creation_method_t method,
@@ -258,7 +258,7 @@
return mock_allocate_data.return_value;
}
-psa_status_t mock_destroy(psa_drv_se_context_t *context,
+static psa_status_t mock_destroy(psa_drv_se_context_t *context,
void *persistent_data,
psa_key_slot_number_t slot_number)
{
diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function
index ba71c8f..e72a6e3 100644
--- a/tests/suites/test_suite_x509parse.function
+++ b/tests/suites/test_suite_x509parse.function
@@ -60,7 +60,7 @@
1024,
};
-int verify_none(void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags)
+static int verify_none(void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags)
{
((void) data);
((void) crt);
@@ -70,7 +70,7 @@
return 0;
}
-int verify_all(void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags)
+static int verify_all(void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags)
{
((void) data);
((void) crt);
@@ -81,7 +81,7 @@
}
#if defined(MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK)
-int ca_callback_fail(void *data, mbedtls_x509_crt const *child, mbedtls_x509_crt **candidates)
+static int ca_callback_fail(void *data, mbedtls_x509_crt const *child, mbedtls_x509_crt **candidates)
{
((void) data);
((void) child);
@@ -90,7 +90,7 @@
return -1;
}
#if defined(MBEDTLS_X509_CRT_PARSE_C)
-int ca_callback(void *data, mbedtls_x509_crt const *child,
+static int ca_callback(void *data, mbedtls_x509_crt const *child,
mbedtls_x509_crt **candidates)
{
int ret = 0;
@@ -141,7 +141,7 @@
#endif /* MBEDTLS_X509_CRT_PARSE_C */
#endif /* MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK */
-int verify_fatal(void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags)
+static int verify_fatal(void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags)
{
int *levels = (int *) data;
@@ -158,7 +158,7 @@
}
/* strsep() not available on Windows */
-char *mystrsep(char **stringp, const char *delim)
+static char *mystrsep(char **stringp, const char *delim)
{
const char *p;
char *ret = *stringp;
@@ -192,13 +192,13 @@
char *p;
} verify_print_context;
-void verify_print_init(verify_print_context *ctx)
+static void verify_print_init(verify_print_context *ctx)
{
memset(ctx, 0, sizeof(verify_print_context));
ctx->p = ctx->buf;
}
-int verify_print(void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags)
+static int verify_print(void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags)
{
int ret;
verify_print_context *ctx = (verify_print_context *) data;
@@ -226,7 +226,7 @@
return 0;
}
-int verify_parse_san(mbedtls_x509_subject_alternative_name *san,
+static int verify_parse_san(mbedtls_x509_subject_alternative_name *san,
char **buf, size_t *size)
{
int ret;
@@ -317,7 +317,7 @@
return 0;
}
-int parse_crt_ext_cb(void *p_ctx, mbedtls_x509_crt const *crt, mbedtls_x509_buf const *oid,
+static int parse_crt_ext_cb(void *p_ctx, mbedtls_x509_crt const *crt, mbedtls_x509_buf const *oid,
int critical, const unsigned char *cp, const unsigned char *end)
{
(void) crt;
@@ -417,7 +417,7 @@
#endif /* MBEDTLS_X509_CRT_PARSE_C */
#if defined(MBEDTLS_X509_CSR_PARSE_C)
-int parse_csr_ext_accept_cb(void *p_ctx, mbedtls_x509_csr const *csr, mbedtls_x509_buf const *oid,
+static int parse_csr_ext_accept_cb(void *p_ctx, mbedtls_x509_csr const *csr, mbedtls_x509_buf const *oid,
int critical, const unsigned char *cp, const unsigned char *end)
{
(void) p_ctx;
@@ -430,7 +430,7 @@
return 0;
}
-int parse_csr_ext_reject_cb(void *p_ctx, mbedtls_x509_csr const *csr, mbedtls_x509_buf const *oid,
+static int parse_csr_ext_reject_cb(void *p_ctx, mbedtls_x509_csr const *csr, mbedtls_x509_buf const *oid,
int critical, const unsigned char *cp, const unsigned char *end)
{
(void) p_ctx;
diff --git a/tests/suites/test_suite_x509write.function b/tests/suites/test_suite_x509write.function
index 1db7e1c..820b48d 100644
--- a/tests/suites/test_suite_x509write.function
+++ b/tests/suites/test_suite_x509write.function
@@ -11,14 +11,14 @@
#include "mbedtls/psa_util.h"
#if defined(MBEDTLS_RSA_C)
-int mbedtls_rsa_decrypt_func(void *ctx, size_t *olen,
+static int mbedtls_rsa_decrypt_func(void *ctx, size_t *olen,
const unsigned char *input, unsigned char *output,
size_t output_max_len)
{
return mbedtls_rsa_pkcs1_decrypt((mbedtls_rsa_context *) ctx, NULL, NULL,
olen, input, output, output_max_len);
}
-int mbedtls_rsa_sign_func(void *ctx,
+static int mbedtls_rsa_sign_func(void *ctx,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
mbedtls_md_type_t md_alg, unsigned int hashlen,
const unsigned char *hash, unsigned char *sig)
@@ -26,7 +26,7 @@
return mbedtls_rsa_pkcs1_sign((mbedtls_rsa_context *) ctx, f_rng, p_rng,
md_alg, hashlen, hash, sig);
}
-size_t mbedtls_rsa_key_len_func(void *ctx)
+static size_t mbedtls_rsa_key_len_func(void *ctx)
{
return ((const mbedtls_rsa_context *) ctx)->len;
}