mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 19:20:40 -04:00 
			
		
		
		
	Check that the cipher GCM receives is a 128-bit-based cipher
This commit is contained in:
		
							parent
							
								
									43aff2aec4
								
							
						
					
					
						commit
						a0558e0484
					
				| @ -117,6 +117,9 @@ int gcm_init( gcm_context *ctx, cipher_id_t cipher, const unsigned char *key, | ||||
|     if( cipher_info == NULL ) | ||||
|         return( POLARSSL_ERR_GCM_BAD_INPUT ); | ||||
| 
 | ||||
|     if( cipher_info->block_size != 16 ) | ||||
|         return( POLARSSL_ERR_GCM_BAD_INPUT ); | ||||
| 
 | ||||
|     if( ( ret = cipher_init_ctx( &ctx->cipher_ctx, cipher_info ) ) != 0 ) | ||||
|         return( ret ); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Paul Bakker
						Paul Bakker