[rs-commit] r230 - in /mod_ca/trunk: ChangeLog Makefile.in aclocal.m4 config.h.in configure configure.ac mod_ca_ldap.c

rs-commit at redwax.eu rs-commit at redwax.eu
Sat Jan 4 21:02:44 CET 2020


Author: minfrin at redwax.eu
Date: Sat Jan  4 21:02:44 2020
New Revision: 230

Log:
Support platforms where apr_crypto_clear() is not present.

Modified:
    mod_ca/trunk/ChangeLog
    mod_ca/trunk/Makefile.in
    mod_ca/trunk/aclocal.m4
    mod_ca/trunk/config.h.in
    mod_ca/trunk/configure
    mod_ca/trunk/configure.ac
    mod_ca/trunk/mod_ca_ldap.c

Modified: mod_ca/trunk/ChangeLog
==============================================================================
--- mod_ca/trunk/ChangeLog	(original)
+++ mod_ca/trunk/ChangeLog	Sat Jan  4 21:02:44 2020
@@ -1,5 +1,8 @@
 
 Changes with v0.2.2
+
+ *) Support platforms where apr_crypto_clear() is not present.
+    [Graham Leggett]
 
  *) Remove unnecessary ap_state_query call. [Graham Leggett]
 

Modified: mod_ca/trunk/Makefile.in
==============================================================================
--- mod_ca/trunk/Makefile.in	(original)
+++ mod_ca/trunk/Makefile.in	Sat Jan  4 21:02:44 2020
@@ -218,6 +218,10 @@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+apr_CFLAGS = @apr_CFLAGS@
+apr_LIBS = @apr_LIBS@
+apu_CFLAGS = @apu_CFLAGS@
+apu_LIBS = @apu_LIBS@
 bindir = @bindir@
 build_alias = @build_alias@
 builddir = @builddir@

Modified: mod_ca/trunk/aclocal.m4
==============================================================================
--- mod_ca/trunk/aclocal.m4	(original)
+++ mod_ca/trunk/aclocal.m4	Sat Jan  4 21:02:44 2020
@@ -21,7 +21,7 @@
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
 # pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
-# serial 11 (pkg-config-0.29.1)
+# serial 12 (pkg-config-0.29.2)
 
 dnl Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists at gmail.com>
@@ -63,7 +63,7 @@
 dnl See the "Since" comment for each macro you use to see what version
 dnl of the macros you require.
 m4_defun([PKG_PREREQ],
-[m4_define([PKG_MACROS_VERSION], [0.29.1])
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
 ])dnl PKG_PREREQ
@@ -164,7 +164,7 @@
 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
 pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_MSG_CHECKING([for $2])
 
 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -174,11 +174,11 @@
 See the pkg-config man page for more details.])
 
 if test $pkg_failed = yes; then
-   	AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
-        else 
+        else
 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
@@ -195,7 +195,7 @@
 _PKG_TEXT])[]dnl
         ])
 elif test $pkg_failed = untried; then
