Remove support for pake opaque driver

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2023-02-21 12:20:46 +01:00
parent ce131bf5c5
commit 51a677bb30
3 changed files with 3 additions and 174 deletions

View file

@ -2844,17 +2844,6 @@ psa_status_t psa_driver_wrapper_pake_setup(
#endif
return( PSA_ERROR_NOT_SUPPORTED );
/* Add cases for opaque driver here */
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
#if defined(PSA_CRYPTO_DRIVER_TEST)
case PSA_CRYPTO_TEST_DRIVER_LOCATION:
status = mbedtls_test_opaque_pake_setup(
&operation->data.ctx.opaque_test_driver_ctx,
inputs );
if( status == PSA_SUCCESS )
operation->id = MBEDTLS_TEST_OPAQUE_DRIVER_ID;
return status;
#endif /* PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
default:
/* Key is declared with a lifetime not known to us */
(void)operation;
@ -2884,10 +2873,6 @@ psa_status_t psa_driver_wrapper_pake_output(
return( mbedtls_test_transparent_pake_output(
&operation->data.ctx.transparent_test_driver_ctx,
step, output, output_size, output_length ) );
case MBEDTLS_TEST_OPAQUE_DRIVER_ID:
return( mbedtls_test_opaque_pake_output(
&operation->data.ctx.opaque_test_driver_ctx,
step, output, output_size, output_length ) );
#endif /* PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
default:
@ -2921,11 +2906,6 @@ psa_status_t psa_driver_wrapper_pake_input(
&operation->data.ctx.transparent_test_driver_ctx,
step,
input, input_length ) );
case MBEDTLS_TEST_OPAQUE_DRIVER_ID:
return( mbedtls_test_opaque_pake_input(
&operation->data.ctx.opaque_test_driver_ctx,
step,
input, input_length ) );
#endif /* PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
default:
@ -2955,15 +2935,12 @@ psa_status_t psa_driver_wrapper_pake_get_implicit_key(
return( mbedtls_test_transparent_pake_get_implicit_key(
&operation->data.ctx.transparent_test_driver_ctx,
output, output_size, output_length ) );
case MBEDTLS_TEST_OPAQUE_DRIVER_ID:
return( mbedtls_test_opaque_pake_get_implicit_key(
&operation->data.ctx.opaque_test_driver_ctx,
output, output_size, output_length ) );
#endif /* PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
default:
(void) output;
(void) output_size;
(void) output_length;
return( PSA_ERROR_INVALID_ARGUMENT );
}
}
@ -2983,9 +2960,6 @@ psa_status_t psa_driver_wrapper_pake_abort(
case MBEDTLS_TEST_TRANSPARENT_DRIVER_ID:
return( mbedtls_test_transparent_pake_abort(
&operation->data.ctx.transparent_test_driver_ctx ) );
case MBEDTLS_TEST_OPAQUE_DRIVER_ID:
return( mbedtls_test_opaque_pake_abort(
&operation->data.ctx.opaque_test_driver_ctx ) );
#endif /* PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
default:

View file

@ -75,49 +75,5 @@ psa_status_t mbedtls_test_transparent_pake_get_implicit_key(
psa_status_t mbedtls_test_transparent_pake_abort(
mbedtls_transparent_test_driver_pake_operation_t *operation);
psa_status_t mbedtls_test_opaque_pake_setup(
mbedtls_opaque_test_driver_pake_operation_t *operation,
const psa_crypto_driver_pake_inputs_t *inputs);
psa_status_t mbedtls_test_opaque_set_password_key(
const psa_key_attributes_t *attributes,
mbedtls_opaque_test_driver_pake_operation_t *operation,
uint8_t *key_buffer,
size_t key_size);
psa_status_t mbedtls_test_opaque_pake_set_user(
mbedtls_opaque_test_driver_pake_operation_t *operation,
const uint8_t *user_id,
size_t user_id_len);
psa_status_t mbedtls_test_opaque_pake_set_peer(
mbedtls_opaque_test_driver_pake_operation_t *operation,
const uint8_t *peer_id,
size_t peer_id_len);
psa_status_t mbedtls_test_opaque_pake_set_role(
mbedtls_opaque_test_driver_pake_operation_t *operation,
psa_pake_role_t role);
psa_status_t mbedtls_test_opaque_pake_output(
mbedtls_opaque_test_driver_pake_operation_t *operation,
psa_crypto_driver_pake_step_t step,
uint8_t *output,
size_t output_size,
size_t *output_length);
psa_status_t mbedtls_test_opaque_pake_input(
mbedtls_opaque_test_driver_pake_operation_t *operation,
psa_crypto_driver_pake_step_t step,
const uint8_t *input,
size_t input_length);
psa_status_t mbedtls_test_opaque_pake_get_implicit_key(
mbedtls_opaque_test_driver_pake_operation_t *operation,
uint8_t *output, size_t output_size, size_t *output_length);
psa_status_t mbedtls_test_opaque_pake_abort(
mbedtls_opaque_test_driver_pake_operation_t *operation);
#endif /* PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_TEST_DRIVERS_PAKE_H */

View file

@ -165,6 +165,8 @@ psa_status_t mbedtls_test_transparent_pake_get_implicit_key(
#else
(void) operation;
(void) output;
(void) output_size;
(void) output_length;
mbedtls_test_driver_pake_hooks.driver_status = PSA_ERROR_NOT_SUPPORTED;
#endif
}
@ -202,107 +204,4 @@ psa_status_t mbedtls_test_transparent_pake_abort(
return mbedtls_test_driver_pake_hooks.driver_status;
}
/*
* opaque versions, to do
*/
psa_status_t mbedtls_test_opaque_pake_setup(
mbedtls_opaque_test_driver_pake_operation_t *operation,
const psa_crypto_driver_pake_inputs_t *inputs)
{
(void) operation;
(void) inputs;
return PSA_ERROR_NOT_SUPPORTED;
}
psa_status_t mbedtls_test_opaque_set_password_key(
const psa_key_attributes_t *attributes,
mbedtls_opaque_test_driver_pake_operation_t *operation,
uint8_t *key_buffer,
size_t key_size)
{
(void) attributes;
(void) operation;
(void) key_buffer;
(void) key_size;
return PSA_ERROR_NOT_SUPPORTED;
}
psa_status_t mbedtls_test_opaque_pake_set_user(
mbedtls_opaque_test_driver_pake_operation_t *operation,
const uint8_t *user_id,
size_t user_id_len)
{
(void) operation;
(void) user_id;
(void) user_id_len;
return PSA_ERROR_NOT_SUPPORTED;
}
psa_status_t mbedtls_test_opaque_pake_set_peer(
mbedtls_opaque_test_driver_pake_operation_t *operation,
const uint8_t *peer_id,
size_t peer_id_len)
{
(void) operation;
(void) peer_id;
(void) peer_id_len;
return PSA_ERROR_NOT_SUPPORTED;
}
psa_status_t mbedtls_test_opaque_pake_set_role(
mbedtls_opaque_test_driver_pake_operation_t *operation,
psa_pake_role_t role)
{
(void) operation;
(void) role;
return PSA_ERROR_NOT_SUPPORTED;
}
psa_status_t mbedtls_test_opaque_pake_output(
mbedtls_opaque_test_driver_pake_operation_t *operation,
psa_crypto_driver_pake_step_t step,
uint8_t *output,
size_t output_size,
size_t *output_length)
{
(void) operation;
(void) step;
(void) output;
(void) output_size;
(void) output_length;
return PSA_ERROR_NOT_SUPPORTED;
}
psa_status_t mbedtls_test_opaque_pake_input(
mbedtls_opaque_test_driver_pake_operation_t *operation,
psa_crypto_driver_pake_step_t step,
const uint8_t *input,
size_t input_length)
{
(void) operation;
(void) step;
(void) input;
(void) input_length;
return PSA_ERROR_NOT_SUPPORTED;
}
psa_status_t mbedtls_test_opaque_pake_get_implicit_key(
mbedtls_opaque_test_driver_pake_operation_t *operation,
uint8_t *output, size_t output_size, size_t *output_length)
{
(void) operation;
(void) output;
(void) output_size;
(void) output_length;
return PSA_ERROR_NOT_SUPPORTED;
}
psa_status_t mbedtls_test_opaque_pake_abort(
mbedtls_opaque_test_driver_pake_operation_t *operation)
{
(void) operation;
return PSA_ERROR_NOT_SUPPORTED;
}
#endif /* MBEDTLS_PSA_CRYPTO_DRIVERS && PSA_CRYPTO_DRIVER_TEST */