Merge pull request #3958 from gilles-peskine-arm/fix-tls12-constant-namespace
Fix some PSA-related identifiers
This commit is contained in:
Коммит
a0832d47f7
|
@ -228,11 +228,11 @@ typedef struct
|
|||
#if defined(MBEDTLS_MD_C)
|
||||
typedef enum
|
||||
{
|
||||
TLS12_PRF_STATE_INIT, /* no input provided */
|
||||
TLS12_PRF_STATE_SEED_SET, /* seed has been set */
|
||||
TLS12_PRF_STATE_KEY_SET, /* key has been set */
|
||||
TLS12_PRF_STATE_LABEL_SET, /* label has been set */
|
||||
TLS12_PRF_STATE_OUTPUT /* output has been started */
|
||||
PSA_TLS12_PRF_STATE_INIT, /* no input provided */
|
||||
PSA_TLS12_PRF_STATE_SEED_SET, /* seed has been set */
|
||||
PSA_TLS12_PRF_STATE_KEY_SET, /* key has been set */
|
||||
PSA_TLS12_PRF_STATE_LABEL_SET, /* label has been set */
|
||||
PSA_TLS12_PRF_STATE_OUTPUT /* output has been started */
|
||||
} psa_tls12_prf_key_derivation_state_t;
|
||||
|
||||
typedef struct psa_tls12_prf_key_derivation_s
|
||||
|
|
|
@ -5363,7 +5363,7 @@ static psa_status_t psa_tls12_prf_set_seed( psa_tls12_prf_key_derivation_t *prf,
|
|||
const uint8_t *data,
|
||||
size_t data_length )
|
||||
{
|
||||
if( prf->state != TLS12_PRF_STATE_INIT )
|
||||
if( prf->state != PSA_TLS12_PRF_STATE_INIT )
|
||||
return( PSA_ERROR_BAD_STATE );
|
||||
|
||||
if( data_length != 0 )
|
||||
|
@ -5376,7 +5376,7 @@ static psa_status_t psa_tls12_prf_set_seed( psa_tls12_prf_key_derivation_t *prf,
|
|||
prf->seed_length = data_length;
|
||||
}
|
||||
|
||||
prf->state = TLS12_PRF_STATE_SEED_SET;
|
||||
prf->state = PSA_TLS12_PRF_STATE_SEED_SET;
|
||||
|
||||
return( PSA_SUCCESS );
|
||||
}
|
||||
|
@ -5387,14 +5387,14 @@ static psa_status_t psa_tls12_prf_set_key( psa_tls12_prf_key_derivation_t *prf,
|
|||
size_t data_length )
|
||||
{
|
||||
psa_status_t status;
|
||||
if( prf->state != TLS12_PRF_STATE_SEED_SET )
|
||||
if( prf->state != PSA_TLS12_PRF_STATE_SEED_SET )
|
||||
return( PSA_ERROR_BAD_STATE );
|
||||
|
||||
status = psa_hmac_setup_internal( &prf->hmac, data, data_length, hash_alg );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
|
||||
prf->state = TLS12_PRF_STATE_KEY_SET;
|
||||
prf->state = PSA_TLS12_PRF_STATE_KEY_SET;
|
||||
|
||||
return( PSA_SUCCESS );
|
||||
}
|
||||
|
@ -5403,7 +5403,7 @@ static psa_status_t psa_tls12_prf_set_label( psa_tls12_prf_key_derivation_t *prf
|
|||
const uint8_t *data,
|
||||
size_t data_length )
|
||||
{
|
||||
if( prf->state != TLS12_PRF_STATE_KEY_SET )
|
||||
if( prf->state != PSA_TLS12_PRF_STATE_KEY_SET )
|
||||
return( PSA_ERROR_BAD_STATE );
|
||||
|
||||
if( data_length != 0 )
|
||||
|
@ -5416,7 +5416,7 @@ static psa_status_t psa_tls12_prf_set_label( psa_tls12_prf_key_derivation_t *prf
|
|||
prf->label_length = data_length;
|
||||
}
|
||||
|
||||
prf->state = TLS12_PRF_STATE_LABEL_SET;
|
||||
prf->state = PSA_TLS12_PRF_STATE_LABEL_SET;
|
||||
|
||||
return( PSA_SUCCESS );
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче