mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Check that attempting to destroy a read-only key fails
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
		
							parent
							
								
									eb7bdaa177
								
							
						
					
					
						commit
						576464873a
					
				@ -120,10 +120,8 @@ static int test_read_key( const psa_key_attributes_t *expected_attributes,
 | 
				
			|||||||
    if( flags & TEST_FLAG_READ_ONLY )
 | 
					    if( flags & TEST_FLAG_READ_ONLY )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        /* Read-only keys cannot be removed through the API.
 | 
					        /* Read-only keys cannot be removed through the API.
 | 
				
			||||||
         * The key will be removed through ITS in the cleanup code below.
 | 
					         * The key will be removed through ITS in the cleanup code below. */
 | 
				
			||||||
         * Purge the key from memory so that the test framework doesn't
 | 
					        TEST_EQUAL( PSA_ERROR_NOT_PERMITTED, psa_destroy_key( key_id ) );
 | 
				
			||||||
         * think the test is leaking it. */
 | 
					 | 
				
			||||||
        PSA_ASSERT( psa_purge_key( key_id ) );
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user