Use hx509_crypto_random_iv.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21319 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -485,6 +485,13 @@ hx509_cms_envelope_1(hx509_context context,
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = hx509_crypto_random_iv(crypto, &ivec);
|
||||
if (ret) {
|
||||
hx509_set_error_string(context, 0, ret,
|
||||
"Failed to create a random iv");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = hx509_crypto_encrypt(crypto,
|
||||
data,
|
||||
length,
|
||||
|
Reference in New Issue
Block a user