]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix for clean SSL exit.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 23 Jun 2010 07:46:46 +0000 (07:46 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 23 Jun 2010 07:46:46 +0000 (07:46 +0000)
git-svn-id: file:///svn/unbound/trunk@2164 be551aaa-1e26-0410-a405-d3ace91eadb9

config.h.in
configure
configure.ac
daemon/daemon.c

index b5d2eb3c385d80bdcb3c86a6760352ee954cf17a..ae9c841bbd971347a7d9c9866fe61ad4ce8e02b2 100644 (file)
 /* Define to 1 if you have the `daemon' function. */
 #undef HAVE_DAEMON
 
+/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
+   if you don't. */
+#undef HAVE_DECL_SK_SSL_COMP_POP_FREE
+
 /* Define to 1 if you have the declaration of
    `SSL_COMP_get_compression_methods', and to 0 if you don't. */
 #undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
index 7608974fd0de04598fa41d3b465c1f80ab5c4f06..120748c10de501fab51d6e62add135c7e2e5bbc7 100755 (executable)
--- a/configure
+++ b/configure
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
 _ACEOF
+ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
+$ac_includes_default
+#ifdef HAVE_OPENSSL_ERR_H
+#include <openssl/err.h>
+#endif
+
+#ifdef HAVE_OPENSSL_RAND_H
+#include <openssl/rand.h>
+#endif
+
+#ifdef HAVE_OPENSSL_CONF_H
+#include <openssl/conf.h>
+#endif
+
+#ifdef HAVE_OPENSSL_ENGINE_H
+#include <openssl/engine.h>
+#endif
+#include <openssl/ssl.h>
+#include <openssl/evp.h>
+
+"
+if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
+_ACEOF
 
 
 # Check whether --enable-sha2 was given.
index 538a5eafcd570ec80a1a35f6f9ad47d02870d4b8..dfb160f3ca9f3ab7b158f176c75b6402245a5228 100644 (file)
@@ -394,7 +394,7 @@ ACX_LIB_SSL
 AC_CHECK_HEADERS([openssl/conf.h],,, [AC_INCLUDES_DEFAULT])
 AC_CHECK_HEADERS([openssl/engine.h],,, [AC_INCLUDES_DEFAULT])
 AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512])
-AC_CHECK_DECLS([SSL_COMP_get_compression_methods], [], [], [
+AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free], [], [], [
 AC_INCLUDES_DEFAULT
 #ifdef HAVE_OPENSSL_ERR_H
 #include <openssl/err.h>
index 2ab96b50497717db0308a607dd4748232b788356..6f22620eec474c78f83b3638d723e01fb0c9a374 100644 (file)
@@ -535,8 +535,10 @@ daemon_delete(struct daemon* daemon)
 #if defined(USE_GOST) && defined(HAVE_LDNS_KEY_EVP_UNLOAD_GOST)
        ldns_key_EVP_unload_gost();
 #endif
-#if HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
-       sk_SSL_COMP_free(comp_meth);
+#if HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS && HAVE_DECL_SK_SSL_COMP_POP_FREE
+#ifndef S_SPLINT_S
+       sk_SSL_COMP_pop_free(comp_meth, (void*)CRYPTO_free);
+#endif
 #endif
 #ifdef HAVE_OPENSSL_CONFIG
        EVP_cleanup();