diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-11-30 18:25:01 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-12-14 21:17:36 +0100 |
commit | 30287d2d655e1a9fe476477b6c74b62f816f37d6 (patch) | |
tree | 54b8088e9945e634d91060a413011e62ba35bb96 /configure.ac | |
parent | 5e3bad2f86665b35155095b91a2d672fc7335870 (diff) | |
download | qpdf-30287d2d655e1a9fe476477b6c74b62f816f37d6.tar.zst |
Allow OS-provided secure random to be disabled
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 683b239f..9b53403b 100644 --- a/configure.ac +++ b/configure.ac @@ -26,11 +26,26 @@ AC_ARG_ENABLE(insecure-random, fi], [qpdf_INSECURE_RANDOM=0]) if test "$qpdf_INSECURE_RANDOM" = "1"; then AC_MSG_RESULT(yes) - AC_DEFINE([USE_INSECURE_RANDOM], [1], [Whether to use inscure random numbers]) + AC_DEFINE([USE_INSECURE_RANDOM], [1], [Whether to use insecure random numbers]) else AC_MSG_RESULT(no) fi +AC_ARG_ENABLE(os-secure-random, + AS_HELP_STRING([--enable-os-secure-random], + [whether to try to use OS-provided secure random numbers (default is yes)]), + [if test "$enableval" = "yes"; then + qpdf_OS_SECURE_RANDOM=1; + else + qpdf_OS_SECURE_RANDOM=0; + fi], [qpdf_OS_SECURE_RANDOM=1]) +if test "$qpdf_OS_SECURE_RANDOM" = "1"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + AC_DEFINE([SKIP_OS_SECURE_RANDOM], [1], [Whether to suppres use of OS-provided secure random numbers]) +fi + AX_RANDOM_DEVICE USE_EXTERNAL_LIBS=0 @@ -71,7 +86,7 @@ if test "$BUILD_INTERNAL_LIBS" = "0"; then AC_SEARCH_LIBS(pcre_compile,pcre,,[MISSING_PCRE=1; MISSING_ANY=1]) fi -if test "x$qpdf_INSECURE_RANDOM" != "x1"; then +if test "x$qpdf_OS_SECURE_RANDOM" = "x1"; then OLIBS=$LIBS LIBS="$LIBS Advapi32.lib" AC_MSG_CHECKING(for Advapi32 library) |