mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
Split tag handling out of cipher_finish()
This commit is contained in:
parent
2adc40c346
commit
aa9ffc5e98
6 changed files with 88 additions and 54 deletions
|
|
@ -199,11 +199,8 @@ int pkcs5_pbes2( asn1_buf *pbe_params, int mode,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if( ( ret = cipher_finish( &cipher_ctx, output + olen, &olen, NULL, 0 ) )
|
||||
!= 0 )
|
||||
{
|
||||
if( ( ret = cipher_finish( &cipher_ctx, output + olen, &olen ) ) != 0 )
|
||||
ret = POLARSSL_ERR_PKCS5_PASSWORD_MISMATCH;
|
||||
}
|
||||
|
||||
exit:
|
||||
md_free_ctx( &md_ctx );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue