mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Fix documentation for mbedtls_gcm_finish()
Fix implementation and documentation missmatch for the function arguments to mbedtls_gcm_finish(). Also, removed redundant if condition that always evaluates to true.
This commit is contained in:
		
							parent
							
								
									9af0280aa5
								
							
						
					
					
						commit
						314d8a8400
					
				@ -45,6 +45,8 @@ Bugfix
 | 
				
			|||||||
   * Fix mbedtls_x509_get_sig() to update the ASN1 type in the mbedtls_x509_buf
 | 
					   * Fix mbedtls_x509_get_sig() to update the ASN1 type in the mbedtls_x509_buf
 | 
				
			||||||
     data structure until after error checks are successful. Found by
 | 
					     data structure until after error checks are successful. Found by
 | 
				
			||||||
     subramanyam-c.
 | 
					     subramanyam-c.
 | 
				
			||||||
 | 
					   * Fix documentation and implementation missmatch for function arguments of
 | 
				
			||||||
 | 
					     mbedtls_gcm_finish(). Found by cmiatpaar.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Changes
 | 
					Changes
 | 
				
			||||||
   * Extended test coverage of special cases, and added new timing test suite.
 | 
					   * Extended test coverage of special cases, and added new timing test suite.
 | 
				
			||||||
 | 
				
			|||||||
@ -190,8 +190,8 @@ int mbedtls_gcm_update( mbedtls_gcm_context *ctx,
 | 
				
			|||||||
 *                  16 bytes.
 | 
					 *                  16 bytes.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * \param ctx       GCM context
 | 
					 * \param ctx       GCM context
 | 
				
			||||||
 * \param tag       buffer for holding the tag (may be NULL if tag_len is 0)
 | 
					 * \param tag       buffer for holding the tag
 | 
				
			||||||
 * \param tag_len   length of the tag to generate
 | 
					 * \param tag_len   length of the tag to generate (must be at least 4)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * \return          0 if successful or MBEDTLS_ERR_GCM_BAD_INPUT
 | 
					 * \return          0 if successful or MBEDTLS_ERR_GCM_BAD_INPUT
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
				
			|||||||
@ -415,7 +415,6 @@ int mbedtls_gcm_finish( mbedtls_gcm_context *ctx,
 | 
				
			|||||||
    if( tag_len > 16 || tag_len < 4 )
 | 
					    if( tag_len > 16 || tag_len < 4 )
 | 
				
			||||||
        return( MBEDTLS_ERR_GCM_BAD_INPUT );
 | 
					        return( MBEDTLS_ERR_GCM_BAD_INPUT );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if( tag_len != 0 )
 | 
					 | 
				
			||||||
    memcpy( tag, ctx->base_ectr, tag_len );
 | 
					    memcpy( tag, ctx->base_ectr, tag_len );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if( orig_len || orig_add_len )
 | 
					    if( orig_len || orig_add_len )
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user