diff options
author | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2010-02-23 10:34:14 +0000 |
---|---|---|
committer | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2010-02-23 10:34:14 +0000 |
commit | ed7d79f96177044949744da10f4431c1d6242241 (patch) | |
tree | 3aabaa55ed3b5291daef891cfee9befb5235e2b8 /src/libstrongswan/plugins/random/random_rng.c | |
parent | 7410d3c6d6a9a1cd7aa55083c938946af6ff9498 (diff) | |
download | vyos-strongswan-ed7d79f96177044949744da10f4431c1d6242241.tar.gz vyos-strongswan-ed7d79f96177044949744da10f4431c1d6242241.zip |
[svn-upgrade] Integrating new upstream version, strongswan (4.3.6)
Diffstat (limited to 'src/libstrongswan/plugins/random/random_rng.c')
-rw-r--r-- | src/libstrongswan/plugins/random/random_rng.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstrongswan/plugins/random/random_rng.c b/src/libstrongswan/plugins/random/random_rng.c index 22d21574e..34f300296 100644 --- a/src/libstrongswan/plugins/random/random_rng.c +++ b/src/libstrongswan/plugins/random/random_rng.c @@ -43,12 +43,12 @@ struct private_random_rng_t { * Public random_rng_t interface. */ random_rng_t public; - + /** * random device, depends on quality */ int dev; - + /** * file we read random bytes from */ @@ -63,9 +63,9 @@ static void get_bytes(private_random_rng_t *this, size_t bytes, { size_t done; ssize_t got; - + done = 0; - + while (done < bytes) { got = read(this->dev, buffer + done, bytes - done); @@ -120,7 +120,7 @@ random_rng_t *random_rng_create(rng_quality_t quality) { this->file = DEV_URANDOM; } - + this->dev = open(this->file, 0); if (this->dev < 0) { |