diff options
Diffstat (limited to 'src/lib/entropy/unix_procs/unix_procs.cpp')
-rw-r--r-- | src/lib/entropy/unix_procs/unix_procs.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/entropy/unix_procs/unix_procs.cpp b/src/lib/entropy/unix_procs/unix_procs.cpp index abfe341e0..59bb35785 100644 --- a/src/lib/entropy/unix_procs/unix_procs.cpp +++ b/src/lib/entropy/unix_procs/unix_procs.cpp @@ -68,15 +68,15 @@ Unix_EntropySource::Unix_EntropySource(const std::vector<std::string>& trusted_p void UnixProcessInfo_EntropySource::poll(Entropy_Accumulator& accum) { - accum.add(::getpid(), 0.0); - accum.add(::getppid(), 0.0); - accum.add(::getuid(), 0.0); - accum.add(::getgid(), 0.0); - accum.add(::getpgrp(), 0.0); + accum.add(::getpid(), BOTAN_ENTROPY_ESTIMATE_STATIC_SYSTEM_DATA); + accum.add(::getppid(), BOTAN_ENTROPY_ESTIMATE_STATIC_SYSTEM_DATA); + accum.add(::getuid(), BOTAN_ENTROPY_ESTIMATE_STATIC_SYSTEM_DATA); + accum.add(::getgid(), BOTAN_ENTROPY_ESTIMATE_STATIC_SYSTEM_DATA); + accum.add(::getpgrp(), BOTAN_ENTROPY_ESTIMATE_STATIC_SYSTEM_DATA); struct ::rusage usage; ::getrusage(RUSAGE_SELF, &usage); - accum.add(usage, 0.0); + accum.add(usage, BOTAN_ENTROPY_ESTIMATE_SYSTEM_DATA); } void Unix_EntropySource::Unix_Process::spawn(const std::vector<std::string>& args) @@ -194,7 +194,6 @@ void Unix_EntropySource::poll(Entropy_Accumulator& accum) return; // still empty, really nothing to try const size_t MS_WAIT_TIME = 32; - const double ENTROPY_ESTIMATE = 1.0 / 1024; m_buf.resize(4096); @@ -238,7 +237,7 @@ void Unix_EntropySource::poll(Entropy_Accumulator& accum) { const ssize_t got = ::read(fd, m_buf.data(), m_buf.size()); if(got > 0) - accum.add(m_buf.data(), got, ENTROPY_ESTIMATE); + accum.add(m_buf.data(), got, BOTAN_ENTROPY_ESTIMATE_SYSTEM_TEXT); else proc.spawn(next_source()); } |