[pkg-opensc-commit] [libp11] 42/86: Skip EC tests with OpenSSL 0.*

Eric Dorland eric at moszumanska.debian.org
Sun Jul 24 21:40:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit ca1a12a2929b1aa46e15549f005769060c07f196
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date:   Tue Feb 9 13:22:48 2016 +0100

    Skip EC tests with OpenSSL 0.*
---
 .gitignore              |  1 +
 tests/Makefile.am       |  2 +-
 tests/ec-common.sh      | 10 ++++++++++
 tests/openssl_version.c | 15 +++++++++++++++
 4 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index f6a5518..7e93d26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,6 +63,7 @@ examples/rawrsasign
 examples/listkeys
 
 test-driver
+tests/openssl_version
 tests/fork-test
 tests/evp-sign
 tests/*.log
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 28e607a..b65e24a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,7 +9,7 @@ AM_CPPFLAGS = \
 AM_LDFLAGS = -no-install
 LDADD = ../src/libp11.la $(OPENSSL_LIBS)
 
-check_PROGRAMS = fork-test evp-sign
+check_PROGRAMS = openssl_version fork-test evp-sign
 dist_check_SCRIPTS = \
 	rsa-testpkcs11.softhsm rsa-testfork.softhsm rsa-testlistkeys.softhsm rsa-evp-sign.softhsm \
 	ec-testfork.softhsm
diff --git a/tests/ec-common.sh b/tests/ec-common.sh
index 8ea2ba5..fc36495 100755
--- a/tests/ec-common.sh
+++ b/tests/ec-common.sh
@@ -17,6 +17,16 @@
 # along with GnuTLS; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
+OPENSSL_VERSION=$(./openssl_version | cut -d ' ' -f 2)
+case "${OPENSSL_VERSION}" in
+0.*)
+    echo "EC tests skipped with OpenSSL ${OPENSSL_VERSION}"
+	exit 77
+	;;
+*)
+	;;
+esac
+
 echo "Current directory: $(pwd)"
 echo "Source directory: ${srcdir}"
 echo "Output directory: ${outdir}"
diff --git a/tests/openssl_version.c b/tests/openssl_version.c
new file mode 100644
index 0000000..7b517da
--- /dev/null
+++ b/tests/openssl_version.c
@@ -0,0 +1,15 @@
+/*
+ * Feel free to copy all of the code as needed.
+ */
+
+#include <stdio.h>
+#include <openssl/opensslconf.h>
+#include <openssl/opensslv.h>
+
+int main()
+{
+	puts(OPENSSL_VERSION_TEXT);
+	return 0;
+}
+
+/* vim: set noexpandtab: */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list