Split cipher_set_iv() out of cipher_reset()

This commit is contained in:
Manuel Pégourié-Gonnard 2013-09-03 13:04:44 +02:00
parent 9241be7ac5
commit 9c853b910c
6 changed files with 79 additions and 26 deletions

View file

@ -184,7 +184,10 @@ int pkcs12_pbe( 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, NULL, 0 ) ) != 0 )
if( ( ret = cipher_set_iv( &cipher_ctx, iv, 0 ) ) != 0 )
goto exit;
if( ( ret = cipher_reset( &cipher_ctx, iv, 0 ) ) != 0 )
goto exit;
if( ( ret = cipher_update( &cipher_ctx, data, len,