summaryrefslogtreecommitdiffstats
path: root/g10/seckey-cert.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1999-11-13 17:43:23 +0100
committerWerner Koch <wk@gnupg.org>1999-11-13 17:43:23 +0100
commit881e51323749ba797202d8a4119910e6f9d2f727 (patch)
tree3de535d07143b9b3513b524dd81f32a5305756b1 /g10/seckey-cert.c
parentSee ChangeLog: Thu Oct 28 16:17:46 CEST 1999 Werner Koch (diff)
downloadgnupg2-881e51323749ba797202d8a4119910e6f9d2f727.tar.xz
gnupg2-881e51323749ba797202d8a4119910e6f9d2f727.zip
See ChangeLog: Sat Nov 13 17:44:23 CET 1999 Werner Koch
Diffstat (limited to 'g10/seckey-cert.c')
-rw-r--r--g10/seckey-cert.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/seckey-cert.c b/g10/seckey-cert.c
index c153782bf..a0e41eea9 100644
--- a/g10/seckey-cert.c
+++ b/g10/seckey-cert.c
@@ -258,10 +258,11 @@ protect_secret_key( PKT_secret_key *sk, DEK *dek )
}
assert( sk->protect.ivlen <= DIM(sk->protect.iv) );
- randomize_buffer(sk->protect.iv, sk->protect.ivlen, 1);
+ gcry_randomize(sk->protect.iv, sk->protect.ivlen,
+ GCRY_STRONG_RANDOM);
gcry_cipher_setiv( cipher_hd, sk->protect.iv, sk->protect.ivlen );
if( sk->version >= 4 ) {
- #define NMPIS (PUBKEY_MAX_NSKEY - PUBKEY_MAX_NPKEY)
+ #define NMPIS (GNUPG_MAX_NSKEY - GNUPG_MAX_NPKEY)
byte *bufarr[NMPIS];
unsigned narr[NMPIS];
unsigned nbits[NMPIS];