From d7a28646bc6226bb7744ca7cc44fa9f02a469c01 Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Thu, 7 Apr 2022 14:58:33 +0200 Subject: [PATCH] psa_tls12_prf_set_key(): add PSA_TLS12_PRF_STATE_OTHER_KEY_SET as a valid state Signed-off-by: Przemek Stekiel --- library/psa_crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 1558e28a8..e78fb9dc5 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -5208,7 +5208,8 @@ static psa_status_t psa_tls12_prf_set_key( psa_tls12_prf_key_derivation_t *prf, const uint8_t *data, size_t data_length ) { - if( prf->state != PSA_TLS12_PRF_STATE_SEED_SET ) + if( prf->state != PSA_TLS12_PRF_STATE_SEED_SET && + prf->state != PSA_TLS12_PRF_STATE_OTHER_KEY_SET ) return( PSA_ERROR_BAD_STATE ); if( data_length != 0 )