Skip to contentSkip to conversation

build: check minimum polarssl version

PATCH Applied Alon Bar-Lev 3 participants 3 messages May 21, 2012 – Jun 1, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: check minimum polarssl version

Pre 1.1 is unsupported, API was changed.

---
 configure.ac |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
configure.ac +21 -0
index 4592727..5ace128 100644
@@ -743,6 +743,27 @@ if test -z "${POLARSSL_LIBS}"; then
 	)
 fi
 
+if test "${with_crypto_library}" = "polarssl" ; then
+	AC_MSG_CHECKING([polarssl version])
+	old_CFLAGS="${CFLAGS}"
+	CFLAGS="${POLARSSL_CFLAGS} ${CFLAGS}"
+	AC_COMPILE_IFELSE(
+		[AC_LANG_PROGRAM(
+			[[
+#include <polarssl/version.h>
+			]],
+			[[
+#if POLARSSL_VERSION_NUMBER <= 0x01010000
+#error invalid version
+#endif
+			]]
+		)],
+		[AC_MSG_RESULT([ok])],
+		[AC_MSG_ERROR([invalid polarssl version])]
+	)
+	CFLAGS="${old_CFLAGS}"
+fi
+
 AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo])
 AC_ARG_VAR([LZO_LIBS], [linker flags for lzo])
 have_lzo="yes"
Signature · 1 line
1.7.3.4
#1 lore raw

Looks good! I'll give it a feature ack. I don't see any problems in the autoconf code, but I'm not an expert in that area. So a tentative ack there too.

Adriaan

Quoted 60 lines

-----Original Message-----
From: Alon Bar-Lev [mailto:[email protected]...]
Sent: maandag 21 mei 2012 13:04
To: [email protected]
Cc: Alon Bar-Lev
Subject: [Openvpn-devel] [PATCH] build: check minimum polarssl version

Pre 1.1 is unsupported, API was changed.

---
 configure.ac |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
configure.ac +19 -0
@@ -743,6 +743,27 @@ if test -z "${POLARSSL_LIBS}"; then
 	)
 fi
 
+if test "${with_crypto_library}" = "polarssl" ; then
+	AC_MSG_CHECKING([polarssl version])
+	old_CFLAGS="${CFLAGS}"
+	CFLAGS="${POLARSSL_CFLAGS} ${CFLAGS}"
+	AC_COMPILE_IFELSE(
+		[AC_LANG_PROGRAM(
+			[[
+#include <polarssl/version.h>
+			]],
+			[[
+#if POLARSSL_VERSION_NUMBER <= 0x01010000 #error invalid version
 #endif
+			]]
+		)],
+		[AC_MSG_RESULT([ok])],
+		[AC_MSG_ERROR([invalid polarssl version])]
+	)
+	CFLAGS="${old_CFLAGS}"
+fi
+
 AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo])

AC_ARG_VAR([LZO_LIBS], [linker flags for lzo]) have_lzo="yes" --
1.7.3.4

-----------------------------------------------------------------------
-------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#2 lore raw
In reply to Alon Bar-Lev
Quoted 7 lines · Alon Bar-Lev

Pre 1.1 is unsupported, API was changed.

---
 configure.ac |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

Applied to master branch.

commit 13b38eb0a3e609a5f0f4f12e2578e68ff2ac0a22

Author: Alon Bar-Lev <[email protected]...>
Date:   Mon May 21 14:04:14 2012 +0300
    build: check minimum polarssl version
    
    Pre 1.1 is unsupported, API was changed.
    
    Signed-off-by: Alon Bar-Lev <[email protected]...>
    Reviewed-by: Adriaan de Jong <[email protected]...>
    Acked-by: David Sommerseth <[email protected]...>
    Message-Id: [email protected]...
    URL: http://article.gmane.org/gmane.network.openvpn.devel/6613
    Signed-off-by: David Sommerseth <[email protected]...>

kind regards,

David Sommerseth