mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 19:20:40 -04:00 
			
		
		
		
	Add missing check to multipart decrypt
Ensure that the test actually does something, rather than skipping both parts, also add comment to this effect. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
		
							parent
							
								
									b0450febe6
								
							
						
					
					
						commit
						e64deda873
					
				| @ -3494,6 +3494,8 @@ void aead_multipart_encrypt( int key_type_arg, data_t *key_data, | |||||||
|     size_t ad_part_len = 0; |     size_t ad_part_len = 0; | ||||||
|     size_t data_part_len = 0; |     size_t data_part_len = 0; | ||||||
| 
 | 
 | ||||||
|  |     /* Ensure that either one part of the test or the other is done, i.e this | ||||||
|  |      * test does something. */ | ||||||
|     TEST_ASSERT( do_test_ad_chunked || do_test_data_chunked ); |     TEST_ASSERT( do_test_ad_chunked || do_test_data_chunked ); | ||||||
| 
 | 
 | ||||||
|     /* Temporary whilst we have algorithms that cannot support chunking */ |     /* Temporary whilst we have algorithms that cannot support chunking */ | ||||||
| @ -3588,6 +3590,10 @@ void aead_multipart_decrypt( int key_type_arg, data_t *key_data, | |||||||
|     size_t ad_part_len = 0; |     size_t ad_part_len = 0; | ||||||
|     size_t data_part_len = 0; |     size_t data_part_len = 0; | ||||||
| 
 | 
 | ||||||
|  |     /* Ensure that either one part of the test or the other is done, i.e this | ||||||
|  |      * test does something. */ | ||||||
|  |     TEST_ASSERT( do_test_ad_chunked || do_test_data_chunked ); | ||||||
|  | 
 | ||||||
|     /* Temporary whilst we have algorithms that cannot support chunking */ |     /* Temporary whilst we have algorithms that cannot support chunking */ | ||||||
|     if( do_test_ad_chunked == 1 ) |     if( do_test_ad_chunked == 1 ) | ||||||
|     { |     { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Paul Elliott
						Paul Elliott