mirror of
				https://github.com/yuzu-emu/mbedtls.git
				synced 2025-11-04 13:54:48 +00:00 
			
		
		
		
	tinyCrypt: Enforce global RNG
tinyCrypt uses a global RNG without context parameter while Mbed TLS in its default configuration uses RNG+CTX bound to the SSL configuration. This commit restricts the use of tinyCrypt to configurations that use a global RNG function with NULL context by setting MBEDTLS_SSL_CONF_RNG in the configuration. This allows to define a wrapper RNG to be used by tinyCrypt which maps to this global hardcoded RNG.
This commit is contained in:
		
							parent
							
								
									621113fd3a
								
							
						
					
					
						commit
						00a9b6df77
					
				| 
						 | 
				
			
			@ -103,6 +103,11 @@
 | 
			
		|||
#error "MBEDTLS_USE_TINYCRYPT defined, but it cannot be defined with MBEDTLS_NO_64BIT_MULTIPLICATION"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(MBEDTLS_USE_TINYCRYPT) && \
 | 
			
		||||
    !defined(MBEDTLS_SSL_CONF_RNG)
 | 
			
		||||
#error "MBEDTLS_USE_TINYCRYPT defined, but not all prerequesites"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(MBEDTLS_NIST_KW_C) && \
 | 
			
		||||
    ( !defined(MBEDTLS_AES_C) || !defined(MBEDTLS_CIPHER_C) )
 | 
			
		||||
#error "MBEDTLS_NIST_KW_C defined, but not all prerequisites"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue