mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 16:05:43 +01:00
Change the default value of initialized cipher operation to NONE
This way, an initialized cipher context but without a key set can be identified. Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
73680ad5a2
commit
d81351b047
@ -186,6 +186,7 @@ int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx, const mbedtls_cipher_in
|
||||
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
|
||||
|
||||
mbedtls_platform_memset( ctx, 0, sizeof( mbedtls_cipher_context_t ) );
|
||||
ctx->operation = MBEDTLS_OPERATION_NONE;
|
||||
|
||||
if( NULL == ( ctx->cipher_ctx = cipher_info->base->ctx_alloc_func() ) )
|
||||
return( MBEDTLS_ERR_CIPHER_ALLOC_FAILED );
|
||||
|
Loading…
Reference in New Issue
Block a user