summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/botan/files')
-rw-r--r--dev-libs/botan/files/botan-1.11.32-urandom.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-libs/botan/files/botan-1.11.32-urandom.patch b/dev-libs/botan/files/botan-1.11.32-urandom.patch
new file mode 100644
index 000000000000..6a4c53f79c12
--- /dev/null
+++ b/dev-libs/botan/files/botan-1.11.32-urandom.patch
@@ -0,0 +1,26 @@
+diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp
+index 135f4fa..3b44d5a 100644
+--- a/src/lib/rng/system_rng/system_rng.cpp
++++ b/src/lib/rng/system_rng/system_rng.cpp
+@@ -74,7 +74,7 @@ System_RNG_Impl::System_RNG_Impl()
+ #define O_NOCTTY 0
+ #endif
+
+- m_fd = ::open(BOTAN_SYSTEM_RNG_DEVICE, O_RDWR | O_NOCTTY);
++ m_fd = ::open(BOTAN_SYSTEM_RNG_DEVICE, O_RDONLY | O_NOCTTY);
+ if(m_fd < 0)
+ throw Exception("System_RNG failed to open RNG device");
+ #endif
+diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp
+index d481116..5b9f5fd 100644
+--- a/src/tests/test_ffi.cpp
++++ b/src/tests/test_ffi.cpp
+@@ -74,7 +74,7 @@ class FFI_Unit_Tests : public Test
+ if(TEST_FFI_OK(botan_rng_init, (&rng, "system")))
+ {
+ TEST_FFI_OK(botan_rng_get, (rng, outbuf.data(), outbuf.size()));
+- TEST_FFI_OK(botan_rng_reseed, (rng, 256));
++ //TEST_FFI_OK(botan_rng_reseed, (rng, 256));
+ TEST_FFI_OK(botan_rng_destroy, (rng));
+ }
+