mirror of
				https://github.com/Mbed-TLS/mbedtls.git
				synced 2025-11-03 20:33:16 +03:00 
			
		
		
		
	Fix key usage test in psa_pake_set_password_key()
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
		@@ -188,11 +188,8 @@ psa_status_t psa_pake_set_password_key( psa_pake_operation_t *operation,
 | 
				
			|||||||
        return PSA_ERROR_INVALID_ARGUMENT;
 | 
					        return PSA_ERROR_INVALID_ARGUMENT;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if( usage == 0 ||
 | 
					    if( ( usage & PSA_KEY_USAGE_DERIVE ) == 0 )
 | 
				
			||||||
        ( usage & PSA_KEY_USAGE_DERIVE ) == 0 )
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        return PSA_ERROR_NOT_PERMITTED;
 | 
					        return PSA_ERROR_NOT_PERMITTED;
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    operation->password = password;
 | 
					    operation->password = password;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user