fixup! Key derivation by small input steps: proof-of-concept

Fix logic error that clang helpfully points out
This commit is contained in:
Gilles Peskine 2019-04-12 15:06:27 +02:00
parent c88644dd24
commit ab4b201497

View file

@ -4334,7 +4334,7 @@ static psa_status_t psa_key_derivation_setup_kdf(
return( PSA_ERROR_NOT_SUPPORTED );
if( ( PSA_ALG_IS_TLS12_PRF( kdf_alg ) ||
PSA_ALG_IS_TLS12_PSK_TO_MS( kdf_alg ) ) &&
! ( hash_alg == PSA_ALG_SHA_256 && hash_alg == PSA_ALG_SHA_384 ) )
! ( hash_alg == PSA_ALG_SHA_256 || hash_alg == PSA_ALG_SHA_384 ) )
{
return( PSA_ERROR_NOT_SUPPORTED );
}