[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Thu Apr 14 09:11:07 UTC 2016


The branch master has been updated
       via  627537ddf3792249df22fc0e33487ca62c6b7be1 (commit)
      from  bdcd660e33710079b495cf5cc6a1aaa5d2dcd317 (commit)


- Log -----------------------------------------------------------------
commit 627537ddf3792249df22fc0e33487ca62c6b7be1
Author: Matt Caswell <matt at openssl.org>
Date:   Wed Apr 13 23:26:56 2016 +0100

    Fix AFALG kernel and headers mismatch problem
    
    During Configure we attempt to check the kernel version of this platform
    to see whether we can compile the AFALG engine. If the kernel version
    looks recent enough then we enable AFALG. However when we compile
    e_afalg.c we check the version of the linux headers. If there is a
    mismatch between the linux headers and the currently running kernel then
    we don't compile the AFLAG engine and continue. This was causing a link
    error.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 engines/afalg/e_afalg.c |  3 +++
 test/afalgtest.c        | 16 ++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/engines/afalg/e_afalg.c b/engines/afalg/e_afalg.c
index 830e88b..d8599a1 100644
--- a/engines/afalg/e_afalg.c
+++ b/engines/afalg/e_afalg.c
@@ -69,6 +69,9 @@
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2)
 # warning "AFALG ENGINE requires Kernel Headers >= 4.1.0"
 # warning "Skipping Compilation of AFALG engine"
+void engine_load_afalg_int(void)
+{
+}
 #else
 
 # include <linux/if_alg.h>
diff --git a/test/afalgtest.c b/test/afalgtest.c
index 16916b3..80aa1e7 100644
--- a/test/afalgtest.c
+++ b/test/afalgtest.c
@@ -55,6 +55,22 @@
 #include <openssl/opensslconf.h>
 
 #ifndef OPENSSL_NO_AFALGENG
+# include <linux/version.h>
+# define K_MAJ   4
+# define K_MIN1  1
+# define K_MIN2  0
+# if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2)
+/*
+ * If we get here then it looks like there is a mismatch between the linux
+ * headers and the actual kernel version, so we have tried to compile with
+ * afalg support, but then skipped it in e_afalg.c. As far as this test is
+ * concerned we behave as if we had been configured without support
+ */
+#  define OPENSSL_NO_AFALGENG
+# endif
+#endif
+
+#ifndef OPENSSL_NO_AFALGENG
 #include <string.h>
 #include <openssl/engine.h>
 #include <openssl/evp.h>


More information about the openssl-commits mailing list