mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 15:55:50 +01:00
ssl_server2: get op_name from context in ssl_async_resume as well
This commit is contained in:
parent
9ceae8b4f6
commit
276b9a650c
@ -1039,7 +1039,7 @@ static int ssl_async_resume( mbedtls_ssl_context *ssl,
|
||||
mbedtls_ssl_conf_get_async_config_data( ssl->conf );
|
||||
ssl_async_key_slot_t *key_slot = &config_data->slots[ctx->slot];
|
||||
int ret;
|
||||
const char *op_name = NULL;
|
||||
const char *op_name;
|
||||
|
||||
if( ctx->remaining_delay > 0 )
|
||||
{
|
||||
@ -1052,14 +1052,12 @@ static int ssl_async_resume( mbedtls_ssl_context *ssl,
|
||||
switch( ctx->operation_type )
|
||||
{
|
||||
case ASYNC_OP_DECRYPT:
|
||||
op_name = "decrypt";
|
||||
ret = mbedtls_pk_decrypt( key_slot->pk,
|
||||
ctx->input, ctx->input_len,
|
||||
output, output_len, output_size,
|
||||
config_data->f_rng, config_data->p_rng );
|
||||
break;
|
||||
case ASYNC_OP_SIGN:
|
||||
op_name = "sign";
|
||||
ret = mbedtls_pk_sign( key_slot->pk,
|
||||
ctx->md_alg,
|
||||
ctx->input, ctx->input_len,
|
||||
@ -1073,6 +1071,8 @@ static int ssl_async_resume( mbedtls_ssl_context *ssl,
|
||||
break;
|
||||
}
|
||||
|
||||
op_name = ssl_async_operation_names[ctx->operation_type];
|
||||
|
||||
if( config_data->inject_error == SSL_ASYNC_INJECT_ERROR_RESUME )
|
||||
{
|
||||
mbedtls_printf( "Async resume callback: %s done but injected error\n",
|
||||
|
Loading…
Reference in New Issue
Block a user