View | Details | Raw Unified | Return to bug 198997 | Differences between
and this patch

Collapse All | Expand All

(-)security/stunnel/files/patch-configure (+92 lines)
Line 0 Link Here
1
--- configure.orig	2015-03-21 14:01:22 UTC
2
+++ configure
3
@@ -2495,7 +2495,7 @@ ac_configure="$SHELL $ac_aux_dir/configu
4
 ac_config_headers="$ac_config_headers src/config.h"
5
 
6
 
7
-am__api_version='1.14'
8
+am__api_version='1.15'
9
 
10
 # Find a good install program.  We prefer a C program (faster),
11
 # so one script is as good as another.  But avoid the broken or
12
@@ -2667,8 +2667,8 @@ test "$program_suffix" != NONE &&
13
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
14
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
15
 
16
-# expand $ac_aux_dir to an absolute path
17
-am_aux_dir=`cd $ac_aux_dir && pwd`
18
+# Expand $ac_aux_dir to an absolute path.
19
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
20
 
21
 if test x"${MISSING+set}" != xset; then
22
   case $am_aux_dir in
23
@@ -2687,7 +2687,7 @@ else
24
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
25
 fi
26
 
27
-if test x"${install_sh}" != xset; then
28
+if test x"${install_sh+set}" != xset; then
29
   case $am_aux_dir in
30
   *\ * | *\	*)
31
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
32
@@ -3015,8 +3015,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}ma
33
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
34
 mkdir_p='$(MKDIR_P)'
35
 
36
-# We need awk for the "check" target.  The system "awk" is bad on
37
-# some platforms.
38
+# We need awk for the "check" target (and possibly the TAP driver).  The
39
+# system "awk" is bad on some platforms.
40
 # Always define AMTAR for backward compatibility.  Yes, it's still used
41
 # in the wild :-(  We should find a proper way to deprecate it ...
42
 AMTAR='$${TAR-tar}'
43
@@ -15017,6 +15017,49 @@ done
44
 
45
 fi
46
 
47
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
48
+$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
49
+if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
50
+  $as_echo_n "(cached) " >&6
51
+else
52
+  ac_check_lib_save_LIBS=$LIBS
53
+LIBS="-lcrypto  $LIBS"
54
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55
+/* end confdefs.h.  */
56
+
57
+/* Override any GCC internal prototype to avoid an error.
58
+   Use char because int might match the return type of a GCC
59
+   builtin and then its argument prototype would still apply.  */
60
+#ifdef __cplusplus
61
+extern "C"
62
+#endif
63
+char RAND_egd ();
64
+int
65
+main ()
66
+{
67
+return RAND_egd ();
68
+  ;
69
+  return 0;
70
+}
71
+_ACEOF
72
+if ac_fn_c_try_link "$LINENO"; then :
73
+  ac_cv_lib_crypto_RAND_egd=yes
74
+else
75
+  ac_cv_lib_crypto_RAND_egd=no
76
+fi
77
+rm -f core conftest.err conftest.$ac_objext \
78
+    conftest$ac_exeext conftest.$ac_ext
79
+LIBS=$ac_check_lib_save_LIBS
80
+fi
81
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
82
+$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
83
+if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
84
+
85
+$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
86
+
87
+fi
88
+
89
+
90
 CPPFLAGS="$valid_CPPFLAGS"
91
 LIBS="$valid_LIBS"
92
 
(-)security/stunnel/files/patch-configure.ac (+11 lines)
Line 0 Link Here
1
--- configure.ac.orig	2015-03-20 16:02:04 UTC
2
+++ configure.ac
3
@@ -436,6 +436,8 @@ if test "$use_fips" = "auto"; then
4
     ])
5
 fi
6
 
7
+AC_CHECK_LIB(crypto, RAND_egd, AC_DEFINE(HAVE_RAND_EGD, 1, [Define if the libcrypto has RAND_egd]))
8
+
9
 CPPFLAGS="$valid_CPPFLAGS"
10
 LIBS="$valid_LIBS"
11
 
(-)security/stunnel/files/patch-src_ssl.c (+19 lines)
Line 0 Link Here
1
--- src/ssl.c.orig	2015-03-25 13:10:58 UTC
2
+++ src/ssl.c
3
@@ -172,7 +172,7 @@ NOEXPORT int prng_init(GLOBAL_OPTIONS *g
4
         return 0; /* success */
5
     }
6
     s_log(LOG_DEBUG, "RAND_screen failed to sufficiently seed PRNG");
7
-#else
8
+#elif HAVE_RAND_EGD
9
     if(global->egd_sock) {
10
         if((bytes=RAND_egd(global->egd_sock))==-1) {
11
             s_log(LOG_WARNING, "EGD Socket %s failed", global->egd_sock);
12
@@ -185,6 +185,7 @@ NOEXPORT int prng_init(GLOBAL_OPTIONS *g
13
                          so no need to check if seeded sufficiently */
14
         }
15
     }
16
+#else
17
     /* try the good-old default /dev/urandom, if available  */
18
     totbytes+=add_rand_file(global, "/dev/urandom");
19
     if(RAND_status())

Return to bug 198997