aboutsummaryrefslogtreecommitdiffstats
path: root/test/cms-test.pl
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2014-11-18 16:54:07 +0000
committerMatt Caswell <matt@openssl.org>2014-12-16 14:13:45 +0000
commitaf6e2d51bfeabbae827030d4c9d58a8f7477c4a0 (patch)
treec1850f479f5f20ad94fa1c6d99ca943ac0be410c /test/cms-test.pl
parent55e530265a7ea8f264717a4e37338cc04eca2007 (diff)
downloadopenssl-af6e2d51bfeabbae827030d4c9d58a8f7477c4a0.tar.gz
Add OPENSSL_NO_ECDH guards
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'test/cms-test.pl')
-rw-r--r--test/cms-test.pl20
1 files changed, 20 insertions, 0 deletions
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";