mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-30 00:24:16 +01:00
Add declaration and dummy-definition of mbedtls_cipher_setup_psa()
This commit is contained in:
parent
b1f0872ce6
commit
098c9de2af
@ -413,6 +413,26 @@ void mbedtls_cipher_free( mbedtls_cipher_context_t *ctx );
|
|||||||
int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx,
|
int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx,
|
||||||
const mbedtls_cipher_info_t *cipher_info );
|
const mbedtls_cipher_info_t *cipher_info );
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
|
/**
|
||||||
|
* \brief This function initializes a cipher context for
|
||||||
|
* PSA-based use with the given cipher primitive.
|
||||||
|
*
|
||||||
|
* \note See #MBEDTLS_USE_PSA_CRYPTO for information on PSA.
|
||||||
|
*
|
||||||
|
* \param ctx The context to initialize. May not be \c NULL.
|
||||||
|
* \param cipher_info The cipher to use.
|
||||||
|
*
|
||||||
|
* \return \c 0 on success.
|
||||||
|
* \return #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on
|
||||||
|
* parameter-verification failure.
|
||||||
|
* \return #MBEDTLS_ERR_CIPHER_ALLOC_FAILED if allocation of the
|
||||||
|
* cipher-specific context fails.
|
||||||
|
*/
|
||||||
|
int mbedtls_cipher_setup_psa( mbedtls_cipher_context_t *ctx,
|
||||||
|
const mbedtls_cipher_info_t *cipher_info );
|
||||||
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief This function returns the block size of the given cipher.
|
* \brief This function returns the block size of the given cipher.
|
||||||
*
|
*
|
||||||
|
@ -58,6 +58,10 @@
|
|||||||
#include "mbedtls/cmac.h"
|
#include "mbedtls/cmac.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
|
#include "psa/crypto.h"
|
||||||
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
#if defined(MBEDTLS_PLATFORM_C)
|
#if defined(MBEDTLS_PLATFORM_C)
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
#else
|
#else
|
||||||
@ -204,6 +208,14 @@ int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx,
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
|
int mbedtls_cipher_setup_psa( mbedtls_cipher_context_t *ctx,
|
||||||
|
const mbedtls_cipher_info_t *cipher_info )
|
||||||
|
{
|
||||||
|
return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE );
|
||||||
|
}
|
||||||
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx,
|
int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx,
|
||||||
const unsigned char *key,
|
const unsigned char *key,
|
||||||
int key_bitlen,
|
int key_bitlen,
|
||||||
|
Loading…
Reference in New Issue
Block a user