Home GnuPG

Move nonce creation from csprng backend to random main module.
c324644aa14eUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Move nonce creation from csprng backend to random main module.

* random/random-csprng.c (_gcry_rngcsprng_create_nonce): Remove.
(nonce_buffer_lock): Remove.
(initialize_basics): Remove init of nonce_buffer_lock.
* random/random.c: Add a few header files.
(nonce_buffer_lock):  New.
(_gcry_random_initialize): Init nonce_buffer_lock.
(gcry_create_nonce): Add code from _gcry_rngcsprng_create_nonce.
* random/random-daemon.c (_gcry_daemon_create_nonce): Remove.

The nonce generation code is useful for all RNG types and thus it
should be in random.c. The only exception is the fips-mode, which
requires the use of the fips nonce generator.

Details

Provenance
wernerAuthored on Nov 30 2012, 6:16 PM
Parents
rCf851b9a932ee: Fix building with CC="gcc -std=c90".
Branches
Unknown
Tags
Unknown

Event Timeline