mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Add missing tag_len in ccm api.
Function ccm_set_lengths requires tag_len argument for the B[0] calculation. Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
		
							parent
							
								
									36ff66c4b4
								
							
						
					
					
						commit
						98d45b90b0
					
				@ -345,6 +345,9 @@ int mbedtls_ccm_starts( mbedtls_ccm_context *ctx,
 | 
			
		||||
 * \param plaintext_len  The length in bytes of the plaintext to encrypt or
 | 
			
		||||
 *                       result of the decryption (thus not encompassing the
 | 
			
		||||
 *                       additional data that are not encrypted).
 | 
			
		||||
 * \param tag_len   The length of the tag to generate in Bytes:
 | 
			
		||||
 *                  4, 6, 8, 10, 12, 14 or 16.
 | 
			
		||||
 *                  For CCM*, zero is also valid.
 | 
			
		||||
 *
 | 
			
		||||
 * \return          \c 0 on success.
 | 
			
		||||
 * \return          #MBEDTLS_ERR_CCM_BAD_INPUT on failure:
 | 
			
		||||
@ -353,7 +356,8 @@ int mbedtls_ccm_starts( mbedtls_ccm_context *ctx,
 | 
			
		||||
 */
 | 
			
		||||
int mbedtls_ccm_set_lengths( mbedtls_ccm_context *ctx,
 | 
			
		||||
                             size_t total_ad_len,
 | 
			
		||||
                             size_t plaintext_len );
 | 
			
		||||
                             size_t plaintext_len,
 | 
			
		||||
                             size_t tag_len );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief           This function feeds an input buffer as associated data
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user