mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
* protect.c (do_encryption): Use gcry_create_nonce instad of the
obsolete WEAK_RANDOM.
This commit is contained in:
parent
dba63c0a0c
commit
d06cba6984
@ -1,3 +1,8 @@
|
|||||||
|
2003-12-15 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* protect.c (do_encryption): Use gcry_create_nonce instad of the
|
||||||
|
obsolete WEAK_RANDOM.
|
||||||
|
|
||||||
2003-11-20 Werner Koch <wk@gnupg.org>
|
2003-11-20 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* sexp-parse.h (snext): Don't use atoi_1 and digitp macros, so
|
* sexp-parse.h (snext): Don't use atoi_1 and digitp macros, so
|
||||||
|
@ -168,12 +168,12 @@ do_encryption (const char *protbegin, size_t protlen,
|
|||||||
rc = out_of_core ();
|
rc = out_of_core ();
|
||||||
if (!rc)
|
if (!rc)
|
||||||
{
|
{
|
||||||
/* allocate random bytes to be used as IV, padding and s2k salt*/
|
/* Allocate random bytes to be used as IV, padding and s2k salt. */
|
||||||
iv = gcry_random_bytes (blklen*2+8, GCRY_WEAK_RANDOM);
|
iv = xtrymalloc (blklen*2+8);
|
||||||
if (!iv)
|
if (!iv)
|
||||||
rc = gpg_error (GPG_ERR_ENOMEM);
|
rc = gpg_error (GPG_ERR_ENOMEM);
|
||||||
else
|
gcry_create_nonce (iv, blklen*2+8);
|
||||||
rc = gcry_cipher_setiv (hd, iv, blklen);
|
rc = gcry_cipher_setiv (hd, iv, blklen);
|
||||||
}
|
}
|
||||||
if (!rc)
|
if (!rc)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user