mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Update driver tests for psa_hash/verify_message
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
This commit is contained in:
		
							parent
							
								
									f9820f92cf
								
							
						
					
					
						commit
						6dcaa3b5a1
					
				@ -168,7 +168,9 @@ void ecdsa_sign_message( int force_status_arg,
 | 
				
			|||||||
        ASSERT_COMPARE( signature, signature_length,
 | 
					        ASSERT_COMPARE( signature, signature_length,
 | 
				
			||||||
                        expected_output->x, expected_output->len );
 | 
					                        expected_output->x, expected_output->len );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    TEST_EQUAL( mbedtls_test_driver_signature_sign_hooks.hits, 1 );
 | 
					    /* In the builtin algorithm the driver is called twice. */
 | 
				
			||||||
 | 
					    TEST_EQUAL( mbedtls_test_driver_signature_sign_hooks.hits,
 | 
				
			||||||
 | 
					                force_status == PSA_ERROR_NOT_SUPPORTED ? 2 : 1 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exit:
 | 
					exit:
 | 
				
			||||||
    psa_reset_key_attributes( &attributes );
 | 
					    psa_reset_key_attributes( &attributes );
 | 
				
			||||||
@ -224,7 +226,9 @@ void ecdsa_verify_message( int force_status_arg,
 | 
				
			|||||||
                                        data_input->x, data_input->len,
 | 
					                                        data_input->x, data_input->len,
 | 
				
			||||||
                                        signature_input->x, signature_input->len );
 | 
					                                        signature_input->x, signature_input->len );
 | 
				
			||||||
    TEST_EQUAL( actual_status, expected_status );
 | 
					    TEST_EQUAL( actual_status, expected_status );
 | 
				
			||||||
    TEST_EQUAL( mbedtls_test_driver_signature_verify_hooks.hits, 1 );
 | 
					    /* In the builtin algorithm the driver is called twice. */
 | 
				
			||||||
 | 
					    TEST_EQUAL( mbedtls_test_driver_signature_verify_hooks.hits,
 | 
				
			||||||
 | 
					                force_status == PSA_ERROR_NOT_SUPPORTED ? 2 : 1 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exit:
 | 
					exit:
 | 
				
			||||||
    psa_reset_key_attributes( &attributes );
 | 
					    psa_reset_key_attributes( &attributes );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user