Skip to content

Commit a1b67f7

Browse files
fixup! Key derivation by small input steps: proof-of-concept
Fix logic error that clang helpfully points out
1 parent cc515fd commit a1b67f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/psa_crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4334,7 +4334,7 @@ static psa_status_t psa_key_derivation_setup_kdf(
43344334
return( PSA_ERROR_NOT_SUPPORTED );
43354335
if( ( PSA_ALG_IS_TLS12_PRF( kdf_alg ) ||
43364336
PSA_ALG_IS_TLS12_PSK_TO_MS( kdf_alg ) ) &&
4337-
! ( hash_alg == PSA_ALG_SHA_256 && hash_alg == PSA_ALG_SHA_384 ) )
4337+
! ( hash_alg == PSA_ALG_SHA_256 || hash_alg == PSA_ALG_SHA_384 ) )
43384338
{
43394339
return( PSA_ERROR_NOT_SUPPORTED );
43404340
}

0 commit comments

Comments
 (0)