summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-03 16:33:11 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-08 11:29:54 +0200
commite5aa87aeeb66a8f8068b41275d23c491f2dbd0f2 (patch)
treed3ac3b25fdbfec19e77599fd860016f661f9f5fb /desktop
parent1eaae3966db362b5094feee4ac9a462ee9993d90 (diff)
drop requirement for rtl_random_getBytes to have "Pool" arg
Seeing as since: commit e9531b792ddf0cfc2db11713b574c5fc7ae09e2c Date: Tue Feb 6 14:39:47 2024 +0100 sal: rtlRandomPool: require OS random device, abort if not present Both rtl_random_createPool() and rtl_random_getBytes() first try to get random data from the OS, via /dev/urandom or rand_s() (documented to call RtlGenRandom(), see [1]). we don't use the initial arg to rtl_random_getBytes anymore, drop the requirement to have one. Then simplify our usages of that, and addtionally deprecate rtl_random_createPool and rtl_random_destroyPool. Change-Id: I13dcc067714a8a741a4e8f2bfcf2006373f832c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167067 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 4cd248251b40..fc85925ca0b9 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -409,12 +409,9 @@ oslProcess raiseProcess(
OUString generateRandomPipeId()
{
// compute some good pipe id:
- static rtlRandomPool s_hPool = rtl_random_createPool();
- if (s_hPool == nullptr)
- throw RuntimeException( u"cannot create random pool!?"_ustr, nullptr );
sal_uInt8 bytes[ 32 ];
if (rtl_random_getBytes(
- s_hPool, bytes, std::size(bytes) ) != rtl_Random_E_None) {
+ nullptr, bytes, std::size(bytes) ) != rtl_Random_E_None) {
throw RuntimeException( u"random pool error!?"_ustr, nullptr );
}
OUStringBuffer buf;