summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/image_upload.hpp8
-rw-r--r--include/ossl_random.hpp (renamed from include/random.hpp)3
-rw-r--r--include/persistent_data.hpp7
-rw-r--r--include/sessions.hpp2
-rw-r--r--include/ssl_key_handler.hpp2
5 files changed, 9 insertions, 13 deletions
diff --git a/include/image_upload.hpp b/include/image_upload.hpp
index 18a0c09b78..cdd7dd47d2 100644
--- a/include/image_upload.hpp
+++ b/include/image_upload.hpp
@@ -3,10 +3,8 @@
#include "app.hpp"
#include "dbus_singleton.hpp"
#include "dbus_utility.hpp"
+#include "ossl_random.hpp"
-#include <boost/uuid/uuid.hpp>
-#include <boost/uuid/uuid_generators.hpp>
-#include <boost/uuid/uuid_io.hpp>
#include <sdbusplus/bus/match.hpp>
#include <cstdio>
@@ -93,9 +91,7 @@ inline void
"member='InterfacesAdded',path='/xyz/openbmc_project/software'",
callback);
- std::string filepath(
- "/tmp/images/" +
- boost::uuids::to_string(boost::uuids::random_generator()()));
+ std::string filepath("/tmp/images/" + bmcweb::getRandomUUID());
BMCWEB_LOG_DEBUG << "Writing file to " << filepath;
std::ofstream out(filepath, std::ofstream::out | std::ofstream::binary |
std::ofstream::trunc);
diff --git a/include/random.hpp b/include/ossl_random.hpp
index f5f094689e..2cbec849a9 100644
--- a/include/random.hpp
+++ b/include/ossl_random.hpp
@@ -4,6 +4,7 @@
#include <iostream>
#include <limits>
+#include <string>
namespace bmcweb
{
@@ -46,4 +47,6 @@ struct OpenSSLGenerator
bool err = false;
};
+std::string getRandomUUID();
+
} // namespace bmcweb
diff --git a/include/persistent_data.hpp b/include/persistent_data.hpp
index 4344074a14..a08ca7e086 100644
--- a/include/persistent_data.hpp
+++ b/include/persistent_data.hpp
@@ -3,12 +3,10 @@
#include "event_service_store.hpp"
#include "http_request.hpp"
#include "http_response.hpp"
+#include "ossl_random.hpp"
#include "sessions.hpp"
#include <boost/beast/http/fields.hpp>
-#include <boost/uuid/uuid.hpp>
-#include <boost/uuid/uuid_generators.hpp>
-#include <boost/uuid/uuid_io.hpp>
#include <nlohmann/json.hpp>
#include <filesystem>
@@ -178,8 +176,7 @@ class ConfigFile
if (systemUuid.empty())
{
- systemUuid =
- boost::uuids::to_string(boost::uuids::random_generator()());
+ systemUuid = bmcweb::getRandomUUID();
needWrite = true;
}
if (fileRevision < jsonRevision)
diff --git a/include/sessions.hpp b/include/sessions.hpp
index 98912e827a..9179723e5f 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -1,7 +1,7 @@
#pragma once
#include "logging.hpp"
-#include "random.hpp"
+#include "ossl_random.hpp"
#include "utility.hpp"
#include "utils/ip_utils.hpp"
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index 0794fdcfac..abc9b50d61 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -1,7 +1,7 @@
#pragma once
#include "logging.hpp"
-#include "random.hpp"
+#include "ossl_random.hpp"
extern "C"
{