diff options
author | Vernon Mauery <vernon.mauery@linux.intel.com> | 2018-10-24 14:02:16 -0700 |
---|---|---|
committer | Tom Joseph <tomjoseph@in.ibm.com> | 2018-11-14 14:59:52 +0000 |
commit | 8977d12a4f6d647958b50003c11e396fadffde51 (patch) | |
tree | d6ea56c718265ed0e908fc21e3af694fcb5e6510 /sessions_manager.cpp | |
parent | 07e5b28c142abc0d2f1a94d6ce9ef21446226f5e (diff) | |
download | phosphor-net-ipmid-8977d12a4f6d647958b50003c11e396fadffde51.tar.gz phosphor-net-ipmid-8977d12a4f6d647958b50003c11e396fadffde51.zip |
netipmid: use libcrypto prng instead of insecure std::rand
std::rand is insecure. Add a simple openssl-crypto wrapper for a similar
interface that can replace it.
Tested-by: Run ipmitool six times in parallel to see that five
independent sessions are created and the sixth one causes the
BMC to dump the session list on the console. Note that the
session numbers are still random.
Change-Id: I0b387f1343abefc45be0d62cf9af45fbd5563047
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'sessions_manager.cpp')
-rw-r--r-- | sessions_manager.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sessions_manager.cpp b/sessions_manager.cpp index bf7ff34..52d749b 100644 --- a/sessions_manager.cpp +++ b/sessions_manager.cpp @@ -20,8 +20,6 @@ Manager::Manager() * through the lifetime of the Session Manager. */ sessionsMap.emplace(0, std::make_shared<Session>()); - // Seeding the pseudo-random generator - std::srand(std::time(0)); } std::shared_ptr<Session> |