diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/ChangeLog | 2 | ||||
-rw-r--r-- | common/mkdtemp.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/common/ChangeLog b/common/ChangeLog index da80507f2..2344868a7 100644 --- a/common/ChangeLog +++ b/common/ChangeLog @@ -1,5 +1,7 @@ 2003-11-14 Werner Koch <[email protected]> + * mkdtemp.c (mkdtemp): Use gcry_create_nonce. + * cryptmiss.c: Removed. 2003-11-13 Werner Koch <[email protected]> diff --git a/common/mkdtemp.c b/common/mkdtemp.c index 5347b9cb4..abe731e0a 100644 --- a/common/mkdtemp.c +++ b/common/mkdtemp.c @@ -66,11 +66,8 @@ char *mkdtemp(char *template) idx=0; - /* Using really random bits is probably overkill here. The - worst thing that can happen with a directory name collision - is that the function will return an error. */ - - randombits = gcry_random_bytes (4*remaining, GCRY_WEAK_RANDOM); + randombits = gcry_xmalloc (4*remaining); + gcry_create_nonce (randombits, 4*remaining); while(remaining>1) { |