mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 16:25:43 +01:00
Remove internal functions from setup API
This commit is contained in:
parent
63e672b09d
commit
3c8a39d28a
@ -289,6 +289,10 @@ int mbedtls_platform_set_nv_seed(
|
|||||||
#endif /* MBEDTLS_ENTROPY_NV_SEED */
|
#endif /* MBEDTLS_ENTROPY_NV_SEED */
|
||||||
|
|
||||||
#if !defined(MBEDTLS_PLATFORM_SETUP_ALT)
|
#if !defined(MBEDTLS_PLATFORM_SETUP_ALT)
|
||||||
|
struct mbedtls_platform_context {
|
||||||
|
char dummy; /**< Placeholder member as empty structs are not portable */
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct mbedtls_platform_context mbedtls_platform_context;
|
typedef struct mbedtls_platform_context mbedtls_platform_context;
|
||||||
#else
|
#else
|
||||||
#include "platform_alt.h"
|
#include "platform_alt.h"
|
||||||
@ -316,23 +320,6 @@ int mbedtls_platform_setup( mbedtls_platform_context *ctx );
|
|||||||
*/
|
*/
|
||||||
void mbedtls_platform_teardown( mbedtls_platform_context *ctx );
|
void mbedtls_platform_teardown( mbedtls_platform_context *ctx );
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Internal function to perform any platform initialisation operations
|
|
||||||
* Only exposed to allow overriding it, see MBEDTLS_PLATFORM_SETUP_ALT
|
|
||||||
*
|
|
||||||
* \param ctx mbed TLS context
|
|
||||||
*
|
|
||||||
* \return 0 if successful
|
|
||||||
*/
|
|
||||||
int mbedtls_internal_platform_setup( mbedtls_platform_context *ctx );
|
|
||||||
/**
|
|
||||||
* \brief Internal function to perform any platform teardown operations
|
|
||||||
* Only exposed to allow overriding it, see MBEDTLS_PLATFORM_SETUP_ALT
|
|
||||||
*
|
|
||||||
* \param ctx mbed TLS context
|
|
||||||
*/
|
|
||||||
void mbedtls_internal_platform_teardown( mbedtls_platform_context *ctx );
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -304,21 +304,11 @@ int mbedtls_platform_set_nv_seed(
|
|||||||
#endif /* MBEDTLS_PLATFORM_NV_SEED_ALT */
|
#endif /* MBEDTLS_PLATFORM_NV_SEED_ALT */
|
||||||
#endif /* MBEDTLS_ENTROPY_NV_SEED */
|
#endif /* MBEDTLS_ENTROPY_NV_SEED */
|
||||||
|
|
||||||
int mbedtls_platform_setup( mbedtls_platform_context *ctx )
|
|
||||||
{
|
|
||||||
return( mbedtls_internal_platform_setup( ctx ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
void mbedtls_platform_teardown( mbedtls_platform_context *ctx )
|
|
||||||
{
|
|
||||||
mbedtls_internal_platform_teardown( ctx );
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !defined(MBEDTLS_PLATFORM_SETUP_ALT)
|
#if !defined(MBEDTLS_PLATFORM_SETUP_ALT)
|
||||||
/*
|
/*
|
||||||
* Placeholder internal platform setup that does nothing by default
|
* Placeholder platform setup that does nothing by default
|
||||||
*/
|
*/
|
||||||
int mbedtls_internal_platform_setup( mbedtls_platform_context *ctx )
|
int mbedtls_platform_setup( mbedtls_platform_context *ctx )
|
||||||
{
|
{
|
||||||
(void)ctx;
|
(void)ctx;
|
||||||
|
|
||||||
@ -326,9 +316,9 @@ int mbedtls_internal_platform_setup( mbedtls_platform_context *ctx )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Placeholder internal platform teardown that does nothing by default
|
* Placeholder platform teardown that does nothing by default
|
||||||
*/
|
*/
|
||||||
void mbedtls_internal_platform_teardown( mbedtls_platform_context *ctx )
|
void mbedtls_platform_teardown( mbedtls_platform_context *ctx )
|
||||||
{
|
{
|
||||||
(void)ctx;
|
(void)ctx;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user