Revert "Change some examples to use new PSA crypto config"

This reverts commit 4192e9a90c210005f6b558ec51c6a694c902b51d.

Converting conditional compliation for PSA configuration will come
later.

Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
David Brown 2021-02-09 16:27:19 -07:00
parent 86730a8d50
commit 9f3e7749d9
2 changed files with 6 additions and 6 deletions

View file

@ -43,13 +43,13 @@
} \ } \
} while ( 0 ) } while ( 0 )
#if !defined(MBEDTLS_PSA_CRYPTO_C) || !defined(PSA_WANT_KEY_TYPE_AES) || \ #if !defined(MBEDTLS_PSA_CRYPTO_C) || !defined(MBEDTLS_AES_C) || \
!defined(MBEDTLS_CIPHER_MODE_CBC) || !defined(MBEDTLS_CIPHER_MODE_CTR) || \ !defined(MBEDTLS_CIPHER_MODE_CBC) || !defined(MBEDTLS_CIPHER_MODE_CTR) || \
!defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) || \ !defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) || \
defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER) defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
int main( void ) int main( void )
{ {
printf( "MBEDTLS_PSA_CRYPTO_C and/or PSA_WANT_KEY_TYPE_AES and/or " printf( "MBEDTLS_PSA_CRYPTO_C and/or MBEDTLS_AES_C and/or "
"MBEDTLS_CIPHER_MODE_CBC and/or MBEDTLS_CIPHER_MODE_CTR " "MBEDTLS_CIPHER_MODE_CBC and/or MBEDTLS_CIPHER_MODE_CTR "
"and/or MBEDTLS_CIPHER_MODE_WITH_PADDING " "and/or MBEDTLS_CIPHER_MODE_WITH_PADDING "
"not defined and/or MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER" "not defined and/or MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER"
@ -327,5 +327,5 @@ exit:
mbedtls_psa_crypto_free( ); mbedtls_psa_crypto_free( );
return( 0 ); return( 0 );
} }
#endif /* MBEDTLS_PSA_CRYPTO_C && PSA_WANT_KEY_TYPE_AES && MBEDTLS_CIPHER_MODE_CBC && #endif /* MBEDTLS_PSA_CRYPTO_C && MBEDTLS_AES_C && MBEDTLS_CIPHER_MODE_CBC &&
MBEDTLS_CIPHER_MODE_CTR && MBEDTLS_CIPHER_MODE_WITH_PADDING */ MBEDTLS_CIPHER_MODE_CTR && MBEDTLS_CIPHER_MODE_WITH_PADDING */

View file

@ -66,13 +66,13 @@
/* If the build options we need are not enabled, compile a placeholder. */ /* If the build options we need are not enabled, compile a placeholder. */
#if !defined(MBEDTLS_SHA256_C) || !defined(MBEDTLS_MD_C) || \ #if !defined(MBEDTLS_SHA256_C) || !defined(MBEDTLS_MD_C) || \
!defined(PSA_WANT_KEY_TYPE_AES) || !defined(MBEDTLS_CCM_C) || \ !defined(MBEDTLS_AES_C) || !defined(MBEDTLS_CCM_C) || \
!defined(MBEDTLS_PSA_CRYPTO_C) || !defined(MBEDTLS_FS_IO) || \ !defined(MBEDTLS_PSA_CRYPTO_C) || !defined(MBEDTLS_FS_IO) || \
defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER) defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
int main( void ) int main( void )
{ {
printf( "MBEDTLS_SHA256_C and/or MBEDTLS_MD_C and/or " printf( "MBEDTLS_SHA256_C and/or MBEDTLS_MD_C and/or "
"PSA_WANT_KEY_TYPE_AES and/or MBEDTLS_CCM_C and/or " "MBEDTLS_AES_C and/or MBEDTLS_CCM_C and/or "
"MBEDTLS_PSA_CRYPTO_C and/or MBEDTLS_FS_IO " "MBEDTLS_PSA_CRYPTO_C and/or MBEDTLS_FS_IO "
"not defined and/or MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER " "not defined and/or MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER "
"defined.\n" ); "defined.\n" );
@ -695,4 +695,4 @@ usage_failure:
usage( ); usage( );
return( EXIT_FAILURE ); return( EXIT_FAILURE );
} }
#endif /* MBEDTLS_SHA256_C && MBEDTLS_MD_C && PSA_WANT_KEY_TYPE_AES && MBEDTLS_CCM_C && MBEDTLS_PSA_CRYPTO_C && MBEDTLS_FS_IO */ #endif /* MBEDTLS_SHA256_C && MBEDTLS_MD_C && MBEDTLS_AES_C && MBEDTLS_CCM_C && MBEDTLS_PSA_CRYPTO_C && MBEDTLS_FS_IO */