mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-09 11:14:26 +02:00
Merge pull request #8862 from valeriosetti/issue8825
Improve support of mbedtls_psa_get_random in client-only builds
This commit is contained in:
25
tests/src/psa_crypto_stubs.c
Normal file
25
tests/src/psa_crypto_stubs.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/** \file psa_crypto_stubs.c
|
||||
*
|
||||
* \brief Stub functions when MBEDTLS_PSA_CRYPTO_CLIENT is enabled but
|
||||
* MBEDTLS_PSA_CRYPTO_C is disabled.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright The Mbed TLS Contributors
|
||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include <psa/crypto.h>
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(MBEDTLS_PSA_CRYPTO_C)
|
||||
|
||||
psa_status_t psa_generate_random(uint8_t *output,
|
||||
size_t output_size)
|
||||
{
|
||||
(void) output;
|
||||
(void) output_size;
|
||||
|
||||
return PSA_ERROR_COMMUNICATION_FAILURE;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C */
|
||||
Reference in New Issue
Block a user