packages/mail/postfix/patches/110-openssl-engine.patch
Rosen Penev d0e42a5f49 postfix: Fix compilation without OpenSSL ENGINE
While ENGINE is not actually used, the header being included
unconditionally as well as the cleanup function being called breaks
compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-01-01 23:39:03 -08:00

22 lines
481 B
Diff

--- a/src/posttls-finger/posttls-finger.c
+++ b/src/posttls-finger/posttls-finger.c
@@ -374,7 +374,9 @@
#include <tls.h>
#ifdef USE_TLS
+#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
+#endif
#endif
/*
@@ -1524,7 +1526,9 @@ static void ssl_cleanup(void)
#else
ERR_remove_state(0); /* Deprecated with OpenSSL 1.0.0 */
#endif
+#ifndef OPENSSL_NO_ENGINE
ENGINE_cleanup();
+#endif
CONF_modules_unload(1);
ERR_free_strings();
EVP_cleanup();