Fix iv_len interface.
cipher_info->iv_size == 0 is no longer ambiguous, and
cipher_get_iv_size() always returns something useful to generate an IV.
diff --git a/library/pkcs12.c b/library/pkcs12.c
index 3634ce1..cc59d68 100644
--- a/library/pkcs12.c
+++ b/library/pkcs12.c
@@ -184,10 +184,10 @@
if( ( ret = cipher_setkey( &cipher_ctx, key, keylen, mode ) ) != 0 )
goto exit;
- if( ( ret = cipher_set_iv( &cipher_ctx, iv, 0 ) ) != 0 )
+ if( ( ret = cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 )
goto exit;
- if( ( ret = cipher_reset( &cipher_ctx, iv, 0 ) ) != 0 )
+ if( ( ret = cipher_reset( &cipher_ctx, NULL, 0 ) ) != 0 )
goto exit;
if( ( ret = cipher_update( &cipher_ctx, data, len,