mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
This change:
- Avoids the use of up_aesinitialize() entirely, which resolves dependency problems, because this function does not make sure that an actual hardware aes implementation was made available: each SoC is now responsible to ensure the AES hardware is initialized before first use. This applies to lpc43xx, stm32 and sam34.
- Remove definitions of the NEVER used aes_init and aes_update operations. The new AES API will be more suitable.
- Change the unusual naming in stm32 (avoiding possible naming clashes)
- Change the unusual naming in sam34 (avoiding possible naming clashes)
- Add some FAR to pointers and enforce the 80 col limit in stm32 and sam
This commit is contained in:
committed by
Gregory Nutt
parent
08b9b3e230
commit
a7257eff52
@@ -34,11 +34,6 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* TODO: Adapt interfaces so that they are consistent with H/W AES
|
||||
* implemenations. This needs to support up_aesinitialize() and
|
||||
* aes_cypher() per include/nuttx/crypto/crypto.h.
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
+5
-13
@@ -66,20 +66,12 @@
|
||||
|
||||
int up_cryptoinitialize(void)
|
||||
{
|
||||
#if defined(CONFIG_CRYPTO_AES) || defined(CONFIG_CRYPTO_ALGTEST)
|
||||
int res;
|
||||
|
||||
#ifdef CONFIG_CRYPTO_AES
|
||||
res = up_aesinitialize();
|
||||
if (res)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_CRYPTO_ALGTEST
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_CRYPTO_ALGTEST
|
||||
res = crypto_test();
|
||||
if (res)
|
||||
ret = crypto_test();
|
||||
if (ret)
|
||||
{
|
||||
crypterr("ERROR: crypto test failed\n");
|
||||
}
|
||||
@@ -89,7 +81,7 @@ int up_cryptoinitialize(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
return res;
|
||||
return ret;
|
||||
#else
|
||||
return OK;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user