mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Change cipher prototypes for GCM
This commit is contained in:
parent
20d6a17af9
commit
9241be7ac5
9 changed files with 94 additions and 39 deletions
|
|
@ -187,7 +187,7 @@ int pkcs5_pbes2( asn1_buf *pbe_params, int mode,
|
|||
if( ( ret = cipher_setkey( &cipher_ctx, key, keylen, mode ) ) != 0 )
|
||||
goto exit;
|
||||
|
||||
if( ( ret = cipher_reset( &cipher_ctx, iv ) ) != 0 )
|
||||
if( ( ret = cipher_reset( &cipher_ctx, iv, 0, NULL, 0 ) ) != 0 )
|
||||
goto exit;
|
||||
|
||||
if( ( ret = cipher_update( &cipher_ctx, data, datalen,
|
||||
|
|
@ -196,8 +196,11 @@ int pkcs5_pbes2( asn1_buf *pbe_params, int mode,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if( ( ret = cipher_finish( &cipher_ctx, output + olen, &olen ) ) != 0 )
|
||||
if( ( ret = cipher_finish( &cipher_ctx, output + olen, &olen, NULL, 0 ) )
|
||||
!= 0 )
|
||||
{
|
||||
ret = POLARSSL_ERR_PKCS5_PASSWORD_MISMATCH;
|
||||
}
|
||||
|
||||
exit:
|
||||
md_free_ctx( &md_ctx );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue