mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	psa: Add PSA Crypto configuration
Add an option that can enable the exposure of PSA Crypto APIs from libmbedcrypto.
This commit is contained in:
		
							parent
							
								
									30b340a760
								
							
						
					
					
						commit
						484ee33c35
					
				@ -496,6 +496,12 @@
 | 
			
		||||
#error "MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO and MBEDTLS_PLATFORM_STD_NV_SEED_WRITE cannot be defined simultaneously"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(MBEDTLS_PSA_CRYPTO_C) &&            \
 | 
			
		||||
    !( defined(MBEDTLS_CTR_DRBG_C) &&           \
 | 
			
		||||
       defined(MBEDTLS_ENTROPY_C) )
 | 
			
		||||
#error "MBEDTLS_PSA_CRYPTO_C defined, but not all prerequisites"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) ||         \
 | 
			
		||||
    !defined(MBEDTLS_OID_C) )
 | 
			
		||||
#error "MBEDTLS_RSA_C defined, but not all prerequisites"
 | 
			
		||||
 | 
			
		||||
@ -2590,6 +2590,25 @@
 | 
			
		||||
 */
 | 
			
		||||
#define MBEDTLS_POLY1305_C
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \def MBEDTLS_PSA_CRYPTO_C
 | 
			
		||||
 *
 | 
			
		||||
 * Enable the Platform Security Architecture cryptography API.
 | 
			
		||||
 *
 | 
			
		||||
 * \note This option only has an effect when the build option
 | 
			
		||||
 * USE_CRYPTO_SUBMODULE is also in use.
 | 
			
		||||
 *
 | 
			
		||||
 * \warning This feature is experimental and available on an opt-in basis only.
 | 
			
		||||
 * PSA APIs are subject to change at any time. The implementation comes with
 | 
			
		||||
 * less assurance and support than the rest of Mbed TLS.
 | 
			
		||||
 *
 | 
			
		||||
 * Module:  crypto/library/psa_crypto.c
 | 
			
		||||
 *
 | 
			
		||||
 * Requires: MBEDTLS_CTR_DRBG_C, MBEDTLS_ENTROPY_C
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
//#define MBEDTLS_PSA_CRYPTO_C
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \def MBEDTLS_RIPEMD160_C
 | 
			
		||||
 *
 | 
			
		||||
 | 
			
		||||
@ -681,6 +681,9 @@ static const char *features[] = {
 | 
			
		||||
#if defined(MBEDTLS_POLY1305_C)
 | 
			
		||||
    "MBEDTLS_POLY1305_C",
 | 
			
		||||
#endif /* MBEDTLS_POLY1305_C */
 | 
			
		||||
#if defined(MBEDTLS_PSA_CRYPTO_C)
 | 
			
		||||
    "MBEDTLS_PSA_CRYPTO_C",
 | 
			
		||||
#endif /* MBEDTLS_PSA_CRYPTO_C */
 | 
			
		||||
#if defined(MBEDTLS_RIPEMD160_C)
 | 
			
		||||
    "MBEDTLS_RIPEMD160_C",
 | 
			
		||||
#endif /* MBEDTLS_RIPEMD160_C */
 | 
			
		||||
 | 
			
		||||
@ -28,6 +28,7 @@
 | 
			
		||||
#   MBEDTLS_ECP_DP_M511_ENABLED
 | 
			
		||||
#   MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
 | 
			
		||||
#   MBEDTLS_NO_PLATFORM_ENTROPY
 | 
			
		||||
#   MBEDTLS_PSA_CRYPTO_C
 | 
			
		||||
#   MBEDTLS_REMOVE_ARC4_CIPHERSUITES
 | 
			
		||||
#   MBEDTLS_SSL_HW_RECORD_ACCEL
 | 
			
		||||
#   MBEDTLS_RSA_NO_CRT
 | 
			
		||||
@ -87,6 +88,7 @@ MBEDTLS_ECP_DP_M383_ENABLED
 | 
			
		||||
MBEDTLS_ECP_DP_M511_ENABLED
 | 
			
		||||
MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
 | 
			
		||||
MBEDTLS_NO_PLATFORM_ENTROPY
 | 
			
		||||
MBEDTLS_PSA_CRYPTO_C
 | 
			
		||||
MBEDTLS_RSA_NO_CRT
 | 
			
		||||
MBEDTLS_REMOVE_ARC4_CIPHERSUITES
 | 
			
		||||
MBEDTLS_SSL_HW_RECORD_ACCEL
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user