mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Fix typo in test_suite_entropy.function
This commit is contained in:
		
							parent
							
								
									58e9c1833b
								
							
						
					
					
						commit
						2c069dfad3
					
				@ -311,7 +311,6 @@ void entropy_nv_seed( data_t * read_seed )
 | 
				
			|||||||
    unsigned char entropy[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
					    unsigned char entropy[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
				
			||||||
    unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
					    unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
				
			||||||
    unsigned char empty[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
					    unsigned char empty[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
				
			||||||
    unsigned char read_seed->x[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
					 | 
				
			||||||
    unsigned char check_seed[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
					    unsigned char check_seed[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
				
			||||||
    unsigned char check_entropy[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
					    unsigned char check_entropy[MBEDTLS_ENTROPY_BLOCK_SIZE];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -323,7 +322,7 @@ void entropy_nv_seed( data_t * read_seed )
 | 
				
			|||||||
    memset( check_entropy, 3, MBEDTLS_ENTROPY_BLOCK_SIZE );
 | 
					    memset( check_entropy, 3, MBEDTLS_ENTROPY_BLOCK_SIZE );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Set the initial NV seed to read
 | 
					    // Set the initial NV seed to read
 | 
				
			||||||
    memcpy( buffer_seed, read_seed->x, MBEDTLS_ENTROPY_BLOCK_SIZE );
 | 
					    memcpy( buffer_seed, read_seed->x, read_seed->len );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Make sure we read/write NV seed from our buffers
 | 
					    // Make sure we read/write NV seed from our buffers
 | 
				
			||||||
    mbedtls_platform_set_nv_seed( buffer_nv_seed_read, buffer_nv_seed_write );
 | 
					    mbedtls_platform_set_nv_seed( buffer_nv_seed_read, buffer_nv_seed_write );
 | 
				
			||||||
@ -348,7 +347,7 @@ void entropy_nv_seed( data_t * read_seed )
 | 
				
			|||||||
    // First run for updating write_seed
 | 
					    // First run for updating write_seed
 | 
				
			||||||
    header[0] = 0;
 | 
					    header[0] = 0;
 | 
				
			||||||
    mbedtls_sha512_update( &accumulator, header, 2 );
 | 
					    mbedtls_sha512_update( &accumulator, header, 2 );
 | 
				
			||||||
    mbedtls_sha512_update( &accumulator, read_seed->x, MBEDTLS_ENTROPY_BLOCK_SIZE );
 | 
					    mbedtls_sha512_update( &accumulator, read_seed->x, read_seed->len );
 | 
				
			||||||
    mbedtls_sha512_finish( &accumulator, buf );
 | 
					    mbedtls_sha512_finish( &accumulator, buf );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    memset( &accumulator, 0, sizeof( mbedtls_sha512_context ) );
 | 
					    memset( &accumulator, 0, sizeof( mbedtls_sha512_context ) );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user