From af6e2d51bfeabbae827030d4c9d58a8f7477c4a0 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 18 Nov 2014 16:54:07 +0000 Subject: Add OPENSSL_NO_ECDH guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Emilia Käsper --- test/cms-test.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/cms-test.pl') diff --git a/test/cms-test.pl b/test/cms-test.pl index 595ab48fa9..7d4ca2990a 100644 --- a/test/cms-test.pl +++ b/test/cms-test.pl @@ -84,6 +84,7 @@ my $halt_err = 1; my $badcmd = 0; my $no_ec; my $no_ec2m; +my $no_ecdh; my $ossl8 = `$ossl_path version -v` =~ /0\.9\.8/; system ("$ossl_path no-ec >/dev/null"); @@ -113,6 +114,20 @@ else { die "Error checking for EC2M support\n"; } + +system ("$ossl_path no-ecdh >/dev/null"); +if ($? == 0) + { + $no_ecdh = 1; + } +elsif ($? == 256) + { + $no_ecdh = 0; + } +else + { + die "Error checking for ECDH support\n"; + } my @smime_pkcs7_tests = ( @@ -507,6 +522,11 @@ sub run_smime_tests { print "$tnam: skipped, EC disabled\n"; next; } + if ($no_ecdh && $tnam =~ /ECDH/) + { + print "$tnam: skipped, ECDH disabled\n"; + next; + } if ($no_ec2m && $tnam =~ /K-283/) { print "$tnam: skipped, EC2M disabled\n"; -- cgit v1.2.3