aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/test
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-04-08 14:33:12 +0200
committerHans Nilsson <[email protected]>2019-04-10 10:38:10 +0200
commit39e7ecc0b3c5cbe529093f126189eadbf83d3a80 (patch)
tree88b0d95bde8a633c6fbb57b7dcc3f2f4a6faee6a /lib/crypto/test
parentf088a25bebcb74668dac21dc3b686fc2bea4502e (diff)
downloadotp-39e7ecc0b3c5cbe529093f126189eadbf83d3a80.tar.gz
otp-39e7ecc0b3c5cbe529093f126189eadbf83d3a80.tar.bz2
otp-39e7ecc0b3c5cbe529093f126189eadbf83d3a80.zip
crypto: Obey compile flags for no DSA, BF, DES, DH
Diffstat (limited to 'lib/crypto/test')
-rw-r--r--lib/crypto/test/engine_SUITE.erl30
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl
index 3416fbd78d..41cd132734 100644
--- a/lib/crypto/test/engine_SUITE.erl
+++ b/lib/crypto/test/engine_SUITE.erl
@@ -148,8 +148,21 @@ end_per_group(_, Config) ->
end.
%%--------------------------------------------------------------------
-init_per_testcase(_Case, Config) ->
- Config.
+init_per_testcase(Case, Config) ->
+ case string:tokens(atom_to_list(Case),"_") of
+ ["sign","verify",Type|_] ->
+ skip_if_unsup(list_to_atom(Type), Config);
+
+ ["priv","encrypt","pub","decrypt",Type|_] ->
+ skip_if_unsup(list_to_atom(Type), Config);
+
+ ["get","pub","from","priv","key",Type|_] ->
+ skip_if_unsup(list_to_atom(Type), Config);
+
+ _ ->
+ Config
+ end.
+
end_per_testcase(_Case, _Config) ->
ok.
@@ -851,6 +864,19 @@ get_pub_from_priv_key_ecdsa(Config) ->
%%%================================================================
%%% Help for engine_stored_pub_priv_keys* test cases
%%%
+skip_if_unsup(Type, Config) ->
+ case pkey_supported(Type) of
+ false ->
+ {skip, "Unsupported in this cryptolib"};
+ true ->
+ Config
+ end.
+
+
+pkey_supported(Type) ->
+ lists:member(Type, proplists:get_value(public_keys, crypto:supports(), [])).
+
+
load_storage_engine(Config) ->
load_storage_engine(Config, []).