summaryrefslogtreecommitdiffstats
path: root/libqpdf/SecureRandomDataProvider.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/SecureRandomDataProvider.cc')
-rw-r--r--libqpdf/SecureRandomDataProvider.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/libqpdf/SecureRandomDataProvider.cc b/libqpdf/SecureRandomDataProvider.cc
index 14ef55a7..2870ab98 100644
--- a/libqpdf/SecureRandomDataProvider.cc
+++ b/libqpdf/SecureRandomDataProvider.cc
@@ -19,6 +19,22 @@ SecureRandomDataProvider::~SecureRandomDataProvider()
{
}
+#ifdef SKIP_OS_SECURE_RANDOM
+
+void
+SecureRandomDataProvider::provideRandomData(unsigned char* data, size_t len)
+{
+ throw std::logic_error("SecureRandomDataProvider::provideRandomData called when support was not compiled in");
+}
+
+RandomDataProvider*
+SecureRandomDataProvider::getInstance()
+{
+ return 0;
+}
+
+#else
+
#ifdef _WIN32
class WindowsCryptProvider
@@ -84,3 +100,5 @@ SecureRandomDataProvider::getInstance()
static SecureRandomDataProvider instance;
return &instance;
}
+
+#endif