-     	AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
 	m4_default([$4], [AC_MSG_FAILURE(
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -295,74 +295,6 @@
 
 AS_VAR_IF([$1], [""], [$5], [$4])dnl
 ])dnl PKG_CHECK_VAR
-
-dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
-dnl   [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
-dnl   [DESCRIPTION], [DEFAULT])
-dnl ------------------------------------------
-dnl
-dnl Prepare a "--with-" configure option using the lowercase
-dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
-dnl PKG_CHECK_MODULES in a single macro.
-AC_DEFUN([PKG_WITH_MODULES],
-[
-m4_pushdef([with_arg], m4_tolower([$1]))
-
-m4_pushdef([description],
-           [m4_default([$5], [build with ]with_arg[ support])])
-
-m4_pushdef([def_arg], [m4_default([$6], [auto])])
-m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
-m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
-
-m4_case(def_arg,
-            [yes],[m4_pushdef([with_without], [--without-]with_arg)],
-            [m4_pushdef([with_without],[--with-]with_arg)])
-
-AC_ARG_WITH(with_arg,
-     AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
-    [AS_TR_SH([with_]with_arg)=def_arg])
-
-AS_CASE([$AS_TR_SH([with_]with_arg)],
-            [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
-            [auto],[PKG_CHECK_MODULES([$1],[$2],
-                                        [m4_n([def_action_if_found]) $3],
-                                        [m4_n([def_action_if_not_found]) $4])])
-
-m4_popdef([with_arg])
-m4_popdef([description])
-m4_popdef([def_arg])
-
-])dnl PKG_WITH_MODULES
-
-dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
-dnl   [DESCRIPTION], [DEFAULT])
-dnl -----------------------------------------------
-dnl
-dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
-dnl check._[VARIABLE-PREFIX] is exported as make variable.
-AC_DEFUN([PKG_HAVE_WITH_MODULES],
-[
-PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
-
-AM_CONDITIONAL([HAVE_][$1],
-               [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
-])dnl PKG_HAVE_WITH_MODULES
-
-dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
-dnl   [DESCRIPTION], [DEFAULT])
-dnl ------------------------------------------------------
-dnl
-dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
-dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
-dnl and preprocessor variable.
-AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
-[
-PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
-
-AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
-        [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
-])dnl PKG_HAVE_DEFINE_WITH_MODULES
 
 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
 #

Modified: mod_ca/trunk/config.h.in
==============================================================================
--- mod_ca/trunk/config.h.in	(original)
+++ mod_ca/trunk/config.h.in	Sat Jan  4 21:02:44 2020
@@ -1,4 +1,10 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the `apr_crypto_clear' function. */
+#undef HAVE_APR_CRYPTO_CLEAR
+
+/* Define to 1 if you have the <apr_crypto.h> header file. */
+#undef HAVE_APR_CRYPTO_H
 
 /* Define to 1 if you have the <apr_hash.h> header file. */
 #undef HAVE_APR_HASH_H

Modified: mod_ca/trunk/configure
==============================================================================
--- mod_ca/trunk/configure	(original)
+++ mod_ca/trunk/configure	Sat Jan  4 21:02:44 2020
@@ -631,6 +631,10 @@
 CPP
 openssl_LIBS
 openssl_CFLAGS
+apu_LIBS
+apu_CFLAGS
+apr_LIBS
+apr_CFLAGS
 PKG_CONFIG_LIBDIR
 PKG_CONFIG_PATH
 PKG_CONFIG
@@ -737,6 +741,10 @@
 PKG_CONFIG
 PKG_CONFIG_PATH
 PKG_CONFIG_LIBDIR
+apr_CFLAGS
+apr_LIBS
+apu_CFLAGS
+apu_LIBS
 openssl_CFLAGS
 openssl_LIBS
 CPP'
@@ -1380,6 +1388,10 @@
               directories to add to pkg-config's search path
   PKG_CONFIG_LIBDIR
               path overriding pkg-config's built-in search path
+  apr_CFLAGS  C compiler flags for apr, overriding pkg-config
+  apr_LIBS    linker flags for apr, overriding pkg-config
+  apu_CFLAGS  C compiler flags for apu, overriding pkg-config
+  apu_LIBS    linker flags for apu, overriding pkg-config
   openssl_CFLAGS
               C compiler flags for openssl, overriding pkg-config
   openssl_LIBS
@@ -4214,8 +4226,190 @@
 fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5
-$as_echo_n "checking for openssl... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr-1 >= 1.4" >&5
+$as_echo_n "checking for apr-1 >= 1.4... " >&6; }
+
+if test -n "$apr_CFLAGS"; then
+    pkg_cv_apr_CFLAGS="$apr_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"apr-1 >= 1.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "apr-1 >= 1.4") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_apr_CFLAGS=`$PKG_CONFIG --cflags "apr-1 >= 1.4" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$apr_LIBS"; then
+    pkg_cv_apr_LIBS="$apr_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"apr-1 >= 1.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "apr-1 >= 1.4") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_apr_LIBS=`$PKG_CONFIG --libs "apr-1 >= 1.4" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        apr_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "apr-1 >= 1.4" 2>&1`
+        else
+	        apr_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "apr-1 >= 1.4" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$apr_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements (apr-1 >= 1.4) were not met:
+
+$apr_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables apr_CFLAGS
+and apr_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables apr_CFLAGS
+and apr_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	apr_CFLAGS=$pkg_cv_apr_CFLAGS
+	apr_LIBS=$pkg_cv_apr_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr-util-1 >= 1.4" >&5
+$as_echo_n "checking for apr-util-1 >= 1.4... " >&6; }
+
+if test -n "$apu_CFLAGS"; then
+    pkg_cv_apu_CFLAGS="$apu_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"apr-util-1 >= 1.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "apr-util-1 >= 1.4") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_apu_CFLAGS=`$PKG_CONFIG --cflags "apr-util-1 >= 1.4" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$apu_LIBS"; then
+    pkg_cv_apu_LIBS="$apu_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"apr-util-1 >= 1.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "apr-util-1 >= 1.4") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_apu_LIBS=`$PKG_CONFIG --libs "apr-util-1 >= 1.4" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        apu_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "apr-util-1 >= 1.4" 2>&1`
+        else
+	        apu_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "apr-util-1 >= 1.4" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$apu_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements (apr-util-1 >= 1.4) were not met:
+
+$apu_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables apu_CFLAGS
+and apu_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables apu_CFLAGS
+and apu_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	apu_CFLAGS=$pkg_cv_apu_CFLAGS
+	apu_LIBS=$pkg_cv_apu_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl >= 0.9.8" >&5
+$as_echo_n "checking for openssl >= 0.9.8... " >&6; }
 
 if test -n "$openssl_CFLAGS"; then
     pkg_cv_openssl_CFLAGS="$openssl_CFLAGS"
@@ -4255,7 +4449,7 @@
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -4282,7 +4476,7 @@
 and openssl_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -4303,7 +4497,7 @@
 $as_echo "yes" >&6; }
 
 fi
-LIBS="$LIBS $openssl_LIBS"
+LDFLAGS="$LDFLAGS $openssl_LIBS $apr_LIBS $apu_LIBS"
 
 # Checks for header files.
 
@@ -4704,7 +4898,7 @@
 done
 
 
-for ac_header in apr_strings.h apr_hash.h openssl/err.h openssl/pem.h openssl/x509.h openssl/x509v3.h openssl/asn1.h time.h
+for ac_header in apr_crypto.h apr_strings.h apr_hash.h openssl/err.h openssl/pem.h openssl/x509.h openssl/x509v3.h openssl/asn1.h time.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -4732,7 +4926,7 @@
 
 
 # Checks for library functions.
-for ac_func in X509_REVOKED_get0_revocationDate X509_REVOKED_get0_serialNumber ASN1_STRING_get0_data X509_CRL_get0_lastUpdate X509_CRL_get0_nextUpdate
+for ac_func in apr_crypto_clear X509_REVOKED_get0_revocationDate X509_REVOKED_get0_serialNumber ASN1_STRING_get0_data X509_CRL_get0_lastUpdate X509_CRL_get0_nextUpdate
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"

Modified: mod_ca/trunk/configure.ac
==============================================================================
--- mod_ca/trunk/configure.ac	(original)
+++ mod_ca/trunk/configure.ac	Sat Jan  4 21:02:44 2020
@@ -49,17 +49,19 @@
 fi
 
 # Checks for libraries.
+PKG_CHECK_MODULES(apr, apr-1 >= 1.4)
+PKG_CHECK_MODULES(apu, apr-util-1 >= 1.4)
 PKG_CHECK_MODULES([openssl], [openssl >= 0.9.8])
-LIBS="$LIBS $openssl_LIBS"
+LDFLAGS="$LDFLAGS $openssl_LIBS $apr_LIBS $apu_LIBS"
 
 # Checks for header files.
-AC_CHECK_HEADERS([apr_strings.h apr_hash.h openssl/err.h openssl/pem.h openssl/x509.h openssl/x509v3.h openssl/asn1.h time.h])
+AC_CHECK_HEADERS([apr_crypto.h apr_strings.h apr_hash.h openssl/err.h openssl/pem.h openssl/x509.h openssl/x509v3.h openssl/asn1.h time.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_TYPE_SIZE_T
 
 # Checks for library functions.
-AC_CHECK_FUNCS([X509_REVOKED_get0_revocationDate X509_REVOKED_get0_serialNumber ASN1_STRING_get0_data X509_CRL_get0_lastUpdate X509_CRL_get0_nextUpdate])
+AC_CHECK_FUNCS([apr_crypto_clear X509_REVOKED_get0_revocationDate X509_REVOKED_get0_serialNumber ASN1_STRING_get0_data X509_CRL_get0_lastUpdate X509_CRL_get0_nextUpdate])
 
 AC_SUBST(PACKAGE_VERSION)
 AC_OUTPUT

Modified: mod_ca/trunk/mod_ca_ldap.c
==============================================================================
--- mod_ca/trunk/mod_ca_ldap.c	(original)
+++ mod_ca/trunk/mod_ca_ldap.c	Sat Jan  4 21:02:44 2020
@@ -23,7 +23,9 @@
  */
 #include <apr_strings.h>
 #include <apr_hash.h>
+#if HAVE_APR_CRYPTO_CLEAR
 #include <apr_crypto.h>
+#endif
 
 #include <openssl/err.h>
 #include <openssl/evp.h>
@@ -488,7 +490,9 @@
                                                 (const char *) val->data,
                                                 val->length)), ")", NULL);
                         found = 1;
+#if HAVE_APR_CRYPTO_CLEAR
                         apr_crypto_clear(r->pool, filter, strlen(filter));
+#endif
                     }
                     else {
                         log_message(r, APR_SUCCESS,
@@ -542,8 +546,10 @@
                                                                     val->length)),
                                                     ")", NULL);
                                     found = 1;
+#if HAVE_APR_CRYPTO_CLEAR
                                     apr_crypto_clear(r->pool, filter,
                                             strlen(filter));
+#endif
                                 }
                                 else {
                                     log_message(r, APR_SUCCESS,
@@ -598,7 +604,9 @@
         i++;
     }
     filter = apr_pstrcat(r->pool, filter, ")", NULL);
+#if HAVE_APR_CRYPTO_CLEAR
     apr_crypto_clear(r->pool, filter, strlen(filter));
+#endif
 
     /*
      * If LDAP operation fails due to LDAP_SERVER_DOWN, control returns here.



More information about the rs-commit mailing list